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

Issue 1829403002: Clean up font loading (Closed)

Created:
4 years, 9 months ago by Nate Chapin
Modified:
4 years, 8 months ago
CC:
chromium-reviews, tyoshino+watch_chromium.org, blink-reviews-style_chromium.org, blink-reviews-css, loading-reviews_chromium.org, dglazkov+blink, apavlov+blink_chromium.org, gavinp+loader_chromium.org, darktears, blink-reviews, loading-reviews+fetch_chromium.org, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@Resource_status
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clean up font loading * FontLoader is mostly a wrapper to start font loads asynchronously, which appears to be a historical artifact that was only necessary for WebKit/mac/. Merge the remaining bits into RemoteFontFaceSource. * Use FetchRequest::DeferOption to prevent font loads from starting immediately, rather than an override of Resource::load. * Change the font load timeout timers to start when the font is first needed, not when it is requested. This ensures that the timers do not begin when a font is preloaded, which seems to be more compliant with the spec: https://tabatkins.github.io/specs/css-font-display/#timeline BUG= Committed: https://crrev.com/89992c023651c3d75494552a2bcff095f6d4d79f Cr-Commit-Position: refs/heads/master@{#387061}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Total comments: 15

Patch Set 10 : Address hiroshige's comments #

Total comments: 2

Patch Set 11 : Rebase, +semicolon #

Patch Set 12 : Another rebase! #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -303 lines) Patch
M third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSFontSelector.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSFontSelector.cpp View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSStyleSheetResourceTest.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/FontFace.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -3 lines 0 comments Download
D third_party/WebKit/Source/core/css/FontLoader.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -52 lines 0 comments Download
D third_party/WebKit/Source/core/css/FontLoader.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -153 lines 0 comments Download
M third_party/WebKit/Source/core/css/RemoteFontFaceSource.h View 1 2 3 4 5 6 4 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp View 1 2 3 4 5 6 7 8 9 10 6 chunks +20 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/CachingCorrectnessTest.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/FontResource.h View 1 2 3 4 5 6 7 2 chunks +1 line, -8 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FontResource.cpp View 1 2 3 4 5 6 7 3 chunks +9 lines, -29 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResource.h View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResource.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +1 line, -8 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ImageResourceTest.cpp View 1 2 3 4 5 6 5 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.h View 1 2 3 4 5 6 7 8 9 3 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 37 (16 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829403002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829403002/60001
4 years, 8 months ago (2016-03-30 21:41:25 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/204196)
4 years, 8 months ago (2016-03-30 23:06:13 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829403002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829403002/80001
4 years, 8 months ago (2016-03-31 23:00:37 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_TIMED_OUT, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/203509)
4 years, 8 months ago (2016-04-01 06:34:02 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829403002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829403002/100001
4 years, 8 months ago (2016-04-04 23:49:29 UTC) #10
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/45054) linux_chromium_chromeos_ozone_rel_ng on ...
4 years, 8 months ago (2016-04-05 00:04:06 UTC) #12
Nate Chapin
ksakamoto, toyoshim: you both seem to be active in the font loading logic. Do you ...
4 years, 8 months ago (2016-04-07 23:46:17 UTC) #15
hiroshige
https://codereview.chromium.org/1829403002/diff/160001/third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html File third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html (right): https://codereview.chromium.org/1829403002/diff/160001/third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html#newcode21 third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html:21: window.onload = setTimeout(runTest, 0); On 2016/04/07 23:46:16, Nate Chapin ...
4 years, 8 months ago (2016-04-08 01:02:04 UTC) #17
Kunihiko Sakamoto
Nice! This would make webfont a bit faster :) LGTM w/ hiroshige's comments addressed. https://codereview.chromium.org/1829403002/diff/160001/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp ...
4 years, 8 months ago (2016-04-08 02:37:16 UTC) #18
Yoav Weiss
On 2016/04/08 02:37:16, Kunihiko Sakamoto wrote: > Nice! This would make webfont a bit faster ...
4 years, 8 months ago (2016-04-08 07:10:51 UTC) #19
Takashi Toyoshima
lgtm. https://codereview.chromium.org/1829403002/diff/160001/third_party/WebKit/Source/core/fetch/FontResource.cpp File third_party/WebKit/Source/core/fetch/FontResource.cpp (right): https://codereview.chromium.org/1829403002/diff/160001/third_party/WebKit/Source/core/fetch/FontResource.cpp#newcode148 third_party/WebKit/Source/core/fetch/FontResource.cpp:148: ASSERT(m_loadLimitState == UnderLimit); On reviewing this change, I ...
4 years, 8 months ago (2016-04-11 11:51:54 UTC) #20
Nate Chapin
https://codereview.chromium.org/1829403002/diff/160001/third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html File third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html (right): https://codereview.chromium.org/1829403002/diff/160001/third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html#newcode21 third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html:21: window.onload = setTimeout(runTest, 0); On 2016/04/08 01:02:04, hiroshige wrote: ...
4 years, 8 months ago (2016-04-11 18:47:32 UTC) #21
Nate Chapin
On 2016/04/08 07:10:51, Yoav Weiss wrote: > On 2016/04/08 02:37:16, Kunihiko Sakamoto wrote: > > ...
4 years, 8 months ago (2016-04-11 18:49:54 UTC) #22
Nate Chapin
On 2016/04/11 18:47:32, Nate Chapin wrote: > https://codereview.chromium.org/1829403002/diff/160001/third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html > File > third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html > (right): > ...
4 years, 8 months ago (2016-04-12 23:51:17 UTC) #23
hiroshige
lgtm with a comment. https://codereview.chromium.org/1829403002/diff/170001/third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html File third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html (right): https://codereview.chromium.org/1829403002/diff/170001/third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html#newcode23 third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html:23: } Add a semicolon at ...
4 years, 8 months ago (2016-04-13 09:48:23 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829403002/190001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829403002/190001
4 years, 8 months ago (2016-04-13 17:01:10 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/18474) ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 8 months ago (2016-04-13 17:04:09 UTC) #29
Nate Chapin
https://codereview.chromium.org/1829403002/diff/170001/third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html File third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html (right): https://codereview.chromium.org/1829403002/diff/170001/third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html#newcode23 third_party/WebKit/LayoutTests/http/tests/webfont/css-change-in-swap-period.html:23: } On 2016/04/13 09:48:23, hiroshige wrote: > Add a ...
4 years, 8 months ago (2016-04-13 17:47:24 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1829403002/210001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1829403002/210001
4 years, 8 months ago (2016-04-13 17:47:59 UTC) #33
commit-bot: I haz the power
Committed patchset #12 (id:210001)
4 years, 8 months ago (2016-04-13 19:10:52 UTC) #35
commit-bot: I haz the power
4 years, 8 months ago (2016-04-13 19:13:09 UTC) #37
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/89992c023651c3d75494552a2bcff095f6d4d79f
Cr-Commit-Position: refs/heads/master@{#387061}

Powered by Google App Engine
This is Rietveld 408576698