WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
194251
Some fonts never load, causing fallback text to be rendered instead
https://bugs.webkit.org/show_bug.cgi?id=194251
Summary
Some fonts never load, causing fallback text to be rendered instead
Myles C. Maxfield
Reported
2019-02-04 16:22:16 PST
Add lots of fonts logging
Attachments
WIP
(23.97 KB, patch)
2019-02-04 16:22 PST
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews202 for win-future
(133.59 KB, application/zip)
2019-02-04 19:01 PST
,
EWS Watchlist
no flags
Details
WIP
(5.23 KB, patch)
2019-04-01 19:55 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(5.68 KB, patch)
2019-04-01 19:59 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(9.56 KB, patch)
2019-04-02 14:16 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Patch
(9.63 KB, patch)
2019-04-02 14:16 PDT
,
Myles C. Maxfield
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Myles C. Maxfield
Comment 1
2019-02-04 16:22:33 PST
Created
attachment 361122
[details]
WIP
EWS Watchlist
Comment 2
2019-02-04 16:25:22 PST
Attachment 361122
[details]
did not pass style-queue: ERROR: Source/WebCore/css/CSSFontSelector.cpp:126: One line control clauses should not use braces. [whitespace/braces] [4] ERROR: Source/WebCore/css/CSSFontSelector.cpp:148: One line control clauses should not use braces. [whitespace/braces] [4] ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 3 in 9 files If any of these errors are false positives, please file a bug against check-webkit-style.
EWS Watchlist
Comment 3
2019-02-04 19:01:24 PST
Comment on
attachment 361122
[details]
WIP
Attachment 361122
[details]
did not pass win-ews (win): Output:
https://webkit-queues.webkit.org/results/11034034
Number of test failures exceeded the failure limit.
EWS Watchlist
Comment 4
2019-02-04 19:01:25 PST
Created
attachment 361150
[details]
Archive of layout-test-results from ews202 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews202 Port: win-future Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit
Myles C. Maxfield
Comment 5
2019-03-26 10:03:08 PDT
CachedResource::load: Failed security check -- state is provisional #0 0x0000000108b31c6d in WebCore::CSSFontFaceSource::fontLoaded(WebCore::CachedFont&) at /Users/litherum/src/WebKit/Source/WebCore/css/CSSFontFaceSource.cpp:140 #1 0x0000000109830f80 in WebCore::CachedFont::checkNotify() at /Users/litherum/src/WebKit/Source/WebCore/loader/cache/CachedFont.cpp:159 #2 0x00000001098429e1 in WebCore::CachedResource::error(WebCore::CachedResource::Status) at /Users/litherum/src/WebKit/Source/WebCore/loader/cache/CachedResource.cpp:379 #3 0x0000000109846212 in WebCore::CachedResource::failBeforeStarting() at /Users/litherum/src/WebKit/Source/WebCore/loader/cache/CachedResource.cpp:185 #4 0x000000010983d346 in WebCore::CachedResource::load(WebCore::CachedResourceLoader&) at /Users/litherum/src/WebKit/Source/WebCore/loader/cache/CachedResource.cpp:230 #5 0x000000010983078c in WebCore::CachedFont::beginLoadIfNeeded(WebCore::CachedResourceLoader&) at /Users/litherum/src/WebKit/Source/WebCore/loader/cache/CachedFont.cpp:82 #6 0x0000000108b336bf in WebCore::CSSFontSelector::beginLoadTimerFired() at /Users/litherum/src/WebKit/Source/WebCore/css/CSSFontSelector.cpp:381
Myles C. Maxfield
Comment 6
2019-03-26 10:04:14 PDT
That calls setStatus(Status::Failure) which means we never try to download the font again.
Myles C. Maxfield
Comment 7
2019-03-26 10:06:13 PDT
... Which means both the CSSFontFaceSource and the CSSFontFace call setStatus(Status::Failure).
Myles C. Maxfield
Comment 8
2019-03-26 10:11:13 PDT
When we go "back," we rebuild new CSSFontFace and CSSFontFaceSource objects. In CSSFontFaceSource's constructor, it adds itself as a client to the CachedFont. This synchronously calls CSSFontFaceSource::fontLoaded(), which checks m_font->errorOccurred(), which is true, so it setStatus(Status::Failure) again.
Myles C. Maxfield
Comment 9
2019-03-26 10:24:07 PDT
CSSFontFaceSrcValue::cachedFont() saves the CachedFont object, so the state is preserved (because the CSSFontFaceSrcValue is preserved)
Myles C. Maxfield
Comment 10
2019-04-01 18:25:29 PDT
I think the way to fix this is: 1) CachedFont overrides error(CachedResource::Status), and in the implementation, checks isLoading() to determine whether or not it failed before loading. 2) Even if the CachedResource failed, CachedFont remembers whether or not that failure was a failBeforeStarting or a real failure 3) CSSFontFaceSource treats a failBeforeStarted CachedFont as a yet-to-be-loaded CachedFont 4) CachedFont::beginLoadIfNeeded() allows for another load if the first one was a failBeforeStarted
Myles C. Maxfield
Comment 11
2019-04-01 19:27:53 PDT
Unfortunately, CachedFont::load() calls setLoading(true)
Myles C. Maxfield
Comment 12
2019-04-01 19:55:47 PDT
Created
attachment 366460
[details]
WIP
Myles C. Maxfield
Comment 13
2019-04-01 19:59:20 PDT
Created
attachment 366461
[details]
Patch
EWS Watchlist
Comment 14
2019-04-01 20:03:13 PDT
Attachment 366461
[details]
did not pass style-queue: ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Myles C. Maxfield
Comment 15
2019-04-02 14:16:00 PDT
Created
attachment 366536
[details]
Patch
Myles C. Maxfield
Comment 16
2019-04-02 14:16:57 PDT
Created
attachment 366537
[details]
Patch
Myles C. Maxfield
Comment 17
2019-04-02 14:17:17 PDT
<
rdar://problem/44808773
>
Myles C. Maxfield
Comment 18
2019-04-02 14:23:59 PDT
This codepath probably kicks in too often - A content blocker probably causes a synchronous fail, and those shouldn't cause the font to be retried. Constantly retrying the font, means we never progress down the font-family list, which isn't an improvement from this bug.
Simon Fraser (smfr)
Comment 19
2019-06-16 20:54:53 PDT
Still relevant?
Dean Jackson
Comment 20
2022-02-19 08:15:09 PST
Comment on
attachment 366537
[details]
Patch Clearing old review flag. Please rebase and mark for review if necessary.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug