mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Eliminate HAS_CHANGED in favor of explicit RestyleDamage.
This commit is contained in:
parent
f1043f6305
commit
b31ed2298c
5 changed files with 18 additions and 36 deletions
|
@ -143,8 +143,6 @@ bitflags! {
|
|||
pub flags NodeFlags: u8 {
|
||||
#[doc = "Specifies whether this node is in a document."]
|
||||
const IS_IN_DOC = 0x01,
|
||||
#[doc = "Specifies whether this node _must_ be reflowed regardless of style differences."]
|
||||
const HAS_CHANGED = 0x02,
|
||||
#[doc = "Specifies whether this node needs style recalc on next reflow."]
|
||||
const IS_DIRTY = 0x04,
|
||||
#[doc = "Specifies whether this node has descendants (inclusive of itself) which \
|
||||
|
@ -169,7 +167,7 @@ bitflags! {
|
|||
|
||||
impl NodeFlags {
|
||||
pub fn new() -> NodeFlags {
|
||||
HAS_CHANGED | IS_DIRTY | HAS_DIRTY_DESCENDANTS
|
||||
IS_DIRTY | HAS_DIRTY_DESCENDANTS
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -422,14 +420,6 @@ impl Node {
|
|||
self.flags.set(flags);
|
||||
}
|
||||
|
||||
pub fn has_changed(&self) -> bool {
|
||||
self.get_flag(HAS_CHANGED)
|
||||
}
|
||||
|
||||
pub fn set_has_changed(&self, state: bool) {
|
||||
self.set_flag(HAS_CHANGED, state)
|
||||
}
|
||||
|
||||
pub fn is_dirty(&self) -> bool {
|
||||
self.get_flag(IS_DIRTY)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue