Bug
1735817 [wpt PR 31242] - Resolve colors for ComputedStyle::Border[Visually]Equal, a=testonly
Automatic update from web-platform-tests
Resolve colors for ComputedStyle::Border[Visually]Equal
There is currently a bug where we don't sufficiently invalidate
the color of collapsed borders when color-scheme changes.
LayoutNGTable* currently checks for the following conditions to
try to detect border color changes:
- BorderVisuallyEqual
- TextDecorationOrColorChanged &&
HasBorderColorReferencingCurrentColor
However, BorderVisuallyEqual does not do what it says (it does not
resolve computed colors into used colors), and the
TextDecorationOrColorChanged flag is not set for color-scheme changes:
we set the NeedsPaintInvalidation flag instead, and assume that this
will be enough to repaint any colors affected by the color scheme
change. But for tables, using NeedsPaintInvalidation to regenerate
borders is not desirable, since it's an expensive operation, and we
want to avoid doing this when the flag is set for an unrelated reason.
Therefore, this CL addresses the issue by making BorderVisuallyEqual
actually resolve the colors before comparing. This should also work
for system color keywords other than currentColor. (We likely have
bugs for this as well).
- We no longer need to check for HasBorderColorReferencingCurrentColor
in any place we check for Border[Visually]Equal, since what we hope
to achieve with checking that flag is now already included in
Border[Visually]Equal.
- LayoutObject::AdjustStyleDifference does not need to check
HasBorderColorReferencingCurrentColor either, since
ComputedStyle::AdjustDiffForNeedsPaintInvalidation already
sets NeedsPaintInvalidation if !BorderVisuallyEqual.
Fixed:
1256758
Change-Id: I61f8ea60d4dd886800ae9533cda90ca80141cbd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/
3222587
Reviewed-by: Aleks Totic <atotic@chromium.org>
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Cr-Commit-Position: refs/heads/main@{#931800}
--
wpt-commits:
6f5768a8a8157be86c5a7624201632646077bd71
wpt-pr: 31242