diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 08e526df282..4c7f6c107fa 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -537,7 +537,7 @@ impl<'a> WindowHelpers for JSRef<'a, Window> { debug!("script: performing reflow for goal {:?}", goal); let root: JSRef = NodeCast::from_ref(root); - if !root.get_has_dirty_descendants() { + if query_type == ReflowQueryType::NoQuery && !root.get_has_dirty_descendants() { debug!("root has no dirty descendants; avoiding reflow"); return } diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs index a0062a287b6..e0671763b13 100644 --- a/components/script/layout_interface.rs +++ b/components/script/layout_interface.rs @@ -97,6 +97,7 @@ pub enum ReflowGoal { } /// Any query to perform with this reflow. +#[derive(PartialEq)] pub enum ReflowQueryType { NoQuery, ContentBoxQuery(TrustedNodeAddress),