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

Issue 23241010: Support subpixel values for text-shadow and box-shadow (Closed)

Created:
7 years, 4 months ago by cbiesinger
Modified:
6 years, 11 months ago
CC:
blink-reviews, shans, rjwright, alancutter (OOO until 2018), Mike Lawther (Google), jeez, eae+blinkwatch, dglazkov+blink, leviw+renderwatch, dstockwell, Timothy Loh, apavlov+blink_chromium.org, jchaffraix+rendering, darktears, Steve Block, dino_apple.com, Eric Willigers
Visibility:
Public.

Description

Support subpixel values for text-shadow and box-shadow This converts the int members of ShadowData to LayoutUnit and chases them through the callstack. The actual calls on the context were already using float. There are two caveats: - When border-radius is used, we don't support subpixel spread values. Subpixel blurs and offsets are still supported - For inset shadows, we don't support subpixel values Both limitations come from RoundedRect only supporting integer values. R=leviw@chromium.org BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165173

Patch Set 1 #

Patch Set 2 : found one more spot #

Total comments: 2

Patch Set 3 : tests fixed #

Patch Set 4 : rebased to trunk #

Patch Set 5 : all working! #

Total comments: 10

Patch Set 6 : review comments fixed, incl. LayoutUnit -> float #

Patch Set 7 : missed a virtual test #

Total comments: 10

Patch Set 8 : rebased to trunk #

