mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
auto merge of #3640 : cgaebel/servo/incremental-flow-construction, r=pcwalton
This also hides the not-yet-working parts of incremental reflow behind a runtime flag. As I get the failing reftests passing, I'll send pull requests for them one by one.
This commit is contained in:
commit
56989b8dec
13 changed files with 310 additions and 82 deletions
|
@ -49,7 +49,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};
|
||||
|
@ -267,6 +267,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) }
|
||||
}
|
||||
|
@ -668,6 +689,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