aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_thread_2020
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove some unused dependency declarationsSimon Sapin2020-05-291-2/+0
| | | | | | This is based on compiling with `RUSTFLAGS="-W unused_crate_dependencies"` (CC https://github.com/rust-lang/rust/pull/72342) in a recent Nightly (more so than used in the tree as of this writing, CC https://github.com/servo/servo/issues/26661 for work-arounds). Only one crate is actually removed from the dependency graph, others are still dependended from other places.
* Remove use of nightly features in parking_lot. Update many uses from 0.9 to ↵Josh Matthews2020-05-261-1/+1
| | | | 0.10.
* Auto merge of #26484 - servo:layout-2020-style-prep, r=SimonSapinbors-servo2020-05-192-13/+15
|\ | | | | | | Implement concept of dirty root
| * Implement concept of dirty rootAnthony Ramine2020-05-191-12/+11
| |
| * Print element name when panicking in ThreadSafeLayoutElement::style_dataAnthony Ramine2020-05-181-1/+4
| |
* | layout_2020: Add support for transitions and animationsMartin Robinson2020-05-191-4/+36
|/
* Auto merge of #26414 - servo:canvas-background2, r=mrobinsonbors-servo2020-05-151-24/+19
|\ | | | | | | | | | | | | | | | | | | Correctly paint the CSS canvas’ background https://drafts.csswg.org/css-backgrounds/#special-backgrounds Fixes https://github.com/servo/servo/issues/25559 Closes https://github.com/servo/servo/pull/26121, as it is an alternative. Fixes https://github.com/servo/servo/issues/26444.
| * Correctly paint the CSS canvas’ backgroundSimon Sapin2020-05-151-5/+2
| | | | | | | | | | | | | | https://drafts.csswg.org/css-backgrounds/#special-backgrounds Fixes https://github.com/servo/servo/issues/25559 Closes https://github.com/servo/servo/pull/26121, as it is an alternative.
| * Rename BoxTreeRoot/FragmentTreeRoot to BoxTree/FragmentTreeSimon Sapin2020-05-151-19/+17
| |
* | Auto merge of #26526 - atouchet:crgo, r=jdmbors-servo2020-05-151-23/+23
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More Cargo.toml cleanups <!-- 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: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] 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. -->
| * More Cargo.toml cleanupsAlex Touchet2020-05-141-23/+23
| |
* | layout_2020: Fix WebRender display list dumpingMartin Robinson2020-05-151-4/+8
|/ | | | | We need to enable display list serialization before building the display list for it to work properly.
* Move most animation processing to scriptMartin Robinson2020-05-121-4/+0
| | | | | | | 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.
* layout_2020: Add initial support for getComputedStyleMartin Robinson2020-05-111-2/+8
| | | | | | | This implementation is more-or-less on par with the one from layout_2013 and in some cases better. There are still some cases where we don't return the correct "resolved value," but this is enough to test animations and transitions.
* 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-69/+11
| | | | | | | | | | | | | | 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 ElementAnimationState and PossibleElementAnimationStateMartin Robinson2020-04-241-23/+5
| | | | | | | | | | | | 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/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* Some servo build fixes.Emilio Cobos Álvarez2020-04-161-9/+0
|
* Don't go through the layout thread to retrieve a node's primary styleAnthony Ramine2020-04-071-11/+4
|
* Replace OpaqueStyleAndLayoutData by StyleAndOpaqueLayoutDataAnthony Ramine2020-04-061-31/+30
|
* Rename a bunch of style/layout data itemsAnthony Ramine2020-04-061-25/+25
| | | | | | | | | | | | | GetLayoutData::get_style_and_layout_data becomes GetOpaqueStyleAndLayoutData::get_opaque_style_and_layout_data. GetRawData::get_raw_data becomes GetStyleAndLayoutData::get_style_and_layout_data. LayoutNode::init_style_and_layout_data becomes LayoutNode::init_opaque_style_and_layout_data. LayoutNode::take_style_and_layout_data becomes LayoutNode::take_opaque_style_and_layout_data.
* Auto merge of #26110 - servo:layout-2020-rm-note-dirty-descendant, r=emiliobors-servo2020-04-042-23/+0
|\ | | | | | | Kill ServoLayoutElement::note_dirty_descendant
| * Kill ServoLayoutElement::note_dirty_descendantAnthony Ramine2020-04-042-23/+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-042-23/+11
| | | | | | | | The previous Cell was a lie.
* | Don't expose any AtomicRefCell directly from style traitsAnthony Ramine2020-04-042-12/+19
| | | | | | | | This lets us experiment with how we store this data on the DOM side.
* | Make OpaqueLayoutAndStyleData just a bit less opaqueAnthony Ramine2020-04-041-16/+9
|/ | | | It now stores a NonNull<dyn Any>.
* Make LayoutShadowRootHelpers::get_style_data_for_layout return a &CascadeDataAnthony Ramine2020-04-011-1/+1
| | | | That return type is Sync, which thus means that the method can be safe.
* Make synthesize_presentational_hints_for_legacy_attributes be safeAnthony Ramine2020-04-011-4/+2
|
* Make LayoutDocumentHelpers::style_shared_lock be safeAnthony Ramine2020-04-011-1/+1
| | | | StyleSharedRwLock is Sync.
* Make LayoutNodeHelpers::composed_parent_node_ref be safeAnthony Ramine2020-04-011-11/+7
| | | | | | For clarity, I introduce <LayoutDom<Element>>::parent_node_ref to contain the remaining unsafety bits out of composed_parent_node_ref which is more complex than just a field access.
* Make LayoutShadowRootHelpers::get_host_for_layout be safeAnthony Ramine2020-03-311-1/+1
|
* Make a bunch of LayoutNodeHelpers be safeAnthony Ramine2020-03-311-6/+6
|
* Introduce LayoutDom::isAnthony Ramine2020-03-311-1/+1
| | | | Just like Castable::is.
* Make layout methods accessing rare data be safeAnthony Ramine2020-03-311-11/+7
| | | | | | They don't do anything fancy so there is no additional unsafety calling them compared to using LayoutDom in the first place, the usual story of all those changes.
* Make a bunch of LayoutDocumentHelpers be safeAnthony Ramine2020-03-311-2/+2
| | | | The other methods are actually unsafe.
* Make a bunch or trivial LayoutElementHelpers safeAnthony Ramine2020-03-311-6/+4
|
* Introduce <LayoutDom<Element>>::attrs()Anthony Ramine2020-03-311-30/+24
| | | | | | This safe method is the basic block to access element attributes from layout. We reuse it in the other attr-related layout methods to remove a pretty big source of rampant unsafe code between script and layout.
* Merge RawLayoutElementHelpers into LayoutElementHelpersAnthony Ramine2020-03-311-10/+8
|
* Make LayoutNodeHelpers::text_content return a cowAnthony Ramine2020-03-311-3/+3
|
* Make LayoutCharacterDataHelpers::data_for_layout be safeAnthony Ramine2020-03-311-1/+1
|
* Clean up LayoutShadowRootHelpers::get_style_data_for_layoutAnthony Ramine2020-03-301-6/+1
| | | | Parameter E is unused and the result should be bound by 'dom.
* Give a lifetime parameter to LayoutDomAnthony Ramine2020-03-281-85/+31
|
* Pass pending restyles instead of draining them from layoutAnthony Ramine2020-03-282-11/+5
|
* Make ServoLayoutNode::new return a free lifetime valueAnthony Ramine2020-03-281-1/+1
| | | | | Binding the scope of the ServoLayoutNode value to the originating TrustedNodeAddress is just theater.
* Move PendingRestyle to the style_layout_interface crateAnthony Ramine2020-03-281-1/+1
|
* Add a 'dom lifetime to GetLayoutDataAnthony Ramine2020-03-261-13/+13
|
* Remove syn 0.15 from our crate graph (fixes #24421)Anthony Ramine2020-03-051-1/+1
| | | | | | | | | | This required bumps of: * gleam * image * rust-webvr * webrender * webxr