[Webkit-unassigned] [Bug 174030] document.fonts.ready is resolved too quickly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 20 06:36:29 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=174030

--- Comment #4 from Frédéric Wang (:fredw) <fred.wang at free.fr> ---
Created attachment 336117

  --> https://bugs.webkit.org/attachment.cgi?id=336117&action=review

Patch to exhibit similar early-resolution bugs

For WPT tests using Web fonts, the issue was worked around in https://github.com/w3c/web-platform-tests/pull/10025 ; The attached patch demonstrates the issue when document.fonts.ready is only called after window.onload (contrary to the initial test case):
* frac-parameters-1.html uses CSS @font-face ; document.fonts.ready resolves immediately after window.onload and hence the test fails unless you delay a bit the check with e.g; requestAnimationFrame or setTimeout(..., 0)
* In frac-parameters-2.html, the patch uses the JS API to add the font after window.onload, but still document.fonts.ready is resolved immediately.
* In root-parameters-1.html, the same is done but the font load is triggered explicitly. This allows to delay the resolution of document.fonts.ready and the tests pass.

I think WebKit does not really follow closely the spec but at the same time the spec is not always clear either. More analysis and conformance tests would be needed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180320/54d33132/attachment-0001.html>


More information about the webkit-unassigned mailing list