diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/script_layout_interface/wrapper_traits.rs | 4 | ||||
-rw-r--r-- | components/style/gecko_bindings/bindings.rs | 1 | ||||
-rw-r--r-- | components/style/stylist.rs | 19 |
3 files changed, 13 insertions, 11 deletions
diff --git a/components/script_layout_interface/wrapper_traits.rs b/components/script_layout_interface/wrapper_traits.rs index 5930538eac2..d8768384245 100644 --- a/components/script_layout_interface/wrapper_traits.rs +++ b/components/script_layout_interface/wrapper_traits.rs @@ -21,7 +21,7 @@ use style::context::SharedStyleContext; use style::data::ElementData; use style::dom::{LayoutIterator, NodeInfo, PresentationalHintsSynthetizer, TNode}; use style::dom::OpaqueNode; -use style::properties::ServoComputedValues; +use style::properties::{CascadeFlags, ServoComputedValues}; use style::selector_parser::{PseudoElement, PseudoElementCascadeType, SelectorImpl}; #[derive(Copy, PartialEq, Clone, Debug)] @@ -408,7 +408,7 @@ pub trait ThreadSafeLayoutElement: Clone + Copy + Sized + Debug + &style_pseudo, Some(data.styles().primary.values()), &context.default_computed_values, - false); + CascadeFlags::empty()); data.styles_mut().pseudos .insert(style_pseudo.clone(), new_style); } diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs index 2a92156fee4..e3faed75b5a 100644 --- a/components/style/gecko_bindings/bindings.rs +++ b/components/style/gecko_bindings/bindings.rs @@ -1666,6 +1666,7 @@ extern "C" { pub fn Servo_ComputedValues_GetForAnonymousBox(parent_style_or_null: ServoComputedValuesBorrowedOrNull, pseudoTag: *mut nsIAtom, + skip_display_fixup: bool, set: RawServoStyleSetBorrowed) -> ServoComputedValuesStrong; diff --git a/components/style/stylist.rs b/components/style/stylist.rs index 5f7aef1666f..d75963b011b 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -14,7 +14,9 @@ use keyframes::KeyframesAnimation; use media_queries::Device; use parking_lot::RwLock; use pdqsort::sort_by; -use properties::{self, CascadeFlags, ComputedValues, INHERIT_ALL}; +use properties::{self, CascadeFlags, ComputedValues}; +#[cfg(feature = "servo")] +use properties::INHERIT_ALL; use properties::PropertyDeclarationBlock; use restyle_hints::{RestyleHint, DependencySet}; use rule_tree::{CascadeLevel, RuleTree, StrongRuleNode, StyleSource}; @@ -294,7 +296,7 @@ impl Stylist { pseudo: &PseudoElement, parent: Option<&Arc<ComputedValues>>, default: &Arc<ComputedValues>, - inherit_all: bool) + cascade_flags: CascadeFlags) -> ComputedStyle { debug_assert!(SelectorImpl::pseudo_element_cascade_type(pseudo).is_precomputed()); @@ -308,11 +310,6 @@ impl Stylist { None => self.rule_tree.root(), }; - let mut flags = CascadeFlags::empty(); - if inherit_all { - flags.insert(INHERIT_ALL) - } - // NOTE(emilio): We skip calculating the proper layout parent style // here. // @@ -335,7 +332,7 @@ impl Stylist { default, None, Box::new(StdoutErrorReporter), - flags); + cascade_flags); ComputedStyle::new(rule_node, Arc::new(computed)) } @@ -363,7 +360,11 @@ impl Stylist { unreachable!("That pseudo doesn't represent an anonymous box!") } }; - self.precomputed_values_for_pseudo(&pseudo, Some(parent_style), default_style, inherit_all) + let mut cascade_flags = CascadeFlags::empty(); + if inherit_all { + cascade_flags.insert(INHERIT_ALL); + } + self.precomputed_values_for_pseudo(&pseudo, Some(parent_style), default_style, cascade_flags) .values.unwrap() } |