Closed Bug 1792225 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 36052 - CSS highlight painting: use new spelling/grammar unless feature off

Categories

(Core :: Layout: Generated Content, Lists, and Counters, task, P4)

task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 36052 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/36052
Details from upstream follow.

Delan Azabani <dazabani@igalia.com> wrote:

CSS highlight painting: use new spelling/grammar unless feature off

CL:3899651 makes PaintOneSpellingGrammarDecoration take the old code
path (with DocumentMarkerPainter-based squiggly lines) in a couple
of edge cases, in addition to when CSSSpellingGrammarErrors is off.

This patch makes them take the new code path (with the new CSS-based
decorations) in those edge cases, by passing a “decorations override”
to TextDecorationInfo with a static synthesised AppliedTextDecoration
representing the default spelling or grammar decoration, just like how
ComputedStyle::AppliedTextDecorations has a synthesised decoration for
“simple” underlines. We also add crash tests to WPT and wpt_internal
for the SVG case, since CL:3899651 only did so for the other case.

Some callers also needed to be changed, because the assumption that
the decorations in TextDecorationInfo are the same as the decorations
in ComputedStyle is no longer true, but the changes actually make
things simpler.

Like most of the other overrides (but unlike highlight_override_), the
decorations override for a given TextDecorationInfo instance must not
change, because a lot of ctor logic depends on its value (if any).

Bug: 1358810, 1359175
Change-Id: I2b415dec832496dc3a9157dff30d0f6aa44c515f

Reviewed-on: https://chromium-review.googlesource.com/3916195
WPT-Export-Revision: 2c6b82349f3b397f06ead7146d0b304be901ea00

Component: web-platform-tests → Layout: Generated Content, Lists, and Counters
Product: Testing → Core
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7e43be55a1ea [wpt PR 36052] - CSS highlight painting: use new spelling/grammar unless feature off, a=testonly https://hg.mozilla.org/integration/autoland/rev/0ea1f54b62be [wpt PR 36052] - Update wpt metadata, a=testonly
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
Regressions: 1800312
You need to log in before you can comment on or make changes to this bug.