From a3c13d8a4031fb7e9bcabfd84d37082118deb9ff Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Mon, 30 Mar 2015 11:03:54 -0400 Subject: [PATCH] Make reflow queries always perform reflow. Fixes #5458. --- components/script/dom/window.rs | 2 +- components/script/layout_interface.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 675af64d5cb..f4580822114 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 9b7e3a292ea..ab294e09436 100644 --- a/components/script/layout_interface.rs +++ b/components/script/layout_interface.rs @@ -92,6 +92,7 @@ pub enum ReflowGoal { } /// Any query to perform with this reflow. +#[derive(PartialEq)] pub enum ReflowQueryType { NoQuery, ContentBoxQuery(TrustedNodeAddress),