Auto merge of #18547 - emilio:self-sharing, r=heycam

style: Resolver cleanup and sharing by rule node fixes.

See the individual commits for details.

This is the only coherent story I have for crashes like:

  https://crash-stats.mozilla.com/report/index/bcdfe629-ca1f-4e4d-aa17-27f890170917

(And the fact that there are crashes like it on the main thread kinda indicates it's the case)

<!-- 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/18547)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-09-17 21:58:06 -05:00 committed by GitHub
commit 2387dbedbb
6 changed files with 122 additions and 118 deletions

View file

@ -731,11 +731,9 @@ pub extern "C" fn Servo_StyleSet_GetBaseComputedValuesForElement(raw_data: RawSe
};
// Actually `PseudoElementResolution` doesn't matter.
let style: Arc<ComputedValues> =
StyleResolverForElement::new(element, &mut context, RuleInclusion::All, PseudoElementResolution::IfApplicable)
StyleResolverForElement::new(element, &mut context, RuleInclusion::All, PseudoElementResolution::IfApplicable)
.cascade_style_and_visited_with_default_parents(inputs)
.into();
style.into()
.0.into()
}
#[no_mangle]