mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: Remove TNode::set_can_be_fragmented and TNode::can_be_fragmented.
Replace them instead by a computed value flag, the same way as the IS_IN_DISPLAY_NONE_SUBTREE flag works.
This commit is contained in:
parent
10a1e1e15f
commit
f3ea248188
13 changed files with 46 additions and 81 deletions
|
@ -209,17 +209,9 @@ impl<'ln> TNode for ServoLayoutNode<'ln> {
|
|||
self.node.downcast().map(ServoLayoutDocument::from_layout_js)
|
||||
}
|
||||
|
||||
fn can_be_fragmented(&self) -> bool {
|
||||
unsafe { self.node.get_flag(NodeFlags::CAN_BE_FRAGMENTED) }
|
||||
}
|
||||
|
||||
fn is_in_document(&self) -> bool {
|
||||
unsafe { self.node.get_flag(NodeFlags::IS_IN_DOC) }
|
||||
}
|
||||
|
||||
unsafe fn set_can_be_fragmented(&self, value: bool) {
|
||||
self.node.set_flag(NodeFlags::CAN_BE_FRAGMENTED, value)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ln> LayoutNode for ServoLayoutNode<'ln> {
|
||||
|
@ -930,10 +922,6 @@ impl<'ln> ThreadSafeLayoutNode for ServoThreadSafeLayoutNode<'ln> {
|
|||
self.node
|
||||
}
|
||||
|
||||
fn can_be_fragmented(&self) -> bool {
|
||||
self.node.can_be_fragmented()
|
||||
}
|
||||
|
||||
fn node_text_content(&self) -> String {
|
||||
let this = unsafe { self.get_jsmanaged() };
|
||||
return this.text_content();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue