mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
try to reset flows which need reflow, since reflow isn't yet idempotent
This commit is contained in:
parent
d168501555
commit
f552e2f750
13 changed files with 310 additions and 82 deletions
|
@ -48,7 +48,7 @@ use script::dom::htmlimageelement::{HTMLImageElement, LayoutHTMLImageElementHelp
|
|||
use script::dom::htmlinputelement::{HTMLInputElement, LayoutHTMLInputElementHelpers};
|
||||
use script::dom::node::{DocumentNodeTypeId, ElementNodeTypeId, Node, NodeTypeId};
|
||||
use script::dom::node::{LayoutNodeHelpers, RawLayoutNodeHelpers, SharedLayoutData, TextNodeTypeId};
|
||||
use script::dom::node::{IsDirty, HasDirtyDescendants};
|
||||
use script::dom::node::{HasChanged, IsDirty, HasDirtySiblings, HasDirtyDescendants};
|
||||
use script::dom::text::Text;
|
||||
use script::layout_interface::LayoutChan;
|
||||
use servo_msg::constellation_msg::{PipelineId, SubpageId};
|
||||
|
@ -266,6 +266,11 @@ impl<'ln> LayoutNode<'ln> {
|
|||
self.parent_node()
|
||||
}
|
||||
}
|
||||
|
||||
pub fn debug_id(self) -> uint {
|
||||
let opaque: OpaqueNode = OpaqueNodeMethods::from_layout_node(&self);
|
||||
opaque.to_untrusted_node_address() as uint
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ln> TNode<'ln, LayoutElement<'ln>> for LayoutNode<'ln> {
|
||||
|
@ -343,6 +348,14 @@ impl<'ln> TNode<'ln, LayoutElement<'ln>> for LayoutNode<'ln> {
|
|||
}
|
||||
}
|
||||
|
||||
fn has_changed(self) -> bool {
|
||||
unsafe { self.node.get_flag(HasChanged) }
|
||||
}
|
||||
|
||||
unsafe fn set_changed(self, value: bool) {
|
||||
self.node.set_flag(HasChanged, value)
|
||||
}
|
||||
|
||||
fn is_dirty(self) -> bool {
|
||||
unsafe { self.node.get_flag(IsDirty) }
|
||||
}
|
||||
|
@ -351,6 +364,14 @@ impl<'ln> TNode<'ln, LayoutElement<'ln>> for LayoutNode<'ln> {
|
|||
self.node.set_flag(IsDirty, value)
|
||||
}
|
||||
|
||||
fn has_dirty_siblings(self) -> bool {
|
||||
unsafe { self.node.get_flag(HasDirtySiblings) }
|
||||
}
|
||||
|
||||
unsafe fn set_dirty_siblings(self, value: bool) {
|
||||
self.node.set_flag(HasDirtySiblings, value);
|
||||
}
|
||||
|
||||
fn has_dirty_descendants(self) -> bool {
|
||||
unsafe { self.node.get_flag(HasDirtyDescendants) }
|
||||
}
|
||||
|
@ -648,6 +669,10 @@ impl<'ln> ThreadSafeLayoutNode<'ln> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn debug_id(self) -> uint {
|
||||
self.node.debug_id()
|
||||
}
|
||||
|
||||
/// Returns the next sibling of this node. Unsafe and private because this can lead to races.
|
||||
unsafe fn next_sibling(&self) -> Option<ThreadSafeLayoutNode<'ln>> {
|
||||
if self.pseudo.is_before() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue