Hoist RestyleDamage onto TElement.

Instead of maintaining a dummy restyle damage field for text nodes, we can just
perform the necessary parent inheritance and is_changed adjustments on the fly
in ThreadSafeLayoutNode, simplifying the requirements on the style system.

MozReview-Commit-ID: DCqiCRLsLUF
This commit is contained in:
Bobby Holley 2016-10-25 19:29:32 -07:00
parent a5cabda484
commit 1cfd5e8172
7 changed files with 72 additions and 95 deletions

View file

@ -353,7 +353,7 @@ pub trait ThreadSafeLayoutNode: Clone + Copy + NodeInfo + PartialEq + Sized {
fn restyle_damage(self) -> RestyleDamage;
fn set_restyle_damage(self, damage: RestyleDamage);
fn clear_restyle_damage(self);
/// Returns true if this node contributes content. This is used in the implementation of
/// `empty_cells` per CSS 2.1 § 17.6.1.1.