aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove support for energy profilingSimon Sapin2020-06-041-2/+0
|
* Implement concept of dirty rootAnthony Ramine2020-05-191-15/+27
|
* Move most animation processing to scriptMartin Robinson2020-05-121-34/+41
| | | | | | | This is preparation for sharing this code with layout_2020 and implementing selective off-the-main-thread animations. We still look for nodes not in the flow tree in the layout thread.
* Split animations and transitions into separate listsMartin Robinson2020-05-061-3/+3
| | | | | | | | | | | This change splits the list of animations and transitions, which are almost always handled differently. It also renames `ElementAnimationState` to `ElementAnimationSet` and establishes an `AnimationState` for every transition and animation. This allows us to stop continually reallocating lists every time a transition or animation needs to be canceled. Fixes #14419.
* Start having animations conform to the HTML specMartin Robinson2020-05-051-19/+4
| | | | | | | | | | | | | | This is a small step toward fixing #19242. The main idea is that the clock for animations should advance as the event loop ticks. We accomplish this by moving the clock from layout and naming it the "animation timeline" which is the spec language. This should fix flakiness with animations and transitions tests where a reflow could move animations forward while script was running. This change also starts to break out transition and animation events into their own data structure, because it's quite likely that the next step in fixing #19242 is to no longer send these events through a channel.
* Use a restyle for animation ticksMartin Robinson2020-05-051-128/+21
| | | | | | | | | | | | | | This change corrects synchronization issues with animations, by reworking the animation processing model to do a quick restyle and incremental layout when ticking animations. While this change adds overhead to animation ticks, the idea is that this will be the fallback when synchronous behavior is required to fulfill specification requirements. In the optimistic case, many animations could be updated and applied off-the-main-thread and then resynchronized when style information is queried by script. Fixes #13865.
* Add support for animationend eventMartin Robinson2020-05-011-14/+8
| | | | | | | | | | This is triggered when an animation finishes. This is a high priority because it allows us to start rooting nodes with animations in the script thread. This doesn't yet cause a lot of tests to pass because they rely on the existence of `Document.getAnimations()` and the presence of `animationstart` and animationiteration` events.
* Add support for transitionrun eventsMartin Robinson2020-04-241-4/+9
| | | | | | These events are triggered as soon as a transition is added to the list of running transitions. This will allow better test coverage while reworking the transitions and animations processing model.
* Add ElementAnimationState and PossibleElementAnimationStateMartin Robinson2020-04-241-41/+18
| | | | | | | | | | | | This refactor is preparation for implementing a specification compliant transitions and animations processing model. These data structures hold all the animation information about a single node. Since adding, updating, and modifying animations for a single node are all interdependent, it makes sense to start encapsulating animation data and functionality into a single data structure. This also opens up the possibility for easier concurrency in the future by more easily allowing per-node mutexes.
* Auto merge of #26244 - mrobinson:animation-cancel, r=jdmbors-servo2020-04-221-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for canceling CSS transitions This change adds support for canceling CSS transitions when a property is no longer transitionable. Support for canceling and replacing CSS transitions when the end value changes is still pending. This change also takes advantage of updating the constellation message to fix a bug where transition events could be sent for closed pipelines. Fixes #15079. <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #15079. <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Add support for canceling CSS transitionsMartin Robinson2020-04-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | This change adds support for canceling CSS transitions when a property is no longer transitionable or when an element becomes styled with display:none. Support for canceling and replacing CSS transitions when the end value changes is still pending. This change also takes advantage of updating the constellation message to fix a bug where transition events could be sent for closed pipelines. Fixes #15079.
* | Make the rule tree actually threadsafeAnthony Ramine2020-04-201-3/+1
|/ | | | | | RuleTree::gc is now a safe method that any thread can call at any time, and StrongRuleNode values can all be dropped whenever their owner want to, on any thread.
* Don't go through the layout thread to retrieve a node's primary styleAnthony Ramine2020-04-071-12/+4
|
* Auto merge of #26110 - servo:layout-2020-rm-note-dirty-descendant, r=emiliobors-servo2020-04-041-8/+0
|\ | | | | | | Kill ServoLayoutElement::note_dirty_descendant
| * Kill ServoLayoutElement::note_dirty_descendantAnthony Ramine2020-04-041-8/+0
| | | | | | | | | | | | There is no need to set the dirty descendants flag unsafely from the layout side for elements with pending restyles, we can do that on the DOM side when draining the restyles from the Document.
* | Make DOM own the style and layout data, in an UnsafeCellAnthony Ramine2020-04-041-8/+0
| | | | | | | | The previous Cell was a lie.
* | Don't expose any AtomicRefCell directly from style traitsAnthony Ramine2020-04-041-3/+1
|/ | | | This lets us experiment with how we store this data on the DOM side.
* Pass pending restyles instead of draining them from layoutAnthony Ramine2020-03-281-2/+4
|
* Add a 'dom lifetime to GetLayoutDataAnthony Ramine2020-03-261-1/+1
|
* Remove unnecessary .clone() callsIulian Gabriel Radu2020-03-041-5/+5
|
* Make Background Hang Monitor OptionalKunal Mohan2020-02-231-9/+15
| | | | | | This is done by wrapping all channels of communication and related objects inside Option which are configured using flag inside servo_config.
* remove option for origin and mirror changes to layout_thread_2020Kunal Mohan2020-02-181-19/+21
|
* Take origin from window instead of creating a new one in case of reflowKunal Mohan2020-02-151-4/+12
| | | | | | | | | | Everytime a new LayoutContext was created, it created a new origin which caused endless stream of image loads to occur in case of reflow. The reason for this was that the existing image, although cached successfully, was not used because the entry in hashmap did not match because of different(new) origin. This is solved by storing the origin of a window in enum ScriptReflow and used in creating new LayoutContext in case of reflow.
* Improve the name the NodeGeometryQueryMartin Robinson2020-02-051-4/+4
| | | | | | | This query is used to get the clientTop, clientWidth, clientHeight, clientLeft properties of DOM objects. "NodeGeometry" doesn't really capture what these properties do as they often are returning the width of element border.
* Use non-IPC webrender API over explicit IPC channels.Josh Matthews2019-11-271-30/+13
|
* layout: Inform webrender about new pipeline as early as possible.Josh Matthews2019-11-131-2/+16
|
* Ensure layout/script always have a correct viewport size when a new pipeline ↵Josh Matthews2019-11-061-23/+8
| | | | is created.
* dom: Calculate the viewport size of iframes when they are first added to the ↵Josh Matthews2019-11-061-0/+11
| | | | tree.
* Double key image cache by requesting origin, and store CORS status with ↵Josh Matthews2019-10-041-0/+1
| | | | cached images.
* style: Fix Servo build, and rustfmt recent changes.Emilio Cobos Álvarez2019-09-121-5/+6
|
* Replace DisplayList::is_contentful with tracking during conversion to WR ↵Simon Sapin2019-09-061-2/+2
| | | | display lists
* Replace the WebRenderDisplayItemConverter trait with an inherent methodSimon Sapin2019-09-061-1/+1
|
* restructure content process shutdown ack with threaded sender, without layoutGregory Terzian2019-08-171-5/+0
|
* Update euclid.Emilio Cobos Álvarez2019-07-231-14/+13
| | | | | | | | There are a few canvas2d-related dependencies that haven't updated, but they only use euclid internally so that's not blocking landing the rest of the changes. Given the size of this patch, I think it's useful to get this landed as-is.
* Create a solid rectangle display list entry for the page background.Josh Matthews2019-07-091-3/+8
|
* Stop storing display lists in an `Arc`Patrick Walton2019-07-091-7/+4
|
* WebRender units are no longer reexported.Patrick Walton2019-07-091-3/+4
|
* Upgrade to rustc 1.37.0-nightly (088b98730 2019-07-03)Josh Matthews2019-07-051-0/+3
|
* Fix some new warningsSimon Sapin2019-06-221-3/+3
|
* Layout_thread: removed all possible opts::get()oneturkmen2019-06-041-14/+107
|
* Flush shadow roots stylesheets only if they changedFernando Jiménez Moreno2019-04-261-7/+5
|
* Minor layout thread cleanups:Fernando Jiménez Moreno2019-04-261-2/+5
| | | | | | | - lifetime naming - unrequired reference removal - containing_shadow_host getter simplification - use stylist.device getter where possible
* Invalidate and flush shadow tree stylesheets where neededFernando Jiménez Moreno2019-04-261-1/+12
|
* fixup! Measure layout queries blocked by ongoing layoutpylbrecht2019-04-171-1/+1
|
* Measure layout queries blocked by ongoing layoutPhilipp Albrecht2019-04-131-3/+14
|
* #8539 Config preferences backend restructurePeter Hall2019-03-201-6/+2
|
* Auto merge of #22396 - jdm:no-spam-iframe-size, r=asajeffreybors-servo2019-01-141-5/+41
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce unnecessary iframe size messages This should be an improvement on pages that include iframes, since we currently run two layout jobs for every display-oriented layout request. When building the display list, we send a message to the constellation that includes the sizes of all iframes present, and the constellation sends resize messages to the script thread. This results in a mouse event on the outer page causing all frames to be re-laid out even if no changes occurred to the iframe sizes, which is ridiculous. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22394 - [x] These changes do not require tests because there is no way to test this internal detail. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22396) <!-- Reviewable:end -->
| * Suppress iframe size messages from layout that include unchanged sizes.Josh Matthews2019-01-141-5/+41
| |
* | Remove LayoutDamageComputationAnthony Ramine2019-01-141-1/+1
| |
* | Remove BlockFlowDisplayListBuildingAnthony Ramine2019-01-141-1/+1
| | | | | | | | Replaced by inherent methods on BlockFlow, the only implementor of that trait.