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/c/chromium/src/+/1771607 Commit-Queue: Dominik Röttsches <drott@chromium.org> Reviewed-by:Kunihiko Sakamoto <ksakamoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#691092}
Showing
Please register or sign in to comment