style: Massage the resolver code so it's cleaner and prevents the problem.

This way all the borrows stay in the sharing code, and prevents an extra borrow
on a cache hit, which is not a big deal but nice.
This commit is contained in:
Emilio Cobos Álvarez 2017-09-18 03:21:39 +02:00
parent 36fed07b1c
commit 891bc7d174
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
6 changed files with 119 additions and 119 deletions

View file

@ -158,7 +158,7 @@ trait PrivateMatchMethods: TElement {
StyleResolverForElement::new(*self, context, RuleInclusion::All, PseudoElementResolution::IfApplicable)
.cascade_style_and_visited_with_default_parents(inputs);
Some(style.into())
Some(style.0)
}
#[cfg(feature = "gecko")]
@ -542,7 +542,7 @@ pub trait MatchMethods : TElement {
self.process_animations(
context,
&mut data.styles.primary,
&mut new_styles.primary.0.style,
&mut new_styles.primary.style.0,
data.hint,
important_rules_changed,
);