Unnecessary layout when changing outline color sets "recompute_overflow" on StyleDifference |
|||
Issue description
Just changing outline color sets "recompute_overflow" flag on StyleDifference object.
LayoutObject::SetStyle uses this flag to invalidate layout:
LayoutObject::SetStyle
if (diff.NeedsRecomputeOverflow() && !NeedsLayout()) {
SetNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::kStyleChange);
The code that determines whether overflow recomputation is needed is at:
ComputedStyle::UpdatePropertySpecificDifferences
ComputedStyleBase::UpdatePropertySpecificDifferencesNeedsRecomputeOverflow
if (!a.OutlineVisuallyEqual(b))
return true;
Outlines can be visually different (color change), but not trigger overflow computation.
I think we need to separate OutlineVisuallyEqual into OutlineLayoutEqual, OutlinePaintEqual.
One should trigger overflow computation, and the other should not.
Overflow computation in LayoutNG triggers full layout for now.
,
Sep 18
,
Sep 18
Any clues on where are the templates that generate this code?
,
Sep 26
|
|||
►
Sign in to add a comment |
|||
Comment 1 by atotic@chromium.org
, Sep 11494 bytes
494 bytes View Download