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

Issue 248473005: Make CSSFontFace::willUseFontData() load fonts with unicode-range (Closed)

Created:
6 years, 8 months ago by Kunihiko Sakamoto
Modified:
6 years, 7 months ago
Reviewers:
dglazkov, eae
CC:
blink-reviews, jamesr, krit, jbroman, zoltan1, dsinclair, bemjb+rendering_chromium.org, eae+blinkwatch, ed+blinkwatch_opera.com, leviw+renderwatch, ojan, dglazkov+blink, Rik, apavlov+blink_chromium.org, jchaffraix+rendering, darktears, danakj, pdr., rune+blink, Stephen Chennney, rwlbuis
Visibility:
Public.

Description

Make CSSFontFace::willUseFontData() load fonts with unicode-range Before this patch CSSFontFace::willUseFontData() loads font faces that have no unicode-range. Since font faces with no unicode-range tends to be used as fallback font of segmented font family, this behavior leads to unnecessary font downloads. This patch makes willUseFontData() loads the first unloaded font face whose unicode-range intersects with given text. That check does not need to be 100% precise (false negative is ok), so it only checks the first character of the text, for speed. TEST=fast/css/font-face-unicode-range-overlap-load.html BUG=247920, 246492 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172943

Patch Set 1 : #

Total comments: 4

Patch Set 2 : #

Patch Set 3 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -25 lines) Patch
M LayoutTests/fast/css/font-face-unicode-range-overlap-load.html View 3 chunks +14 lines, -1 line 0 comments Download
M LayoutTests/fast/css/font-face-unicode-range-overlap-load-expected.txt View 1 chunk +5 lines, -1 line 0 comments Download
M Source/core/css/CSSFontFace.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/css/CSSFontFace.cpp View 1 2 3 chunks +14 lines, -10 lines 0 comments Download
M Source/core/css/CSSFontSelector.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/CSSFontSelector.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/css/CSSSegmentedFontFace.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/CSSSegmentedFontFace.cpp View 1 2 1 chunk +7 lines, -3 lines 0 comments Download
M Source/core/rendering/RenderText.cpp View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M Source/platform/fonts/Font.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/fonts/Font.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/platform/fonts/FontSelector.h View 1 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
Kunihiko Sakamoto
6 years, 8 months ago (2014-04-24 05:23:27 UTC) #1
Kunihiko Sakamoto
Friendly ping :)
6 years, 7 months ago (2014-04-28 10:19:41 UTC) #2
dglazkov
lgtm. I am going to rant a little bit that willUseFontData being called in didChangeStyle ...
6 years, 7 months ago (2014-04-29 16:37:00 UTC) #3
Kunihiko Sakamoto
> I am going to rant a little bit that willUseFontData being called in > ...
6 years, 7 months ago (2014-04-30 03:31:21 UTC) #4
Kunihiko Sakamoto
The CQ bit was checked by ksakamoto@chromium.org
6 years, 7 months ago (2014-04-30 03:45:13 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ksakamoto@chromium.org/248473005/100001
6 years, 7 months ago (2014-04-30 03:45:56 UTC) #6
commit-bot: I haz the power
Change committed as 172943
6 years, 7 months ago (2014-04-30 05:15:37 UTC) #7
enne (OOO)
6 years, 7 months ago (2014-05-02 21:42:16 UTC) #8
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/261753011/ by enne@chromium.org.

The reason for reverting is: Causes off-by-one text errors, e.g. SHOP->RGNO

BUG=369633.

Powered by Google App Engine
This is Rietveld 408576698