Closed Bug 1576921 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 18696 - Ensure font loading promises are rejected in valid execution context

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox71 fixed)

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Dominik Röttsches <drott@chromium.org> wrote:

Ensure font loading promises are rejected in valid execution context

The promise resolution was already wrapped in calling it inside the
right execution context, but the reject was not. Add the correct
execution context and schedule rejecting the promise if font loading for
a local() font fails when it is triggered by an implicit UA-triggered
load.

Spec reference:
https://drafts.csswg.org/css-font-loading/#font-face-load
in particular the last normative paragraph: "User agents can initiate
font loads on their own, whenever they determine that a given font face
is necessary to render something on the page. When this happens, they
must act as if they had called the corresponding FontFace’s load()
method described here."

Thanks to Roel Nieskens (pixelambacht@) for the helpful bug report and
reproduction test case.

Bug: 996687
Change-Id: Icb5d75675b8a2e0b3f100808645a1e2e550cfcd1

Reviewed-on: https://chromium-review.googlesource.com/1771607
WPT-Export-Revision: 906827bbb9c53b259cb49490c78d4635e35fcfdc

Ran 1 tests and 1 subtests
OK     : 1
PASS   : 1
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ebe7469cc4f9
[wpt PR 18696] - Ensure font loading promises are rejected in valid execution context, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
You need to log in before you can comment on or make changes to this bug.