Disable incremental reflow for multicol and their descendants.

Fragmentation with dynamic updates is hard.
This commit is contained in:
Simon Sapin 2015-09-18 15:27:08 +02:00
parent 357463864b
commit da2b4ab381
6 changed files with 41 additions and 1 deletions

View file

@ -50,7 +50,7 @@ use script::dom::htmlimageelement::LayoutHTMLImageElementHelpers;
use script::dom::htmlinputelement::{HTMLInputElement, LayoutHTMLInputElementHelpers};
use script::dom::htmltextareaelement::{HTMLTextAreaElement, LayoutHTMLTextAreaElementHelpers};
use script::dom::node::{HAS_CHANGED, HAS_DIRTY_DESCENDANTS, IS_DIRTY};
use script::dom::node::{LayoutNodeHelpers, Node, OpaqueStyleAndLayoutData};
use script::dom::node::{IN_FRAGMENTATION_CONTAINER, LayoutNodeHelpers, Node, OpaqueStyleAndLayoutData};
use script::dom::text::Text;
use script::layout_interface::TrustedNodeAddress;
use selectors::matching::DeclarationBlock;
@ -226,6 +226,14 @@ impl<'ln> TNode<'ln> for ServoLayoutNode<'ln> {
self.node.set_flag(HAS_DIRTY_DESCENDANTS, value)
}
fn in_fragmentation_container(&self) -> bool {
unsafe { self.node.get_flag(IN_FRAGMENTATION_CONTAINER) }
}
unsafe fn set_in_fragmentation_container(&self, value: bool) {
self.node.set_flag(IN_FRAGMENTATION_CONTAINER, value)
}
unsafe fn borrow_data_unchecked(&self) -> Option<*const PrivateStyleData> {
self.borrow_layout_data_unchecked().map(|d| &(*d).style_data as *const PrivateStyleData)
}
@ -753,6 +761,8 @@ pub trait ThreadSafeLayoutNode<'ln> : Clone + Copy + Sized {
}
}
fn in_fragmentation_container(&self) -> bool;
/// If this is a text node, generated content, or a form element, copies out
/// its content. Otherwise, panics.
///
@ -929,6 +939,10 @@ impl<'ln> ThreadSafeLayoutNode<'ln> for ServoThreadSafeLayoutNode<'ln> {
}
}
fn in_fragmentation_container(&self) -> bool {
self.node.in_fragmentation_container()
}
fn text_content(&self) -> TextContent {
if self.pseudo != PseudoElementType::Normal {
let data = &self.borrow_layout_data().unwrap().style_data;