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

Issue 2145903002: Add heuristic to LayoutTextControl::hasValidAvgCharWidth() (Closed)

Created:
4 years, 5 months ago by kojii
Modified:
4 years, 5 months ago
Reviewers:
tkent, kochi
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add heuristic to LayoutTextControl::hasValidAvgCharWidth() This patch adds a heuristic check to see if the font has invalid avgCharWidth. The spec is silent about how avgCharWidth is computed for CJK fonts, and some fonts selected to match to CJK full-width characters. Since in most fonts, avgCharWidth is close to the width of "0", when it's too big compared to the width of "0" can be considered as invalid. BUG=625058 Committed: https://crrev.com/77183f3386fcb2362ca6140ab5fb15958d7cfa2d Cr-Commit-Position: refs/heads/master@{#405086}

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -9 lines) Patch
M third_party/WebKit/Source/core/layout/LayoutTextControl.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutTextControl.cpp View 2 chunks +11 lines, -5 lines 4 comments Download
M third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp View 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 16 (5 generated)
kojii
WDYT?
4 years, 5 months ago (2016-07-13 06:18:57 UTC) #3
tkent
On 2016/07/13 at 06:18:57, kojii wrote: > WDYT? Sounds a good idea. How popular are ...
4 years, 5 months ago (2016-07-13 06:31:19 UTC) #4
kojii
On 2016/07/13 at 06:31:19, tkent wrote: > Sounds a good idea. How popular are fonts ...
4 years, 5 months ago (2016-07-13 07:17:23 UTC) #5
tkent
lgtm
4 years, 5 months ago (2016-07-13 07:24:01 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2145903002/1
4 years, 5 months ago (2016-07-13 07:28:20 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-13 08:43:07 UTC) #9
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/77183f3386fcb2362ca6140ab5fb15958d7cfa2d Cr-Commit-Position: refs/heads/master@{#405086}
4 years, 5 months ago (2016-07-13 08:45:06 UTC) #11
kochi
https://codereview.chromium.org/2145903002/diff/1/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp File third_party/WebKit/Source/core/layout/LayoutTextControl.cpp (right): https://codereview.chromium.org/2145903002/diff/1/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp#newcode192 third_party/WebKit/Source/core/layout/LayoutTextControl.cpp:192: bool LayoutTextControl::hasValidAvgCharWidth(const SimpleFontData* font, const AtomicString& family) Can't this ...
4 years, 5 months ago (2016-07-13 09:36:13 UTC) #13
kojii
https://codereview.chromium.org/2145903002/diff/1/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp File third_party/WebKit/Source/core/layout/LayoutTextControl.cpp (right): https://codereview.chromium.org/2145903002/diff/1/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp#newcode192 third_party/WebKit/Source/core/layout/LayoutTextControl.cpp:192: bool LayoutTextControl::hasValidAvgCharWidth(const SimpleFontData* font, const AtomicString& family) On 2016/07/13 ...
4 years, 5 months ago (2016-07-13 11:20:35 UTC) #14
tkent
https://codereview.chromium.org/2145903002/diff/1/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp File third_party/WebKit/Source/core/layout/LayoutTextControl.cpp (right): https://codereview.chromium.org/2145903002/diff/1/third_party/WebKit/Source/core/layout/LayoutTextControl.cpp#newcode192 third_party/WebKit/Source/core/layout/LayoutTextControl.cpp:192: bool LayoutTextControl::hasValidAvgCharWidth(const SimpleFontData* font, const AtomicString& family) On 2016/07/13 ...
4 years, 5 months ago (2016-07-13 23:14:35 UTC) #15
tkent
4 years, 5 months ago (2016-07-14 00:07:09 UTC) #16
Message was sent while issue was closed.
https://codereview.chromium.org/2145903002/diff/1/third_party/WebKit/Source/c...
File third_party/WebKit/Source/core/layout/LayoutTextControl.cpp (right):

https://codereview.chromium.org/2145903002/diff/1/third_party/WebKit/Source/c...
third_party/WebKit/Source/core/layout/LayoutTextControl.cpp:192: bool
LayoutTextControl::hasValidAvgCharWidth(const SimpleFontData* font, const
AtomicString& family)
eae@ just added a runtime null check. https://codereview.chromium.org/2149683002

Powered by Google App Engine
This is Rietveld 408576698