aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/layout_interface.rs
Commit message (Collapse)AuthorAgeFilesLines
* compositing: Split Servo up into multiple sandboxed processes.Patrick Walton2015-11-191-3/+6
| | | | | Multiprocess mode is enabled with the `-M` switch, and sandboxing is enabled with the `-S` switch.
* Split ConstellationMsg into ScriptMsg and CompositorMsgKeith Yeung2015-11-161-1/+2
|
* Auto merge of #8548 - Ms2ger:unused-tna, r=pcwaltonbors-servo2015-11-171-2/+2
|\ | | | | | | | | | | | | | | | | | | | | Remove the unused arguments to hit_test and mouse_over. I don't think this code is called when there is no document element, but I added assertions to make sure we notice in case I was wrong. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8548) <!-- Reviewable:end -->
| * Remove the unused arguments to hit_test and mouse_over.Ms2ger2015-11-161-2/+2
| | | | | | | | | | I don't think this code is called when there is no document element, but I added assertions to make sure we notice in case I was wrong.
* | Remove AutoJoinScriptTask.Ms2ger2015-11-161-0/+6
|/ | | | | | | I don't believe there is a case where it would make sense to drop the ScriptReflow struct without joining the script thread. This approach should be somewhat more robust, and avoids the code smell of a RAII guard in an otherwise unused variable.
* Auto merge of #8039 - tschneidereit:script-owns-stylesheets, r=jdmbors-servo2015-11-081-11/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move Stylesheet loading and ownership from the layout task into HTML elements Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">). Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents. This all has various nice consequences: - Stylesheet loading becomes a non-blocking operation. - Stylesheets are removed when the element they're associated with is removed from the document. - It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them). - Various subtle correctness issues are fixed. One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state. Depends on #7979 because without that loading stylesheets asynchronously breaks lots of content. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8039) <!-- Reviewable:end -->
| * Move Stylesheet loading and ownership from the layout task into HTML elementsTill Schneidereit2015-11-071-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">). Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents. This all has various nice consequences: - Stylesheet loading becomes a non-blocking operation. - Stylesheets are removed when the element they're associated with is removed from the document. - It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them). - Various subtle correctness issues are fixed. One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state.
* | Remove the unused PipelineExitType field from layout_interface::Msg::ExitNow.Ms2ger2015-11-051-2/+2
|/
* Auto merge of #8239 - Ms2ger:ScriptReflow, r=pcwaltonbors-servo2015-11-031-4/+0
|\ | | | | | | | | | | | | | | Remove unused code around ScriptReflow. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8239) <!-- Reviewable:end -->
| * Remove unused fields from ScriptReflow.Ms2ger2015-10-311-4/+0
| |
* | Un-boxed ScriptReflowOlivia Nordquist2015-10-311-1/+1
|/
* Pass the document instead of the documentElement to reflow.Bobby Holley2015-10-271-1/+1
|
* Handle <meta name=viewport> elements when added to documentJames Gilbertson2015-09-301-0/+4
|
* Split Au type into separate crate, with minimal dependencies.Glenn Watson2015-10-011-1/+1
|
* layout: Load Web fonts asynchronously.Patrick Walton2015-09-271-0/+7
| | | | | | Improves page load times significantly. Closes #7343.
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-3/+1
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-1/+0
| | | | This merges import blocks that were reported by tidy as unmerged.
* sort all usesJohann Tuffe2015-08-201-2/+2
|
* Fix existing syntactics nits.Josh Matthews2015-08-161-2/+2
|
* Store a Sender<ConstellationControlMsg> in ScriptReflow.Ms2ger2015-08-121-2/+2
|
* Implement offsetParent/Top/Left/Width/Height.Glenn Watson2015-08-031-0/+17
|
* style: Switch animation timestamps to be doubles instead of floats.Patrick Walton2015-08-011-3/+3
| | | | | 32-bit floats are not enough to hold timestamps since the epoch and result in jank.
* Implement getComputedStyleDavid Zbarsky2015-07-291-0/+7
|
* Auto merge of #6662 - tschneidereit:client-geometry, r=glennw,pcwatsonbors-servo2015-07-271-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | Implement Element.client{Top,Left,Width,Height} This isn't done, but contains a working implementation of at least `clientTop`. Feedback would be much appreciated: it's probably far from ideal. Implementing `clientLeft` is straight-forward, I think, but `clientWidth` and `clientHeight` require accessing the `border_box` - and I don't know how that works, yet. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6662) <!-- Reviewable:end -->
| * Address review commentsTill Schneidereit2015-07-211-1/+1
| |
| * Implement client{Top, Left, Height, Width} element propertiesTill Schneidereit2015-07-191-0/+6
| |
* | profile: Make the time and memory profilers run over IPC.Patrick Walton2015-07-241-9/+1
|/ | | | | Uses the `Router` abstraction inside `ipc-channel` to avoid spawning new threads.
* script: Split `Pipeline::create` into chrome process and contentPatrick Walton2015-07-141-5/+26
| | | | | | | | | | | | process parts. This will make it easier to adapt to IPC. The trickiest part here was to make script tasks spawn new layout tasks directly instead of having the pipeline do it for them. The latter approach will not work in multiprocess mode, because layout and script must run in the same address space and the pipeline cannot inject tasks into another process.
* layout: Make the `LayoutControlChan` use IPC.Patrick Walton2015-07-141-1/+2
|
* Use euclid from crates.ioecoal952015-06-191-2/+2
|
* compositing: Implement display ports and avoid creating display listsPatrick Walton2015-05-191-0/+5
| | | | | | for items outside it. This improves Servo's performance on large pages.
* Fixes a number of race conditions and reliability issues with reftests and ↵Glenn Watson2015-05-141-0/+4
| | | | | | | | | | | | compositor. The basic idea is it's safe to output an image for reftest by testing: - That the compositor doesn't have any animations active. - That the compositor is not waiting on any outstanding paint messages to arrive. - That the script tasks are "idle" and therefore won't cause reflow. - This currently means page loaded, onload fired, reftest-wait not active, first reflow triggered. - It could easily be expanded to handle pending timers etc. - That the "epoch" that the layout tasks have last laid out after script went idle, is reflected by the compositor in all visible layers for that pipeline.
* Make link elements fire a load event.Josh Matthews2015-05-111-1/+2
|
* Make stylesheets block page load.Josh Matthews2015-05-111-1/+2
|
* Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.Simon Sapin2015-05-051-5/+4
|
* Auto merge of #5913 - glennw:bounding-rect, r=pcwaltonbors-servo2015-05-011-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | * Fix queries involving stacking contexts * The code was double accumulating stacking context origins. * Handle queries of inline elements. * The node addresses being compared were incorrect (CharacterData vs. Span) * Handle ScriptQuery reflows correctly. * The layout task was skipping the compute absolute positions traversal, so failed before window.onload. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5913) <!-- Reviewable:end -->
| * Various fixes to getClientBoundingRect()Glenn Watson2015-05-011-1/+1
| | | | | | | | | | | | | | | | | | * Fix queries involving stacking contexts * The code was double accumulating stacking context origins. * Handle queries of inline elements. * The node addresses being compared were incorrect (CharacterData vs. Span) * Handle ScriptQuery reflows correctly. * The layout task was skipping the compute absolute positions traversal, so failed before window.onload.
* | Add a `profile_traits` crate to reduce compile times.Nicholas Nethercote2015-04-301-1/+1
|/ | | | | | | | | | A rebuild after touching components/profile/mem.rs now takes 48 seconds (and only rebuilds `profile` and `servo`) which is much lower than it used to be. In comparison, a rebuild after touching components/profile_traits/mem.rs takes 294 seconds and rebuilds many more crates. This change also removes some unnecessary crate dependencies in `net` and `net_traits`.
* Animate many more CSS propertiesJoseph Seaton2015-04-161-1/+1
|
* Move iframe and url fields from Reflow to LayoutTask and LayoutTaskFactoryaditya2015-04-021-4/+0
| | | | * Fix #5466
* auto merge of #5459 : jdm/servo/reflowquery, r=saneyukibors-servo2015-04-011-0/+1
|\
| * Make reflow queries always perform reflow. Fixes #5458.Josh Matthews2015-04-011-0/+1
| |
* | layout: Implement CSS transitions per CSS-TRANSITIONS § 2.Patrick Walton2015-03-311-6/+42
|/ | | | | | | | Transition events are not yet supported, and the only animatable properties are `top`, `right`, `bottom`, and `left`. However, all other features of transitions are supported. There are no automated tests at present because I'm not sure how best to test it, but three manual tests are included.
* Use u32 for reflow ids.Ms2ger2015-03-281-1/+1
|
* Rename lots of profiling-related things.Nicholas Nethercote2015-03-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ BEFORE AFTER ------------------------------------------------------------------------ util::memory util::mem - heap_size_of - heap_size_of (unchanged) - SizeOf - HeapSizeOf - size_of_excluding_self - heap_size_of_children prof::mem prof::mem - MemoryProfilerChan - ProfilerChan - MemoryReport - Report - MemoryReportsChan - ReportsChan - MemoryReporter - Reporter - MemoryProfilerMsg - ProfilerMsg - {R,UnR}egisterMemoryReporter - {R,UnR}egisterReporter - MemoryProfiler - Prof - ReportsForest - ReportsForest (unchanged) - ReportsTree - ReportsTree (unchanged) - SystemMemoryReporter - SystemReporter prof::time prof::time - TimeProfilerChan - ProfilerChan - TimerMetadata - TimerMetadata (unchanged) - Formatable - Formattable [spelling!] - TimeProfilerMsg - ProfilerMsg - TimeProfilerCategory - ProfilerCategory - TimeProfilerBuckets - ProfilerBuckets - TimeProfiler - Profiler - TimerMetadataFrameType - TimerMetadataFrameType (unchanged) - TimerMetadataReflowType - TimerMetadataReflowType (unchanged) - ProfilerMetadata - ProfilerMetadata (unchanged) In a few places both prof::time and prof::mem are used, and so module-qualification is needed to avoid overlap, e.g. time::Profiler and mem::Profiler. Likewise with std::mem and prof::mem. This is not a big deal.
* Move profiler code from `util` into a new crate `profile`.Nicholas Nethercote2015-03-241-3/+3
| | | | | | | | | - Most of util::memory has been moved into profile::mem, though the `SizeOf` trait and related things remain in util::memory. The `SystemMemoryReporter` code is now in a submodule profile::mem::system_reporter. - util::time has been moved entirely into profile::time.
* Add memory reporting infrastructure and use it to measure the display list.Nicholas Nethercote2015-03-161-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset implements the beginnings of fine-grained measurement of Servo's data structures. - It adds a new `SizeOf` trait, which is used to measure the memory used by heap data structures, and implements it for some std types: Box, String, Option, Arc, Vec, and DList. - It adds a new `MemoryReporter` trait which is used to report memory measurements from other threads to the memory profiler. Reporters are registered and unregistered with the memory profiler, and the memory profiler makes measurement requests of reporters when necessary. - It plumbs a MemoryProfilerChan through to the layout task so it can register a memory reporter. - It implements the `SizeOf` trait for `DisplayList` and associated types, and adds a memory reporter that uses it. The display list hits 14.77 MiB when viewing tests/html/perf-rainbow.html, and 2.51 MiB when viewing the Guardians of the Galaxy Wikipedia page from servo-static-suite. Example output: 0.29: display-list::http://www.reddit.com/ 0.00: display-list::http://static.adzerk.net/reddit/ads.html?sr=-reddit.com,loggedout&bust2#http://www.reddit.com 0.00: display-list::http://www.reddit.com/static/createadframe.html There are a number of FIXME comments indicating sub-optimal things. This is a big enough change for now that doing them as follow-ups seems best.
* Consider media attribute on link and style tagsMikko Perttunen2015-03-161-2/+3
| | | | | Don't add a stylesheet if the current device does not match the media query specified in a link or style tag.
* Reap layout data whenever a node is removed from the tree.Glenn Watson2015-03-031-2/+2
| | | | | | Also introduce a clear() function to layout data which will be used to clear items such as compositor layouts. Clear the layout data when a node becomes display:none.
* Upgrade to rustc ba2f13ef0 2015-02-04Simon Sapin2015-02-111-1/+1
|