diff options
author | Jon Leighton <j@jonathanleighton.com> | 2018-01-27 21:30:24 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2018-01-28 10:59:45 +0100 |
commit | fe583fc5d0aa667b40ecddfb1cbff3c5f65649d7 (patch) | |
tree | 580d3aa22053fd2ddd99d0151f6515ad318e3c39 /components/script_layout_interface/message.rs | |
parent | c9ba16f9fbdf7f43cb19feedfaaa68c85bbcbe3b (diff) | |
download | servo-fe583fc5d0aa667b40ecddfb1cbff3c5f65649d7.tar.gz servo-fe583fc5d0aa667b40ecddfb1cbff3c5f65649d7.zip |
Add layout RPC query for getting an element's style
This enables us to implement Element::has_css_layout_box() in a more
direct way, and also enables us to remove some of the existing more
specific queries.
Fixes #19811.
Diffstat (limited to 'components/script_layout_interface/message.rs')
-rw-r--r-- | components/script_layout_interface/message.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/components/script_layout_interface/message.rs b/components/script_layout_interface/message.rs index 7a1cb7e5316..6f2ab91420d 100644 --- a/components/script_layout_interface/message.rs +++ b/components/script_layout_interface/message.rs @@ -113,13 +113,12 @@ pub enum ReflowGoal { TickAnimations, ContentBoxQuery(TrustedNodeAddress), ContentBoxesQuery(TrustedNodeAddress), - NodeOverflowQuery(TrustedNodeAddress), NodeScrollRootIdQuery(TrustedNodeAddress), NodeGeometryQuery(TrustedNodeAddress), NodeScrollGeometryQuery(TrustedNodeAddress), ResolvedStyleQuery(TrustedNodeAddress, Option<PseudoElement>, PropertyId), OffsetParentQuery(TrustedNodeAddress), - MarginStyleQuery(TrustedNodeAddress), + StyleQuery(TrustedNodeAddress), TextIndexQuery(TrustedNodeAddress, Point2D<f32>), NodesFromPointQuery(Point2D<f32>, NodesFromPointQueryType), } @@ -133,9 +132,9 @@ impl ReflowGoal { ReflowGoal::TickAnimations | ReflowGoal::Full => true, ReflowGoal::ContentBoxQuery(_) | ReflowGoal::ContentBoxesQuery(_) | ReflowGoal::NodeGeometryQuery(_) | ReflowGoal::NodeScrollGeometryQuery(_) | - ReflowGoal::NodeOverflowQuery(_) | ReflowGoal::NodeScrollRootIdQuery(_) | + ReflowGoal::NodeScrollRootIdQuery(_) | ReflowGoal::ResolvedStyleQuery(..) | ReflowGoal::OffsetParentQuery(_) | - ReflowGoal::MarginStyleQuery(_) => false, + ReflowGoal::StyleQuery(_) => false, } } @@ -143,10 +142,10 @@ impl ReflowGoal { /// false if a layout_thread display list is sufficient. pub fn needs_display(&self) -> bool { match *self { - ReflowGoal::MarginStyleQuery(_) | ReflowGoal::TextIndexQuery(..) | + ReflowGoal::StyleQuery(_) | ReflowGoal::TextIndexQuery(..) | ReflowGoal::ContentBoxQuery(_) | ReflowGoal::ContentBoxesQuery(_) | ReflowGoal::NodeGeometryQuery(_) | ReflowGoal::NodeScrollGeometryQuery(_) | - ReflowGoal::NodeOverflowQuery(_) | ReflowGoal::NodeScrollRootIdQuery(_) | + ReflowGoal::NodeScrollRootIdQuery(_) | ReflowGoal::ResolvedStyleQuery(..) | ReflowGoal::OffsetParentQuery(_) => false, ReflowGoal::NodesFromPointQuery(..) | ReflowGoal::Full | |