Auto merge of #14232 - servo:moar-locks, r=upsuper

CSSOM: Make Stylesheet fields have their own synchronization

<!-- Please describe your changes on the following line: -->

r? @upsuper

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix bug 1314208.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/14232)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-11-21 19:33:57 -06:00 committed by GitHub
commit 30867001d1
12 changed files with 56 additions and 56 deletions

View file

@ -1060,7 +1060,7 @@ impl LayoutThread {
.send(ConstellationMsg::ViewportConstrained(self.id, constraints))
.unwrap();
}
if data.document_stylesheets.iter().any(|sheet| sheet.dirty_on_viewport_size_change) {
if data.document_stylesheets.iter().any(|sheet| sheet.dirty_on_viewport_size_change()) {
let mut iter = node.traverse_preorder();
let mut next = iter.next();
@ -1533,6 +1533,7 @@ fn get_ua_stylesheets() -> Result<UserAgentStylesheets, &'static str> {
None,
None,
Origin::UserAgent,
Default::default(),
Box::new(StdoutErrorReporter),
ParserContextExtraData::default()))
}
@ -1545,8 +1546,8 @@ fn get_ua_stylesheets() -> Result<UserAgentStylesheets, &'static str> {
}
for &(ref contents, ref url) in &opts::get().user_stylesheets {
user_or_user_agent_stylesheets.push(Stylesheet::from_bytes(
&contents, url.clone(), None, None, Origin::User, Box::new(StdoutErrorReporter),
ParserContextExtraData::default()));
&contents, url.clone(), None, None, Origin::User, Default::default(),
Box::new(StdoutErrorReporter), ParserContextExtraData::default()));
}
let quirks_mode_stylesheet = try!(parse_ua_stylesheet("quirks-mode.css"));