Patch Set 9 : addressed review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+183 lines, -73 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M LayoutTests/animations/interpolation/box-shadow-interpolation-expected.txt View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M LayoutTests/animations/resources/animation-test-helpers.js View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
A LayoutTests/fast/sub-pixel/shadows-computed-style.html View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -0 lines 0 comments Download
A LayoutTests/fast/sub-pixel/shadows-computed-style-expected.txt View 1 2 3 4 5 6 7 8 1 chunk +12 lines, -0 lines 0 comments Download
A LayoutTests/fast/sub-pixel/shadows-hidpi.html View 1 2 3 4 5 6 7 8 1 chunk +43 lines, -0 lines 0 comments Download
A + LayoutTests/fast/sub-pixel/shadows-hidpi-expected.png View 1 2 3 4 Binary file 0 comments Download
A LayoutTests/fast/sub-pixel/shadows-hidpi-expected.txt View 1 2 3 4 1 chunk +20 lines, -0 lines 0 comments Download
M LayoutTests/virtual/legacy-animations-engine/animations/interpolation/box-shadow-interpolation-expected.txt View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/css/resolver/StyleBuilderConverter.cpp View 1 2 3 4 5 6 7 2 chunks +5 lines, -5 lines 0 comments Download
M Source/core/rendering/EllipsisBox.cpp View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/InlineTextBox.cpp View 1 2 3 4 5 6 7 3 chunks +8 lines, -8 lines 0 comments Download
M Source/core/rendering/RenderBoxModelObject.cpp View 1 2 3 4 5 6 7 8 5 chunks +21 lines, -13 lines 0 comments Download
M Source/core/rendering/style/RenderStyle.cpp View 1 2 3 4 5 6 7 4 chunks +4 lines, -4 lines 0 comments Download
M Source/core/rendering/style/ShadowData.h View 1 2 3 4 5 3 chunks +10 lines, -10 lines 0 comments Download
M Source/core/rendering/style/ShadowData.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/style/ShadowList.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 lines 0 comments Download
M Source/core/rendering/style/ShadowList.cpp View 1 2 3 4 5 6 7 8 4 chunks +13 lines, -20 lines 0 comments Download
M Source/platform/animation/AnimationUtilities.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
cbiesinger
I can't figure out how to write a test beyond computedstyle... suggestions welcome!
7 years, 4 months ago (2013-08-21 22:09:54 UTC) #1
eae
On 2013/08/21 22:09:54, cbiesinger wrote: > I can't figure out how to write a test ...
7 years, 4 months ago (2013-08-24 00:01:11 UTC) #2
cbiesinger
On 2013/08/24 00:01:11, eae wrote: > On 2013/08/21 22:09:54, cbiesinger wrote: > > I can't ...
7 years, 3 months ago (2013-08-27 21:57:21 UTC) #3
eae
On 2013/08/27 21:57:21, cbiesinger wrote: > On 2013/08/24 00:01:11, eae wrote: > > On 2013/08/21 ...
7 years, 3 months ago (2013-08-27 21:58:40 UTC) #4
cbiesinger
On 2013/08/27 21:58:40, eae wrote: > On 2013/08/27 21:57:21, cbiesinger wrote: > > On 2013/08/24 ...
7 years, 2 months ago (2013-10-23 23:01:14 UTC) #5
mithro-old
Random minor comments; Should there be a pixel test for this too? https://codereview.chromium.org/23241010/diff/4001/LayoutTests/animations/resources/animation-test-helpers.js File LayoutTests/animations/resources/animation-test-helpers.js ...
7 years, 2 months ago (2013-10-24 00:45:41 UTC) #6
cbiesinger
I have good news and bad news: I figured out how to test this correctly ...
7 years, 1 month ago (2013-10-26 01:26:05 UTC) #7
cbiesinger
Levi, Emil: Do you know if there's a reason why RoundedRect uses integer sizes instead ...
7 years, 1 month ago (2013-10-26 01:36:48 UTC) #8
cbiesinger
This is 90% complete, I just need to verify that subpixel spread values work correctly... ...
7 years, 1 month ago (2013-11-22 01:55:19 UTC) #9
cbiesinger
On 2013/11/22 01:55:19, cbiesinger wrote: > This is 90% complete, I just need to verify ...
7 years, 1 month ago (2013-11-23 00:23:57 UTC) #10
eae
On 2013/11/23 00:23:57, cbiesinger wrote: > On 2013/11/22 01:55:19, cbiesinger wrote: > > This is ...
7 years ago (2013-11-27 12:02:27 UTC) #11
cbiesinger
On 2013/11/27 12:02:27, eae wrote: > On 2013/11/23 00:23:57, cbiesinger wrote: > > On 2013/11/22 ...
7 years ago (2013-11-27 22:57:18 UTC) #12
cbiesinger
On 2013/11/27 22:57:18, cbiesinger wrote: > On 2013/11/27 12:02:27, eae wrote: > > On 2013/11/23 ...
7 years ago (2013-11-27 22:58:26 UTC) #13
eae
https://codereview.chromium.org/23241010/diff/230001/Source/core/rendering/RenderBoxModelObject.cpp File Source/core/rendering/RenderBoxModelObject.cpp (right): https://codereview.chromium.org/23241010/diff/230001/Source/core/rendering/RenderBoxModelObject.cpp#newcode2550 Source/core/rendering/RenderBoxModelObject.cpp:2550: // XXX is this IntRect conversion correct? Why not ...
7 years ago (2013-11-27 23:45:27 UTC) #14
dstockwell
https://codereview.chromium.org/23241010/diff/230001/LayoutTests/animations/interpolation/resources/interpolation-test.js File LayoutTests/animations/interpolation/resources/interpolation-test.js (right): https://codereview.chromium.org/23241010/diff/230001/LayoutTests/animations/interpolation/resources/interpolation-test.js#newcode197 LayoutTests/animations/interpolation/resources/interpolation-test.js:197: // Round numbers to one decimal place. Our layout ...
7 years ago (2013-11-27 23:49:30 UTC) #15
Timothy Loh
https://codereview.chromium.org/23241010/diff/230001/Source/core/rendering/style/ShadowData.h File Source/core/rendering/style/ShadowData.h (right): https://codereview.chromium.org/23241010/diff/230001/Source/core/rendering/style/ShadowData.h#newcode62 Source/core/rendering/style/ShadowData.h:62: LayoutPoint m_location; I don't think we store LayoutUnits/etc. in ...
7 years ago (2013-12-02 07:03:09 UTC) #16
cbiesinger
All comments fixed, please take another look. https://codereview.chromium.org/23241010/diff/230001/LayoutTests/animations/interpolation/resources/interpolation-test.js File LayoutTests/animations/interpolation/resources/interpolation-test.js (right): https://codereview.chromium.org/23241010/diff/230001/LayoutTests/animations/interpolation/resources/interpolation-test.js#newcode197 LayoutTests/animations/interpolation/resources/interpolation-test.js:197: // Round ...
7 years ago (2013-12-18 02:09:11 UTC) #17
cbiesinger
Happy new year, everyone! Levi, Emil - could you take another look?
6 years, 11 months ago (2014-01-09 02:18:17 UTC) #18
leviw_travelin_and_unemployed
2 Questions: why is the png a green box with no shadows and do we ...
6 years, 11 months ago (2014-01-14 22:28:34 UTC) #19
cbiesinger
https://codereview.chromium.org/23241010/diff/310001/LayoutTests/fast/sub-pixel/shadows-computed-style.html File LayoutTests/fast/sub-pixel/shadows-computed-style.html (right): https://codereview.chromium.org/23241010/diff/310001/LayoutTests/fast/sub-pixel/shadows-computed-style.html#newcode23 LayoutTests/fast/sub-pixel/shadows-computed-style.html:23: style = window.getComputedStyle(box, null); On 2014/01/14 22:28:35, Levi wrote: ...
6 years, 11 months ago (2014-01-15 21:27:39 UTC) #20
leviw_travelin_and_unemployed
Okay. LGTM.
6 years, 11 months ago (2014-01-15 21:33:52 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cbiesinger@chromium.org/23241010/500001
6 years, 11 months ago (2014-01-15 23:45:06 UTC) #22
commit-bot: I haz the power
6 years, 11 months ago (2014-01-15 23:54:04 UTC) #23
Message was sent while issue was closed.
Change committed as 165173

Powered by Google App Engine
This is Rietveld 408576698