mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Only pass nodes to layout for restyling that are actually in the document.
This commit is contained in:
parent
1e927ca88b
commit
9a264c8173
5 changed files with 49 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue