Bug 304381
| Summary: | A FontFaceSet created with `new FontFaceSet` doesn't get unblocked by document loading | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | CC: | simon.fraser, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=276794 | ||
Simon Fraser (smfr)
FontFaceSet has a notion of "pending on the environment"[1], which generally means waiting for document load. This blocks resolving the ready promise.
FontFaceSets created in script (like `new FontFaceSet`) are never registered to be notified when document load completes; we only notify the fontSelector's FontFaceSet:
if (RefPtr fontSelector = fontSelectorIfExists()) {
if (RefPtr fontFaceSet = fontSelector->fontFaceSetIfExists())
fontFaceSet->documentDidFinishLoading();
I had to fix LayoutTests/fast/text/font-loading-multiple-sets.html to work around this.
[1] https://drafts.csswg.org/css-font-loading/#fontfaceset-pending-on-the-environment
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Simon Fraser (smfr)
Moot after bug 276794 is fixed.
Radar WebKit Bug Importer
<rdar://problem/167157912>
Simon Fraser (smfr)
The FontFaceSet constructor was removed.