Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Issue 457273002: Webfonts should not block load event for more than one frame (Closed)

Created:
6 years, 4 months ago by Kunihiko Sakamoto
Modified:
6 years, 4 months ago
Reviewers:
Nate Chapin
CC:
blink-reviews, gavinp+loader_chromium.org, Mathieu
Project:
blink
Visibility:
Public.

Description

Webfonts should not block load event for more than one frame This patch fixes a bug that frame's load event does not fire when FontLoader::loadPendingFonts does not start any load because all the pending fonts are already started loading. This happens when a webfont is used in multiple iframes; only one of them actually starts the load. After this patch, if a font is used in multiple frames, subsequent frames do not schedule a load (hence do not block the load event). BUG=401846 TEST=fast/css/font-face-iframe-onload.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=180321

Patch Set 1 : #

Total comments: 2

Patch Set 2 : #

Total comments: 2

Patch Set 3 : Merge flags into an enum #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -13 lines) Patch
A LayoutTests/fast/css/font-face-iframe-onload.html View 1 chunk +21 lines, -0 lines 0 comments Download
A + LayoutTests/fast/css/font-face-iframe-onload-expected.txt View 1 chunk +1 line, -2 lines 0 comments Download
A LayoutTests/fast/css/resources/ahem.html View 1 chunk +10 lines, -0 lines 0 comments Download
M Source/core/css/FontLoader.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/FontLoader.cpp View 1 2 2 chunks +13 lines, -6 lines 0 comments Download
M Source/core/fetch/FontResource.h View 1 2 2 chunks +8 lines, -2 lines 0 comments Download
M Source/core/fetch/FontResource.cpp View 1 2 3 chunks +15 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Kunihiko Sakamoto
6 years, 4 months ago (2014-08-11 09:00:11 UTC) #1
Nate Chapin
https://codereview.chromium.org/457273002/diff/40001/Source/core/css/FontLoader.cpp File Source/core/css/FontLoader.cpp (right): https://codereview.chromium.org/457273002/diff/40001/Source/core/css/FontLoader.cpp#newcode76 Source/core/css/FontLoader.cpp:76: document->checkLoadEventSoon(); Do we need to block the load event ...
6 years, 4 months ago (2014-08-11 22:06:16 UTC) #2
Kunihiko Sakamoto
Thank you for the review. https://codereview.chromium.org/457273002/diff/40001/Source/core/css/FontLoader.cpp File Source/core/css/FontLoader.cpp (right): https://codereview.chromium.org/457273002/diff/40001/Source/core/css/FontLoader.cpp#newcode76 Source/core/css/FontLoader.cpp:76: document->checkLoadEventSoon(); > Do we ...
6 years, 4 months ago (2014-08-12 03:12:09 UTC) #3
Nate Chapin
On 2014/08/12 03:12:09, Kunihiko Sakamoto wrote: > Thank you for the review. > > https://codereview.chromium.org/457273002/diff/40001/Source/core/css/FontLoader.cpp ...
6 years, 4 months ago (2014-08-12 16:08:22 UTC) #4
Kunihiko Sakamoto
Calling checkLoadEventSoon() in FontLoader seems not a good idea, so I've rewritten my patch in ...
6 years, 4 months ago (2014-08-14 03:44:01 UTC) #5
Nate Chapin
LGTM. This is no worse than the current situation with subresources. It's a known issue ...
6 years, 4 months ago (2014-08-14 17:33:06 UTC) #6
Kunihiko Sakamoto
Thanks! https://codereview.chromium.org/457273002/diff/80001/Source/core/fetch/FontResource.h File Source/core/fetch/FontResource.h (right): https://codereview.chromium.org/457273002/diff/80001/Source/core/fetch/FontResource.h#newcode83 Source/core/fetch/FontResource.h:83: bool m_loadScheduled; On 2014/08/14 17:33:06, Nate Chapin wrote: ...
6 years, 4 months ago (2014-08-15 01:30:23 UTC) #7
Kunihiko Sakamoto
The CQ bit was checked by ksakamoto@chromium.org
6 years, 4 months ago (2014-08-15 01:35:19 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ksakamoto@chromium.org/457273002/100001
6 years, 4 months ago (2014-08-15 01:37:16 UTC) #9
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_gpu_retina_triggered_tests on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-15 02:36:22 UTC) #10
commit-bot: I haz the power
6 years, 4 months ago (2014-08-15 03:04:50 UTC) #11
Message was sent while issue was closed.
Committed patchset #3 (100001) as 180321

Powered by Google App Engine
This is Rietveld 408576698