diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2015-12-17 16:21:29 -0800 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2015-12-29 11:50:03 -0800 |
commit | 47059d2d26f14f71e5b7212fa8bc01608eca11b5 (patch) | |
tree | d0693fb9987a7113323c7d6fb5502cb5621d8f15 /components/style/selector_matching.rs | |
parent | 89ab368258eb827b0dcc8d6e6deecd3ed3c1de71 (diff) | |
download | servo-47059d2d26f14f71e5b7212fa8bc01608eca11b5.tar.gz servo-47059d2d26f14f71e5b7212fa8bc01608eca11b5.zip |
Separate style+layout and layout-specific wrapper functionality.
This patch does a number of things, unfortunately all at once:
* Hoists a large subset of the layout wrapper functionality into the style system.
* Merges TElementAttributes into the newly-created TElement.
* Reorganizes LayoutData by style vs layout, and removes LayoutDataShared.
* Simplifies the API for borrowing style/layout data.
There's still more to do to make the style system usable standalone, but
this is a good start.
Diffstat (limited to 'components/style/selector_matching.rs')
-rw-r--r-- | components/style/selector_matching.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/style/selector_matching.rs b/components/style/selector_matching.rs index 4dae08ce9bd..dd99a3f26b4 100644 --- a/components/style/selector_matching.rs +++ b/components/style/selector_matching.rs @@ -3,11 +3,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use cssparser::{Parser, SourcePosition}; +use dom::TElement; use log; use media_queries::{Device, MediaType}; use msg::ParseErrorReporter; use msg::constellation_msg::PipelineId; -use node::TElementAttributes; use properties::{PropertyDeclaration, PropertyDeclarationBlock}; use restyle_hints::{ElementSnapshot, RestyleHint, DependencySet}; use selectors::Element; @@ -270,7 +270,7 @@ impl Stylist { /// The returned boolean indicates whether the style is *shareable*; that is, whether the /// matched selectors are simple enough to allow the matching logic to be reduced to the logic /// in `css::matching::PrivateMatchMethods::candidate_element_allows_for_style_sharing`. - pub fn push_applicable_declarations<E, V>( + pub fn push_applicable_declarations<'le, E, V>( &self, element: &E, parent_bf: Option<&BloomFilter>, @@ -278,7 +278,7 @@ impl Stylist { pseudo_element: Option<PseudoElement>, applicable_declarations: &mut V) -> bool - where E: Element + TElementAttributes, + where E: Element + TElement<'le>, V: VecLike<DeclarationBlock> { assert!(!self.is_device_dirty); assert!(style_attribute.is_none() || pseudo_element.is_none(), |