diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-03-13 14:05:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-13 14:05:48 -0700 |
commit | 35028f8f60d172a6bde8133ebe26e887eb33d9e6 (patch) | |
tree | 1317a9c549e19c376162b6c40431a7bc4fd7425b | |
parent | 7db36abf67a1e300fb2b58f2b4543ebd1c591eeb (diff) | |
parent | 9c0424cca4019d0a07271fe986596b4164c03226 (diff) | |
download | servo-35028f8f60d172a6bde8133ebe26e887eb33d9e6.tar.gz servo-35028f8f60d172a6bde8133ebe26e887eb33d9e6.zip |
Auto merge of #15930 - emilio:default-indirection, r=mbrubeck
style: Remove unneeded indirection in default_computed_values.
<!-- 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/15930)
<!-- Reviewable:end -->
-rw-r--r-- | components/style/properties/helpers.mako.rs | 2 | ||||
-rw-r--r-- | components/style/properties/properties.mako.rs | 8 | ||||
-rw-r--r-- | components/style/stylist.rs | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/components/style/properties/helpers.mako.rs b/components/style/properties/helpers.mako.rs index e2f182e3fcb..cd88ae26a86 100644 --- a/components/style/properties/helpers.mako.rs +++ b/components/style/properties/helpers.mako.rs @@ -229,7 +229,7 @@ #[allow(unused_variables)] pub fn cascade_property(declaration: &PropertyDeclaration, inherited_style: &ComputedValues, - default_style: &Arc<ComputedValues>, + default_style: &ComputedValues, context: &mut computed::Context, cacheable: &mut bool, cascade_info: &mut Option<<&mut CascadeInfo>, diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index b8153417a78..656b2b9294c 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -1760,7 +1760,7 @@ mod lazy_static_module { pub type CascadePropertyFn = extern "Rust" fn(declaration: &PropertyDeclaration, inherited_style: &ComputedValues, - default_style: &Arc<ComputedValues>, + default_style: &ComputedValues, context: &mut computed::Context, cacheable: &mut bool, cascade_info: &mut Option<<&mut CascadeInfo>, @@ -1807,7 +1807,7 @@ pub fn cascade(viewport_size: Size2D<Au>, rule_node: &StrongRuleNode, parent_style: Option<<&ComputedValues>, layout_parent_style: Option<<&ComputedValues>, - default_style: &Arc<ComputedValues>, + default_style: &ComputedValues, cascade_info: Option<<&mut CascadeInfo>, error_reporter: StdBox<ParseErrorReporter + Send>, flags: CascadeFlags) @@ -1815,7 +1815,7 @@ pub fn cascade(viewport_size: Size2D<Au>, debug_assert_eq!(parent_style.is_some(), layout_parent_style.is_some()); let (is_root_element, inherited_style, layout_parent_style) = match parent_style { Some(parent_style) => (false, parent_style, layout_parent_style.unwrap()), - None => (true, &**default_style, &**default_style), + None => (true, &*default_style, &*default_style), }; // Hold locks until after the apply_declarations() call returns. // Use filter_map because the root node has no style source. @@ -1855,7 +1855,7 @@ pub fn apply_declarations<'a, F, I>(viewport_size: Size2D<Au>, iter_declarations: F, inherited_style: &ComputedValues, layout_parent_style: &ComputedValues, - default_style: &Arc<ComputedValues>, + default_style: &ComputedValues, mut cascade_info: Option<<&mut CascadeInfo>, mut error_reporter: StdBox<ParseErrorReporter + Send>, font_metrics_provider: Option<<&FontMetricsProvider>, diff --git a/components/style/stylist.rs b/components/style/stylist.rs index d75963b011b..61b9826f8d0 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -295,7 +295,7 @@ impl Stylist { pub fn precomputed_values_for_pseudo(&self, pseudo: &PseudoElement, parent: Option<&Arc<ComputedValues>>, - default: &Arc<ComputedValues>, + default: &ComputedValues, cascade_flags: CascadeFlags) -> ComputedStyle { debug_assert!(SelectorImpl::pseudo_element_cascade_type(pseudo).is_precomputed()); @@ -341,7 +341,7 @@ impl Stylist { pub fn style_for_anonymous_box(&self, pseudo: &PseudoElement, parent_style: &Arc<ComputedValues>, - default_style: &Arc<ComputedValues>) + default_style: &ComputedValues) -> Arc<ComputedValues> { // For most (but not all) pseudo-elements, we inherit all values from the parent. let inherit_all = match *pseudo { |