Auto merge of #16663 - emilio:style-builder, r=bholley

style: Add a StyleBuilder struct to avoid refcount and atomic CAS during the cascade.

This should fix most of the complaints that caused
https://bugzilla.mozilla.org/show_bug.cgi?id=1360889 to be open, and also fix a
bunch of other FIXMEs across the style system.

<!-- 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/16663)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-04-30 18:31:41 -05:00 committed by GitHub
commit bf0bf4f4b4
11 changed files with 279 additions and 120 deletions

View file

@ -478,7 +478,7 @@
SpecifiedValue::Keyword(v) => v,
SpecifiedValue::System(_) => {
% if product == "gecko":
_cx.style.cached_system_font.as_ref().unwrap().${to_rust_ident(name)}
_cx.cached_system_font.as_ref().unwrap().${to_rust_ident(name)}
% else:
unreachable!()
% endif