Closed Bug 1466251 Opened 6 years ago Closed 6 years ago

Make sure we reject FontFace.loaded if font loading times out

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 document.fonts.ready so that it is no longer initialized as soon as it's created. It now has to rely on the font loading code to actually resolve/reject it as appropriate. It turns out that code is broken though, and a bunch of tests time out with the patch in that bug. Before we can land that patch we'll need to fix the font loading code.
Attached patch patchSplinter Review
I'm not sure who I should get to review this. Cameron/Lee/Jonathan would any of you feel this is something you could review?
Comment on attachment 8982699 [details] [diff] [review]
patch

This is necessary to get at least testing/web-platform/tests/css/css-fonts/font-display/font-display-failure-fallback.html passing after the fix for bug 1465983.
Attachment #8982699 - Flags: review?(cam)
Comment on attachment 8982699 [details] [diff] [review]
patch

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

I assume there's not a good way to add a WPT test for this.  Can you add a sub-test to test_font_loading_api.html, maybe using a trick like the "TEST LAST" sub-test does to have a network request that never finishes?
Attachment #8982699 - Flags: review?(cam) → review+
(In reply to Cameron McCormack (:heycam) from comment #4)
> I assume there's not a good way to add a WPT test for this.

Obviously I'm wrong about this since you mention the WPT test that is failing above. :-)
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3a2017692aa6
part 1 - Make sure we reject FontFace.loaded if font loading times out. r=heycam
https://hg.mozilla.org/integration/mozilla-inbound/rev/963e5c161210
part 2 - Mark font-display-failure-fallback.html as now passing. rs=heycam
Priority: -- → P2
https://hg.mozilla.org/mozilla-central/rev/3a2017692aa6
https://hg.mozilla.org/mozilla-central/rev/963e5c161210
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: