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

Issue 63713002: Initiate webfont download right after style recalc (Closed)

Created:
7 years, 1 month ago by Kunihiko Sakamoto
Modified:
7 years, 1 month ago
Reviewers:
eae, dglazkov, eseidel
CC:
blink-reviews, dglazkov+blink, apavlov+blink_chromium.org, darktears
Visibility:
Public.

Description

Initiate webfont download right after style recalc Currently WebFont download is queued during layout, and actual download is delayed until after layout. This patch makes CSSFontFace::willUseFontData() enqueue font download, which is called in style calc time. StyleResolver kicks off font downloads, along with other pending resources. UMA metrics (WebFont.Resource.StyleRecalcToDownloadLatency) shows this reduces webfont download latency 114ms at the 50 percentile. This patch also removes FontResource::FontResourceHistograms as we collected sufficient data. BUG=246492 TEST=Covered by existing tests Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162179

Patch Set 1 : #

Total comments: 1

Patch Set 2 : rebase #

Patch Set 3 : Fix zoom-zoom-coords.xhtml #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -57 lines) Patch
M Source/core/css/CSSFontFace.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M Source/core/css/CSSFontFace.cpp View 1 4 chunks +16 lines, -4 lines 0 comments Download
M Source/core/css/CSSFontFaceSource.cpp View 1 2 1 chunk +2 lines, -2 lines 1 comment Download
M Source/core/css/CSSFontSelector.h View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/css/CSSFontSelector.cpp View 2 chunks +10 lines, -0 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 3 chunks +3 lines, -0 lines 0 comments Download
M Source/core/fetch/FontResource.h View 2 chunks +0 lines, -17 lines 0 comments Download
M Source/core/fetch/FontResource.cpp View 2 chunks +0 lines, -33 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Kunihiko Sakamoto
7 years, 1 month ago (2013-11-12 10:47:22 UTC) #1
dglazkov
lgtm https://codereview.chromium.org/63713002/diff/80001/Source/core/css/CSSFontFace.cpp File Source/core/css/CSSFontFace.cpp (right): https://codereview.chromium.org/63713002/diff/80001/Source/core/css/CSSFontFace.cpp#newcode160 Source/core/css/CSSFontFace.cpp:160: m_activeSource = m_sources[i].get(); As an aside, I am ...
7 years, 1 month ago (2013-11-12 17:58:55 UTC) #2
Kunihiko Sakamoto
Actually m_activeSource is more than just a boolean. Consider this example: @font-face { font-family: AB; ...
7 years, 1 month ago (2013-11-13 05:18:53 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ksakamoto@chromium.org/63713002/80001
7 years, 1 month ago (2013-11-13 05:20:12 UTC) #4
dglazkov
yup, right here: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/css/CSSFontFace.cpp&rcl=1384286955&l=85
7 years, 1 month ago (2013-11-13 05:26:39 UTC) #5
commit-bot: I haz the power
Retried try job too often on linux_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink_rel&number=12329
7 years, 1 month ago (2013-11-13 06:44:09 UTC) #6
dglazkov
I think these might be real failures...
7 years, 1 month ago (2013-11-13 16:31:16 UTC) #7
Kunihiko Sakamoto
Yeah, investigating...
7 years, 1 month ago (2013-11-14 00:55:05 UTC) #8
Kunihiko Sakamoto
https://codereview.chromium.org/63713002/diff/430001/Source/core/css/CSSFontFaceSource.cpp File Source/core/css/CSSFontFaceSource.cpp (right): https://codereview.chromium.org/63713002/diff/430001/Source/core/css/CSSFontFaceSource.cpp#newcode270 Source/core/css/CSSFontFaceSource.cpp:270: if (m_face && m_font && m_font->stillNeedsLoad()) This condition was ...
7 years, 1 month ago (2013-11-18 06:07:39 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ksakamoto@chromium.org/63713002/430001
7 years, 1 month ago (2013-11-18 06:08:26 UTC) #10
commit-bot: I haz the power
Change committed as 162179
7 years, 1 month ago (2013-11-18 06:41:50 UTC) #11
eseidel
7 years, 1 month ago (2013-11-18 20:16:25 UTC) #12
Message was sent while issue was closed.
I wonder if this could have caused Acid3 flaky timeouts?
https://codereview.chromium.org/59813012/

Powered by Google App Engine
This is Rietveld 408576698