[wpt-sync] Sync PR 42254 - Improve CSS highlights getting font from originating
Categories
(Core :: Layout: Generated Content, Lists, and Counters, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox121 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 42254 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/42254
Details from upstream follow.
Stephen Chenney <schenney@chromium.org> wrote:
Improve CSS highlights getting font from originating
The prior CL to enable font-relative-units from the originating element for CSS Highlight Pseudos did not work for the expected reason. The portions that force a new style for highlights with font-relative-units was correct, but the code to use the originating style in computing css_to_length_conversion_data was not necessary and had no effect. That's because the style system overrides the font immediately after updating the length conversion data and then changes the length conversion data in response.
The change worked because we were still copying the font and line height data from the originating element when creating the new style for the pseudo. Removing that code revealed the problem.
With that in mind, remove the change to UpdateLengthConversionData and add an additional condition the ShouldRecalcHighlightPseudoStyle to only recalc if the font size will be different.
Bug: 1466288
Change-Id: If16d52017da51076f49e7425b87100ea67fb206c
Reviewed-on: https://chromium-review.googlesource.com/4863058
WPT-Export-Revision: d2f1d63ae4e350a5b0ae34b6fe7aaf09f2faa1d8
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
| Assignee | ||
Comment 3•2 years ago
|
||
Comment 4•2 years ago
|
||
| bugherder | ||
Description
•