Closed Bug 1712394 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 29078 - [a11y] System font sizes should obey user's font size setting

Categories

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

task

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Oriol Brufau <obrufau@igalia.com>' wrote:

[a11y] System font sizes should obey user's font size setting

Some form controls get assigned a system font in UA origin:

input, textarea, select, button {
font: -webkit-small-control;
}

The font size of that is supposed to be 2pt smaller than the default
font size. However, that "default" was hardcoded to 16px, without taking
into account that the user can change the actual default.

For example, someone with suboptimal vision may use a bigger default in
order to be able to read the text with ease. But form controls would
ignore that preference. This was bad for accessibility.

So this patch uses the actual default size when calculating the size
of system fonts.

Doing so requires a Document from which to retrieve the settings, but
CSSParserContext::GetDocument() is null for UA stylesheets. Therefore,
instead of resolving at parse time, the font longhands are set to a
CSSPendingSystemFontValue, and their resolution is deferred until
computed-value time, when we can use StyleResolverState::GetDocument().

Bug: 1054031

TEST=StyleEngineTest.SystemFontsObeyDefaultFontSize
TEST=external/wpt/css/css-fonts/system-fonts-serialization.tentative.html
TEST=fast/css/font-shorthand.html

Change-Id: I5e9b41a2baa45cea7f1a54190bf593e025153adb

Reviewed-on: https://chromium-review.googlesource.com/2891582
WPT-Export-Revision: 82f8879abfdea33dbd0752e36977006d02332a9d

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

CI Results

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

Total 1 tests and 9 subtests

Status Summary

Firefox

OK : 1
FAIL: 6

Chrome

OK : 1
FAIL: 9

Safari

OK : 1
FAIL: 9

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/css-fonts/system-fonts-serialization.tentative.html
caption: FAIL (Chrome: FAIL, Safari: FAIL)
icon: FAIL (Chrome: FAIL, Safari: FAIL)
menu: FAIL (Chrome: FAIL, Safari: FAIL)
message-box: FAIL (Chrome: FAIL, Safari: FAIL)
small-caption: FAIL (Chrome: FAIL, Safari: FAIL)
status-bar: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4b0c0d2cae93 [wpt PR 29078] - [a11y] System font sizes should obey user's font size setting, a=testonly https://hg.mozilla.org/integration/autoland/rev/11ea7625b5bf [wpt PR 29078] - Update wpt metadata, a=testonly
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e8de528b0986 [wpt PR 29078] - [a11y] System font sizes should obey user's font size setting, a=testonly https://hg.mozilla.org/integration/autoland/rev/d820a3007a6c [wpt PR 29078] - Update wpt metadata, a=testonly
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8d580564c600 [wpt PR 29078] - [a11y] System font sizes should obey user's font size setting, a=testonly https://hg.mozilla.org/integration/autoland/rev/da5eed1cfca7 [wpt PR 29078] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.