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

Issue 2100013002: Implement the new text-size-adjust CSS property (Closed)

Created:
4 years, 5 months ago by pdr.
Modified:
4 years, 5 months ago
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-layout_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rwlbuis, 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

Implement the new text-size-adjust CSS property This patch adds a new CSS property for controlling text autosizing: text-size-adjust (https://drafts.csswg.org/css-size-adjust). Intent to implement and ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/-vHFK4g93jA/JW9wAJyKAQAJ At a high level, this patch adds a new CSS property and plumbs it to storage on the rare inherited style data. The new datatype for this is "TextSizeAdjust" which just wraps a float with logic for storing both a floating point adjustment value, and whether 'auto' should be used. The text autosizer itself has been modified to read this new property. A few changes were needed to allow the text autosizer to use multipliers less than 1 (see: TextAutosizer::computeAutosizedFontSize and callers to that function). The simple-paragraph.html layouttest has been switched to a unit test to prove the unit test infrastructure works, and many new tests have been added for the text-size-adjust feature. BUG=623158 Committed: https://crrev.com/5365b8ad85c2f5cee6034b8baea3c764ed78e1ea Cr-Commit-Position: refs/heads/master@{#402916}

Patch Set 1 #

Patch Set 2 : Update virtual expectation, minor cleanup. #

Total comments: 6

Patch Set 3 : Update checks for multiplier < 1,tyle/ComputedStyle.cpp:1412: desc.setComputedSize(std::max(std::mi… #

Patch Set 4 : Update checks for multiplier < 1 #

Total comments: 2

Patch Set 5 : Cleanup convertTextSizeAdjust and add a test that better covers it #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+374 lines, -56 lines) Patch
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-listing-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/text-autosizing/simple-paragraph.html View 1 chunk +0 lines, -22 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/text-autosizing/simple-paragraph-expected.html View 1 chunk +0 lines, -20 lines 0 comments Download
M third_party/WebKit/LayoutTests/svg/css/getComputedStyle-listing-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/stable/webexposed/css-properties-as-js-properties-expected.txt View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/css-properties-as-js-properties-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSComputedStyleDeclaration.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/CSSProperties.in View 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 2 chunks +11 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp View 1 2 2 chunks +2 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h View 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp View 1 2 3 4 2 chunks +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.cpp View 2 chunks +3 lines, -2 lines 1 comment Download
M third_party/WebKit/Source/core/layout/TextAutosizer.cpp View 1 2 3 chunks +11 lines, -1 line 0 comments Download
A third_party/WebKit/Source/core/layout/TextAutosizerTest.cpp View 1 2 3 4 1 chunk +250 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 3 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.cpp View 1 2 3 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleRareInheritedData.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/style/StyleRareInheritedData.cpp View 4 chunks +5 lines, -1 line 0 comments Download
A third_party/WebKit/Source/core/style/TextSizeAdjust.h View 1 1 chunk +50 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (15 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2100013002/1
4 years, 5 months ago (2016-06-27 03:38:19 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2100013002/20001
4 years, 5 months ago (2016-06-27 04:32:12 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-27 06:02:00 UTC) #6
pdr.
timloh, can you review the CSS property plumbing side of things? skobes, can you review ...
4 years, 5 months ago (2016-06-27 17:59:49 UTC) #9
skobes
https://codereview.chromium.org/2100013002/diff/20001/third_party/WebKit/Source/core/layout/TextAutosizer.cpp File third_party/WebKit/Source/core/layout/TextAutosizer.cpp (right): https://codereview.chromium.org/2100013002/diff/20001/third_party/WebKit/Source/core/layout/TextAutosizer.cpp#newcode993 third_party/WebKit/Source/core/layout/TextAutosizer.cpp:993: } else if (multiplier < 1) { Some callers ...
4 years, 5 months ago (2016-06-27 21:37:03 UTC) #10
pdr.
Good catches! Code updated and change description updated to mention the multiplier changes. PTAL https://codereview.chromium.org/2100013002/diff/20001/third_party/WebKit/Source/core/layout/TextAutosizer.cpp ...
4 years, 5 months ago (2016-06-27 22:29:43 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2100013002/60001
4 years, 5 months ago (2016-06-27 22:31:05 UTC) #14
skobes
lgtm
4 years, 5 months ago (2016-06-27 22:41:40 UTC) #15
pdr.
On 2016/06/27 at 22:41:40, skobes wrote: > lgtm Tanks! timloh, can you review the CSS ...
4 years, 5 months ago (2016-06-27 22:43:49 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-06-28 00:25:58 UTC) #18
Timothy Loh
css plumbing lgtm https://codereview.chromium.org/2100013002/diff/60001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp (right): https://codereview.chromium.org/2100013002/diff/60001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp#newcode943 third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp:943: if (value.isPrimitiveValue()) { I'd probably write ...
4 years, 5 months ago (2016-06-28 00:50:26 UTC) #19
pdr.
Thanks all, off to the CQ https://codereview.chromium.org/2100013002/diff/60001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp (right): https://codereview.chromium.org/2100013002/diff/60001/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp#newcode943 third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp:943: if (value.isPrimitiveValue()) { ...
4 years, 5 months ago (2016-06-28 16:38:57 UTC) #20
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/2100013002/80001
4 years, 5 months ago (2016-06-28 16:45:38 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/208536)
4 years, 5 months ago (2016-06-28 16:55:43 UTC) #25
pdr.
+cc chrishtr for third_party/WebKit/LayoutTests/virtual/stable/webexposed OWNERS. Please CQ as well.
4 years, 5 months ago (2016-06-28 16:58:04 UTC) #27
pdr.
Ping chrishtr
4 years, 5 months ago (2016-06-29 17:03:42 UTC) #28
chrishtr
lgtm
4 years, 5 months ago (2016-06-29 18:03:31 UTC) #29
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/2100013002/80001
4 years, 5 months ago (2016-06-29 18:18:44 UTC) #31
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 5 months ago (2016-06-29 20:06:56 UTC) #32
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-06-29 20:07:33 UTC) #33
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/5365b8ad85c2f5cee6034b8baea3c764ed78e1ea Cr-Commit-Position: refs/heads/master@{#402916}
4 years, 5 months ago (2016-06-29 20:10:00 UTC) #35
ymalik
4 years, 5 months ago (2016-07-12 14:40:56 UTC) #37
Message was sent while issue was closed.
https://codereview.chromium.org/2100013002/diff/80001/third_party/WebKit/Sour...
File third_party/WebKit/Source/core/frame/UseCounter.cpp (right):

https://codereview.chromium.org/2100013002/diff/80001/third_party/WebKit/Sour...
third_party/WebKit/Source/core/frame/UseCounter.cpp:567: case
CSSPropertyAliasWebkitTextSizeAdjust: return 537;
Did you miss running histograms.xml after? I was adding a use counter and
noticed update_use_counter_css.py add histograms for this. 

Fix here: https://codereview.chromium.org/2140173002/.

Powered by Google App Engine
This is Rietveld 408576698