[wpt-sync] Sync PR 35912 - CSS highlight painting: use old spelling/grammar in some edge cases
Categories
(Core :: Layout: Generated Content, Lists, and Counters, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox107 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 35912 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/35912
Details from upstream follow.
Delan Azabani <dazabani@igalia.com> wrote:
CSS highlight painting: use old spelling/grammar in some edge cases
SVG decoration painting is broken for highlight pseudos, because it
walks up the ancestors to find ‘fill’ and ‘stroke’ in a way that only
makes sense for originating elements and tree-abiding pseudos, which
can crash if a highlight pseudo has decorations but the originating
content does not. This was fixed in CL:3646539, but the new spelling
and grammar highlight painting in CL:3779861 reintroduced the bug.PaintOneSpellingGrammarDecoration also asserts that styles will exist
for ::{spelling,grammar}-error, which is generally true due to the new
rules in html.css, but the assertion can fail in non-HTML content or
in HTML content with the wrong root (such as body with no html [2]).In both of these cases, it probably makes sense to paint the default
spelling/grammar decorations anyway, but this is not yet possible
because there’s no easy way to synthesise a TextDecorationInfo without
a real ComputedStyle. Thankfully the old pre-CSS spelling/grammar
decoration painting code has not yet been removed.This patch makes PaintOneSpellingGrammarDecoration use the old pre-CSS
spelling/grammar decoration for SVG content and in the rare case where
non-SVG content has no ::{spelling,grammar}-error styles.[1] https://github.com/w3c/svgwg/issues/894
[2] https://bucket.daz.cat/work/igalia/0/56.htmlFixed: 1358810, 1359175
Change-Id: I33b3499b1c3c21c9b1619ba18ca78305fa9b27f4
Reviewed-on: https://chromium-review.googlesource.com/3899651
WPT-Export-Revision: ab69bf500a54eee8f5484967ee24225a331140b3
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Comment 3•3 years ago
|
||
bugherder |
Description
•