From d1725b1f195652bf947d5ce00622807597bc0b9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 16 Aug 2017 15:46:17 +0200 Subject: 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. --- components/script_layout_interface/message.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'components/script_layout_interface/message.rs') 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), + /// 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, Option>), + + /// Removes a stylesheet from the document. + RemoveStylesheet(ServoArc), /// 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>, /// Whether the document's stylesheets have changed since the last script reflow. pub stylesheets_changed: bool, /// The current window size. -- cgit v1.2.3