Closed Bug 1856044 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 42254 - Improve CSS highlights getting font from originating

Categories

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

task

Tracking

()

RESOLVED FIXED
121 Branch
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

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Component: CSS Parsing and Computation → Layout: Generated Content, Lists, and Counters
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b73f61021a2d [wpt PR 42254] - Improve CSS highlights getting font from originating, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.