Closed Bug 1466432 Opened 6 years ago Closed 6 years ago

Make sure the document.fonts.ready Promise resolves even when there's no refresh driver

Categories

(Core :: Layout, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

Attachments

(1 file)

Bug 1465983 changes the document.fonts.ready Promise so that it is no longer resolved as soon as it's created. That exposes a bug in our code where we don't resolve the Promise for display:none documents (documents that don't have a refresh driver) or documents that have finished loading and painting at the point when script accesses document.fonts (creates the FontFaceSet).
Attached patch patchSplinter Review
Attachment #8982942 - Flags: review?(cam)
Comment on attachment 8982942 [details] [diff] [review]
patch

Review of attachment 8982942 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thanks.  Can you add a WPT test for this too?
Attachment #8982942 - Flags: review?(cam) → review+
Many of the tests in layout/style/test/test_font_loading_api.html time out without this, most particularly all the tests for the display:none iframe. I think we should basically port that entire test to WPT, but I don't have time for that right now.
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/11fe54576742
Make sure the document.fonts.ready Promise resolves even when there's no refresh driver. r=heycam
Priority: -- → P2
https://hg.mozilla.org/mozilla-central/rev/11fe54576742
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Blocks: 1465983
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: