style: Replicate the list of stylesheets on the layout thread.

This is a patch that unifies a bit how Gecko and Stylo stylesheets work, in
order to be able to eventually move the stylesheets into the stylist, and be
able to incrementally update the invalidation map.
This commit is contained in:
Emilio Cobos Álvarez 2017-08-16 15:46:17 +02:00
parent b8159e659e
commit d1725b1f19
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
14 changed files with 413 additions and 198 deletions

View file

@ -1240,7 +1240,8 @@ impl Window {
}
let document = self.Document();
let stylesheets_changed = document.get_and_reset_stylesheets_changed_since_reflow();
let stylesheets_changed = document.flush_stylesheets_for_reflow();
// Send new document and relevant styles to layout.
let reflow = ScriptReflow {
@ -1249,11 +1250,10 @@ impl Window {
page_clip_rect: self.page_clip_rect.get(),
},
document: self.Document().upcast::<Node>().to_trusted_node_address(),
document_stylesheets: document.stylesheets(),
stylesheets_changed: stylesheets_changed,
window_size: window_size,
stylesheets_changed,
window_size,
query_type,
script_join_chan: join_chan,
query_type: query_type,
dom_count: self.Document().dom_count(),
};