diff options
author | Josh Matthews <josh@joshmatthews.net> | 2017-01-04 12:36:11 -0500 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2017-01-04 12:42:12 -0500 |
commit | 9a264c8173501b2cbcc77895a1b66702fb69e5c6 (patch) | |
tree | 34b8d506935ebba3a69c1e69e8f7df75744b2139 /components/script/layout_wrapper.rs | |
parent | 1e927ca88bf6622d5a87db75863f76976a1df56c (diff) | |
download | servo-9a264c8173501b2cbcc77895a1b66702fb69e5c6.tar.gz servo-9a264c8173501b2cbcc77895a1b66702fb69e5c6.zip |
Only pass nodes to layout for restyling that are actually in the document.
Diffstat (limited to 'components/script/layout_wrapper.rs')
-rw-r--r-- | components/script/layout_wrapper.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs index 25150d60dfe..5576648b84d 100644 --- a/components/script/layout_wrapper.rs +++ b/components/script/layout_wrapper.rs @@ -37,7 +37,7 @@ use dom::bindings::js::LayoutJS; use dom::characterdata::LayoutCharacterDataHelpers; use dom::document::{Document, LayoutDocumentHelpers, PendingRestyle}; use dom::element::{Element, LayoutElementHelpers, RawLayoutElementHelpers}; -use dom::node::{CAN_BE_FRAGMENTED, DIRTY_ON_VIEWPORT_SIZE_CHANGE, HAS_DIRTY_DESCENDANTS}; +use dom::node::{CAN_BE_FRAGMENTED, DIRTY_ON_VIEWPORT_SIZE_CHANGE, HAS_DIRTY_DESCENDANTS, IS_IN_DOC}; use dom::node::{LayoutNodeHelpers, Node}; use dom::text::Text; use gfx_traits::ByteIndex; @@ -404,6 +404,7 @@ impl<'le> TElement for ServoLayoutElement<'le> { } unsafe fn set_dirty_descendants(&self) { + debug_assert!(self.as_node().node.get_flag(IS_IN_DOC)); self.as_node().node.set_flag(HAS_DIRTY_DESCENDANTS, true) } |