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

Issue 943463002: Initial implementation of font-size-adjust (Closed)

Created:
5 years, 10 months ago by changseok
Modified:
5 years, 9 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, Rik, danakj, dglazkov+blink, Dominik Röttsches, dshwang, krit, ed+blinkwatch_opera.com, f(malita), jbroman, Justin Novosad, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Initial implementation of font-size-adjust This patch implements the font-size-adjust css property specified in http://www.w3.org/TR/css-fonts-3/#font-size-adjust-prop How it works is simple. A content author set a aspect value (x-height of font / font-size) to font-size-adjust then blink will adjust the actual font size to look similar size whatever font is used. The fomula to adjust the size is like below. adjustedFontSize = (aspectValue specified by font-size-adjust * aspectValue of actual font) * font-size BUG=451346 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191273

Patch Set 1 #

Total comments: 3

Patch Set 2 : UpdatedPatch #

Patch Set 3 : ExpectedResultForLinuxIsUpdated #

Total comments: 6

Patch Set 4 : UpdatedPatch #

Total comments: 2

Patch Set 5 : RebasedPatch #

Patch Set 6 : Add some tests which need a rebaseline to TestExpectation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+414 lines, -4 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
A LayoutTests/css-parser/font-size-adjust.html View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
A LayoutTests/css-parser/font-size-adjust-expected.txt View 1 2 3 1 chunk +27 lines, -0 lines 0 comments Download
M LayoutTests/fast/css/getComputedStyle/computed-style-font-family-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/fast/text/computed-line-height-and-font-size-with-font-size-adjust.html View 1 2 3 1 chunk +53 lines, -0 lines 0 comments Download
A LayoutTests/fast/text/computed-line-height-and-font-size-with-font-size-adjust-expected.txt View 1 2 3 1 chunk +14 lines, -0 lines 0 comments Download
A LayoutTests/fast/text/font-size-adjust.html View 1 2 3 1 chunk +41 lines, -0 lines 0 comments Download
A LayoutTests/platform/linux/fast/text/font-size-adjust-expected.png View 1 2 Binary file 0 comments Download
A LayoutTests/platform/linux/fast/text/font-size-adjust-expected.txt View 1 2 3 1 chunk +21 lines, -0 lines 0 comments Download
A LayoutTests/platform/mac/fast/text/font-size-adjust-expected.png View 1 2 Binary file 0 comments Download
A LayoutTests/platform/mac/fast/text/font-size-adjust-expected.txt View 1 2 3 1 chunk +21 lines, -0 lines 0 comments Download
M LayoutTests/platform/mac/tables/mozilla/bugs/bug2886-2-expected.png View 1 2 3 4 5 Binary file 0 comments Download
A LayoutTests/platform/mac/tables/mozilla/bugs/bug2886-2-expected.txt View 1 2 3 4 5 1 chunk +107 lines, -0 lines 0 comments Download
A LayoutTests/platform/mac/virtual/antialiasedtext/fast/text/font-size-adjust-expected.png View 1 2 3 4 Binary file 0 comments Download
A LayoutTests/platform/mac/virtual/antialiasedtext/fast/text/font-size-adjust-expected.txt View 1 2 3 4 1 chunk +21 lines, -0 lines 0 comments Download
M LayoutTests/webexposed/css-properties-as-js-properties-expected.txt View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/CSSComputedStyleDeclaration.cpp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/CSSProperties.in View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/LayoutStyleCSSValueMapping.cpp View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/css/parser/CSSPropertyParser.cpp View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M Source/core/css/resolver/CSSPropertyPriority.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/resolver/FontBuilder.h View 1 4 chunks +4 lines, -0 lines 0 comments Download
M Source/core/css/resolver/FontBuilder.cpp View 1 2 3 5 chunks +34 lines, -0 lines 0 comments Download
M Source/core/css/resolver/StyleBuilderConverter.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/css/resolver/StyleBuilderConverter.cpp View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M Source/core/frame/UseCounter.cpp View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/layout/style/LayoutStyle.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/layout/style/LayoutStyle.cpp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/fonts/FontDescription.h View 1 2 5 chunks +16 lines, -0 lines 0 comments Download
M Source/platform/fonts/FontDescription.cpp View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 42 (8 generated)
changseok
I don't know who is a proper reviewer for the font module so that I ...
5 years, 10 months ago (2015-02-19 09:15:01 UTC) #2
changseok
On 2015/02/19 09:15:01, changseok wrote: > I don't know who is a proper reviewer for ...
5 years, 10 months ago (2015-02-19 09:18:33 UTC) #3
Nico
eae is probably a good reviewer for this.
5 years, 10 months ago (2015-02-19 15:29:37 UTC) #4
rune
Drive-by-review: In general, you need to support 'none'. Both for parsing, computed style, and handle ...
5 years, 10 months ago (2015-02-19 20:28:27 UTC) #6
Timothy Loh
https://codereview.chromium.org/943463002/diff/1/Source/core/css/CSSProperties.in File Source/core/css/CSSProperties.in (right): https://codereview.chromium.org/943463002/diff/1/Source/core/css/CSSProperties.in#newcode88 Source/core/css/CSSProperties.in:88: font-size-adjust runtime_flag=CSSFontSizeAdjust, animatable, inherited, font, type_name=float, name_for_methods=SizeAdjust I'd drop ...
5 years, 10 months ago (2015-02-19 23:00:46 UTC) #7
eae
Implementation looks good, I do wonder if we could change computedSize to adjust for the ...
5 years, 10 months ago (2015-02-19 23:32:23 UTC) #8
changseok
On 2015/02/19 20:28:27, rune wrote: > Drive-by-review: > > In general, you need to support ...
5 years, 10 months ago (2015-02-24 16:16:48 UTC) #9
changseok
On 2015/02/19 23:00:46, Timothy Loh wrote: > https://codereview.chromium.org/943463002/diff/1/Source/core/css/CSSProperties.in > File Source/core/css/CSSProperties.in (right): > > https://codereview.chromium.org/943463002/diff/1/Source/core/css/CSSProperties.in#newcode88 ...
5 years, 10 months ago (2015-02-24 16:18:36 UTC) #10
changseok
On 2015/02/19 23:32:23, eae wrote: > Implementation looks good, I do wonder if we could ...
5 years, 10 months ago (2015-02-24 16:33:06 UTC) #11
Tab Atkins
On 2015/02/24 16:33:06, changseok wrote: > On 2015/02/19 23:32:23, eae wrote: > > Implementation looks ...
5 years, 10 months ago (2015-02-24 18:35:16 UTC) #12
changseok
Hrm. I just ran and found the pixel test failed on linux. The x-height is ...
5 years, 10 months ago (2015-02-25 17:46:06 UTC) #13
changseok
Please review again.
5 years, 10 months ago (2015-02-26 05:25:00 UTC) #14
rune
On 2015/02/25 17:46:06, changseok wrote: > Hrm. I just ran and found the pixel test ...
5 years, 9 months ago (2015-02-27 10:52:04 UTC) #15
changseok
On 2015/02/27 10:52:04, rune wrote: > Would that be the case for Ahem as well? ...
5 years, 9 months ago (2015-03-01 17:40:17 UTC) #16
changseok
lgtm
5 years, 9 months ago (2015-03-02 07:20:08 UTC) #17
changseok
On 2015/03/02 at 07:20:08, changseok wrote: > lgtm Oops. sorry.
5 years, 9 months ago (2015-03-02 07:20:36 UTC) #18
rune
On 2015/03/01 17:40:17, changseok wrote: > On 2015/02/27 10:52:04, rune wrote: > > Would that ...
5 years, 9 months ago (2015-03-02 09:05:16 UTC) #19
rune
Could you add tests to check that: - Negative values are dropped at parse time ...
5 years, 9 months ago (2015-03-02 09:08:36 UTC) #20
changseok
On 2015/03/02 09:08:36, rune wrote: > Could you add tests to check that: > > ...
5 years, 9 months ago (2015-03-02 11:26:07 UTC) #21
rune
On 2015/03/02 11:26:07, changseok wrote: > On 2015/03/02 09:08:36, rune wrote: > > Could you ...
5 years, 9 months ago (2015-03-02 11:53:52 UTC) #22
Timothy Loh
On 2015/03/02 11:53:52, rune wrote: > Valid value parsing is not tested in a consistent ...
5 years, 9 months ago (2015-03-02 12:04:32 UTC) #23
rune
On 2015/03/02 12:04:32, Timothy Loh wrote: > The helper LayoutTests/css-parser/resources/property-parsing-test.js should make > this easy ...
5 years, 9 months ago (2015-03-02 12:14:41 UTC) #24
changseok
Thank you all for the kind comments. It was much helpful! The updated patch is ...
5 years, 9 months ago (2015-03-02 15:57:49 UTC) #25
changseok
Any more comments? =)
5 years, 9 months ago (2015-03-03 15:05:24 UTC) #26
eae
LGTM but please wait for rune to sign off before landing. Thank you!
5 years, 9 months ago (2015-03-03 18:14:10 UTC) #27
rune
Sorry for not seeing the 0/none issue in previous reviews. One note: you should rebase ...
5 years, 9 months ago (2015-03-03 18:58:48 UTC) #28
changseok
> One note: you should rebase in separate patch sets so that it's easier to ...
5 years, 9 months ago (2015-03-03 19:39:42 UTC) #29
rune
On 2015/03/03 19:39:42, changseok wrote: > https://codereview.chromium.org/943463002/diff/60001/LayoutTests/css-parser/font-size-adjust.html > File LayoutTests/css-parser/font-size-adjust.html (right): > > https://codereview.chromium.org/943463002/diff/60001/LayoutTests/css-parser/font-size-adjust.html#newcode11 > ...
5 years, 9 months ago (2015-03-03 20:09:21 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/943463002/60001
5 years, 9 months ago (2015-03-04 04:39:18 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_compile_dbg on tryserver.blink (JOB_FAILED, http://build.chromium.org/p/tryserver.blink/builders/win_blink_compile_dbg/builds/38215)
5 years, 9 months ago (2015-03-04 05:34:45 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/943463002/80001
5 years, 9 months ago (2015-03-04 08:22:26 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/943463002/100001
5 years, 9 months ago (2015-03-04 10:01:36 UTC) #40
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://src.chromium.org/viewvc/blink?view=rev&revision=191273
5 years, 9 months ago (2015-03-04 11:29:18 UTC) #41
changseok
5 years, 9 months ago (2015-03-04 11:30:39 UTC) #42
Message was sent while issue was closed.
On 2015/03/04 11:29:18, I haz the power (commit-bot) wrote:
> Committed patchset #6 (id:100001) as
> https://src.chromium.org/viewvc/blink?view=rev&revision=191273

Finally! Thanks all \o/

Powered by Google App Engine
This is Rietveld 408576698