Issue #2112 - Part 6: Remove IsStyledByServo function and callers

This commit is contained in:
FranklinDM 2024-03-25 02:09:12 +08:00 committed by roytam1
commit 10bf8705d0
13 changed files with 16 additions and 181 deletions

View file

@ -1018,55 +1018,7 @@ public:
virtual nsPIDOMWindowOuter* GetOwnerGlobalForBindings() override;
virtual nsIGlobalObject* GetOwnerGlobal() const override;
/**
* Returns true if this is a node belonging to a document that uses the Servo
* style system.
*/
bool IsStyledByServo() const { return false; }
bool IsDirtyForServo() const
{
MOZ_ASSERT(IsStyledByServo());
return HasFlag(NODE_IS_DIRTY_FOR_SERVO);
}
bool HasDirtyDescendantsForServo() const
{
MOZ_ASSERT(IsStyledByServo());
return HasFlag(NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO);
}
void SetIsDirtyForServo() {
MOZ_ASSERT(IsStyledByServo());
SetFlags(NODE_IS_DIRTY_FOR_SERVO);
}
void SetHasDirtyDescendantsForServo() {
MOZ_ASSERT(IsStyledByServo());
SetFlags(NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO);
}
void SetIsDirtyAndHasDirtyDescendantsForServo() {
MOZ_ASSERT(IsStyledByServo());
SetFlags(NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO | NODE_IS_DIRTY_FOR_SERVO);
}
void UnsetIsDirtyForServo() {
MOZ_ASSERT(IsStyledByServo());
UnsetFlags(NODE_IS_DIRTY_FOR_SERVO);
}
void UnsetHasDirtyDescendantsForServo() {
MOZ_ASSERT(IsStyledByServo());
UnsetFlags(NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO);
}
void UnsetIsDirtyAndHasDirtyDescendantsForServo() {
MOZ_ASSERT(IsStyledByServo());
UnsetFlags(NODE_HAS_DIRTY_DESCENDANTS_FOR_SERVO | NODE_IS_DIRTY_FOR_SERVO);
}
inline void UnsetRestyleFlagsIfGecko();
inline void UnsetRestyleFlags();
/**
* Adds a mutation observer to be notified when this node, or any of its