diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-08-16 15:46:17 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-08-18 14:31:35 +0200 |
commit | d1725b1f195652bf947d5ce00622807597bc0b9c (patch) | |
tree | 5c0416212d033bcbbf19574134ff7fc74531a17a /components/script_layout_interface/message.rs | |
parent | b8159e659e787c1e792d13b0939bb88e978ae84e (diff) | |
download | servo-d1725b1f195652bf947d5ce00622807597bc0b9c.tar.gz servo-d1725b1f195652bf947d5ce00622807597bc0b9c.zip |
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.
Diffstat (limited to 'components/script_layout_interface/message.rs')
-rw-r--r-- | components/script_layout_interface/message.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/components/script_layout_interface/message.rs b/components/script_layout_interface/message.rs index e74447ade26..91963bce226 100644 --- a/components/script_layout_interface/message.rs +++ b/components/script_layout_interface/message.rs @@ -27,8 +27,13 @@ use style::stylesheets::Stylesheet; /// Asynchronous messages that script can send to layout. pub enum Msg { - /// Adds the given stylesheet to the document. - AddStylesheet(ServoArc<Stylesheet>), + /// Adds the given stylesheet to the document. The second stylesheet is the + /// insertion point (if it exists, the sheet needs to be inserted before + /// it). + AddStylesheet(ServoArc<Stylesheet>, Option<ServoArc<Stylesheet>>), + + /// Removes a stylesheet from the document. + RemoveStylesheet(ServoArc<Stylesheet>), /// Change the quirks mode. SetQuirksMode(QuirksMode), @@ -137,8 +142,6 @@ pub struct ScriptReflow { pub reflow_info: Reflow, /// The document node. pub document: TrustedNodeAddress, - /// The document's list of stylesheets. - pub document_stylesheets: Vec<ServoArc<Stylesheet>>, /// Whether the document's stylesheets have changed since the last script reflow. pub stylesheets_changed: bool, /// The current window size. |