Closed Bug 1688354 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 27298 - Treat 'rem' as an absolute unit for font size

Categories

(Core :: Layout: Text and Fonts, task, P4)

task

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Xiaocheng Hu <xiaochengh@chromium.org>' wrote:

Treat 'rem' as an absolute unit for font size

FontBuilder does a size adjustment for monospace that, for all elements
using monospace font family and relative font sizes (em, ex, ch etc),
their computed font-size values are scaled by a fixed factor. To make
sure this doesn't affect non-monospace children using relative font
sizes, we also divide the childrens' font sizes by the same factor.

However, this causes children using 'rem' to be also scaled, because
'rem' is also considered a font-relative length unit, even though it
doesn't depend on the parent font size.

Therefore, we fix it by treating 'rem' an absolute unit for font size.

Bug: 623842
Change-Id: I35343208ef040c0a9baa603c1380423be83ac99d
Reviewed-on: https://chromium-review.googlesource.com/2645653
WPT-Export-Revision: 35a32e7f26c5a81c6760a10bfcee4169dcec64cb

Component: web-platform-tests → Layout: Text and Fonts
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

FAIL: 1

Safari

FAIL: 1

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f4bafecfdf79
[wpt PR 27298] - Treat 'rem' as an absolute unit for font size, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.