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

Issue 1455153003: Fix animation of 'color' w/ currentColor for SVG 'fill' and 'stroke' (Closed)

Created:
5 years, 1 month ago by hyunjunekim2
Modified:
4 years, 11 months ago
Reviewers:
pdr., fs
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, krit, eae+blinkwatch, f(malita), gyuyoung2, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, 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

Fix animation of 'color' w/ currentColor for SVG 'fill' and 'stroke' When animating 'color', 'fill' or 'stroke' properties with the value 'currentColor' doesn't repaint properly, or with the right color. For SVG elements which has 'currentColor' as part of their 'fill' or 'stroke' property, make sure they get repainted when 'color' changes. BUG=537807 Committed: https://crrev.com/ba6fc5130a3ca06c653ece942a19d06e64be187d Cr-Commit-Position: refs/heads/master@{#367286}

Patch Set 1 #

Patch Set 2 : Draft #

Patch Set 3 : Draft2 #

Patch Set 4 : Draft3 #

Total comments: 3

Patch Set 5 : #

Patch Set 6 : Draft4 #

Total comments: 8

Patch Set 7 : Draft5 #

Patch Set 8 : #

Total comments: 1

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Total comments: 9

Patch Set 12 : modify a test. #

Total comments: 2

Patch Set 13 : #

Patch Set 14 : indentation #

Patch Set 15 : Just Draft #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : #

Patch Set 19 : #

Patch Set 20 : Remove color-prop-05-t. #

Patch Set 21 : #

Patch Set 22 : #

Patch Set 23 : #

Patch Set 24 : #

Total comments: 3

Patch Set 25 : #

Patch Set 26 : rebase it #

Patch Set 27 : split #

Patch Set 28 : split 2 #

Total comments: 2

Patch Set 29 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -2 lines) Patch
A third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +28 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/SVGComputedStyle.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 80 (22 generated)
hyunjunekim2
pdr, fs, Hi, i'm hyunjune kim. Could you check this patch or give me a ...
5 years, 1 month ago (2015-11-20 15:54:20 UTC) #3
fs
For some reason I'm no longer allowed to look at this bug (=/), but I ...
5 years, 1 month ago (2015-11-20 16:27:14 UTC) #4
hyunjunekim2
fs, Okay, I will check it.
5 years, 1 month ago (2015-11-23 12:00:02 UTC) #5
hyunjunekim2
https://codereview.chromium.org/1455153003/diff/60001/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp File third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp (right): https://codereview.chromium.org/1455153003/diff/60001/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp#newcode380 third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp:380: if (state.element()->isSVGElement()) { On 2015/11/20 16:27:14, fs wrote: > ...
5 years ago (2015-11-24 08:07:36 UTC) #6
fs
On 2015/11/24 at 08:07:36, hyunjune.kim wrote: > https://codereview.chromium.org/1455153003/diff/60001/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp > File third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp (right): > > https://codereview.chromium.org/1455153003/diff/60001/third_party/WebKit/Source/core/css/resolver/AnimatedStyleBuilder.cpp#newcode380 ...
5 years ago (2015-11-24 10:01:43 UTC) #7
hyunjunekim2
fs, I tried to resolve currentColor. But for resolving on requestPaint, need to handle whether ...
5 years ago (2015-11-25 10:15:12 UTC) #8
fs
On 2015/11/25 at 10:15:12, hyunjune.kim wrote: > fs, I tried to resolve currentColor. But for ...
5 years ago (2015-11-25 13:21:05 UTC) #9
hyunjunekim2
fs, Could you check PS6? Thank you :)
5 years ago (2015-11-25 16:08:13 UTC) #10
fs
Please add a test. https://codereview.chromium.org/1455153003/diff/100001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/1455153003/diff/100001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode174 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:174: if (isFillCurrentColor || isStrokeCurrentColor) Why ...
5 years ago (2015-11-25 17:23:00 UTC) #11
hyunjunekim2
Ok, i am going to add test cases. https://codereview.chromium.org/1455153003/diff/100001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/1455153003/diff/100001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode174 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:174: if ...
5 years ago (2015-11-26 01:07:26 UTC) #12
fs
https://codereview.chromium.org/1455153003/diff/100001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/1455153003/diff/100001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode174 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:174: if (isFillCurrentColor || isStrokeCurrentColor) On 2015/11/26 at 01:07:26, hyunjunekim2 ...
5 years ago (2015-11-26 11:30:34 UTC) #13
hyunjunekim2
fs, I uploaded new patch. and tomorrow i will make tests.
5 years ago (2015-11-26 15:51:41 UTC) #14
fs
https://codereview.chromium.org/1455153003/diff/140001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp File third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp (right): https://codereview.chromium.org/1455153003/diff/140001/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp#newcode179 third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp:179: state.style()->setColor(state.style()->svgStyle().fillPaintColor()); You shouldn't be overriding the value of 'color' ...
5 years ago (2015-11-27 08:50:25 UTC) #15
hyunjunekim2
I am working in progress to make a test.
5 years ago (2015-11-29 13:32:04 UTC) #16
hyunjunekim2
fs, I made a test, but i guess it's not good. Could you give me ...
5 years ago (2015-12-06 13:13:15 UTC) #17
fs
On 2015/12/06 at 13:13:15, hyunjune.kim wrote: > fs, I made a test, but i guess ...
5 years ago (2015-12-07 11:49:52 UTC) #18
hyunjunekim2
fs, Could you check this test(color-fill-currentColor-and-css.html)? It's possible to check repaint through color-fill-currentColor-and-css-expected.txt.
5 years ago (2015-12-14 21:44:48 UTC) #20
fs
https://codereview.chromium.org/1455153003/diff/200001/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html File third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html (right): https://codereview.chromium.org/1455153003/diff/200001/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html#newcode6 third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html:6: var rootSVGElement; You don't need this. https://codereview.chromium.org/1455153003/diff/200001/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html#newcode8 third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html:8: function ...
5 years ago (2015-12-15 11:36:24 UTC) #21
hyunjunekim2
fs, Could you check test? and i am going to check StyleBuilderCustom.cpp. Thank you.
5 years ago (2015-12-15 15:04:14 UTC) #22
fs
https://codereview.chromium.org/1455153003/diff/220001/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html File third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html (right): https://codereview.chromium.org/1455153003/diff/220001/third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html#newcode16 third_party/WebKit/LayoutTests/svg/repaint/color-fill-currentColor-and-css.html:16: setInterval(interval, 1); Use requestAnimationFrame instead - or maybe runAfterLayoutAndPaint. ...
5 years ago (2015-12-15 15:34:57 UTC) #23
hyunjunekim2
fs, I worked test on ps13. Thank you. And about StyleBuilderCustom.cpp, why not inherit color?
5 years ago (2015-12-16 15:03:41 UTC) #24
hyunjunekim2
fs, I checked it. this code has a bug. for example, <svg version="1.1" baseProfile="tiny" id="svg-root" ...
5 years ago (2015-12-16 15:24:03 UTC) #25
fs
On 2015/12/16 at 15:03:41, hyunjune.kim wrote: > fs, I worked test on ps13. Thank you. ...
5 years ago (2015-12-16 15:47:27 UTC) #26
fs
On 2015/12/16 at 15:24:03, hyunjune.kim wrote: > fs, I checked it. this code has a ...
5 years ago (2015-12-16 15:49:08 UTC) #27
hyunjunekim2
fs, Hi, I uploaded just version which is ps15. > I'm still a bit puzzled ...
5 years ago (2015-12-17 08:03:14 UTC) #28
fs
On 2015/12/17 at 08:03:14, hyunjune.kim wrote: > fs, Hi, I uploaded just version which is ...
5 years ago (2015-12-17 11:18:15 UTC) #29
hyunjunekim2
On 2015/12/17 11:18:15, fs wrote: > On 2015/12/17 at 08:03:14, hyunjune.kim wrote: > > fs, ...
5 years ago (2015-12-17 12:13:55 UTC) #30
hyunjunekim2
fs, <g fill="currentColor" color="blue"> <rect id="rect" x="120" y="60" width="150" height="150" color="red"/> </g> Currently g element's ...
5 years ago (2015-12-17 12:26:54 UTC) #31
hyunjunekim2
Because of color type(SVG_PAINTTYPE_CURRENTCOLOR), So this confusion comes from LayoutSVGResourcePaintServer.cpp.
5 years ago (2015-12-17 12:43:44 UTC) #32
fs
On 2015/12/17 at 12:26:54, hyunjune.kim wrote: > fs, > <g fill="currentColor" color="blue"> > <rect id="rect" ...
5 years ago (2015-12-17 12:53:41 UTC) #33
hyunjunekim2
fs, If inherit fillPaintType, <g fill="currentColor" color="blue"> <rect id="rect" x="120" y="60" width="150" height="150" color="red"/> </g> ...
5 years ago (2015-12-17 13:09:03 UTC) #35
fs
On 2015/12/17 at 13:09:03, hyunjune.kim wrote: > fs, If inherit fillPaintType, > > <g fill="currentColor" ...
5 years ago (2015-12-17 13:23:35 UTC) #36
hyunjunekim2
fs, <g fill="currentColor" color="blue"> <rect id="rect" x="120" y="60" width="150" height="150" color="red"/> </g> On the this ...
5 years ago (2015-12-17 13:34:51 UTC) #37
hyunjunekim2
>> <g fill="currentColor" color="blue"> >> <rect id="rect" x="120" y="60" width="150" height="150" color="red"/> >> </g> >> ...
5 years ago (2015-12-17 13:39:57 UTC) #38
hyunjunekim2
On 2015/12/17 13:39:57, hyunjunekim2 wrote: > >> <g fill="currentColor" color="blue"> > >> <rect id="rect" x="120" ...
5 years ago (2015-12-17 13:40:45 UTC) #39
fs
On 2015/12/17 at 13:34:51, hyunjune.kim wrote: > fs, > <g fill="currentColor" color="blue"> > <rect id="rect" ...
5 years ago (2015-12-17 13:45:23 UTC) #40
fs
On 2015/12/17 at 13:40:45, hyunjune.kim wrote: > On 2015/12/17 13:39:57, hyunjunekim2 wrote: > > >> ...
5 years ago (2015-12-17 13:46:27 UTC) #41
hyunjunekim2
On 2015/12/17 13:45:23, fs wrote: > On 2015/12/17 at 13:34:51, hyunjune.kim wrote: > > fs, ...
5 years ago (2015-12-17 14:12:37 UTC) #42
fs
On 2015/12/17 at 14:12:37, hyunjune.kim wrote: > On 2015/12/17 13:45:23, fs wrote: > > On ...
5 years ago (2015-12-17 14:27:18 UTC) #43
hyunjunekim2
fs, Could you check PS 20? i removed color-prop-05-t files, and i will make new ...
5 years ago (2015-12-18 06:04:38 UTC) #56
fs
On 2015/12/18 at 06:04:38, hyunjune.kim wrote: > fs, Could you check PS 20? i removed ...
5 years ago (2015-12-18 11:56:33 UTC) #58
hyunjunekim2
> I don't think we should remove color-prop-05-t.svg, but rather just update the expected result ...
5 years ago (2015-12-21 15:53:52 UTC) #59
fs
On 2015/12/21 at 15:53:52, hyunjune.kim wrote: > > I don't think we should remove color-prop-05-t.svg, ...
5 years ago (2015-12-21 16:04:32 UTC) #60
hyunjunekim2
>much preferable to split that change into a separate CL though so that we have ...
5 years ago (2015-12-21 23:02:24 UTC) #61
fs
On 2015/12/21 at 23:02:24, hyunjune.kim wrote: > >much preferable to split that change into a ...
5 years ago (2015-12-22 09:09:23 UTC) #62
hyunjunekim2
fs, Could you check PS25? Thank you.
5 years ago (2015-12-22 13:37:02 UTC) #63
hyunjunekim2
Re-based it.
5 years ago (2015-12-22 13:47:39 UTC) #64
fs
On 2015/12/22 at 13:37:02, hyunjune.kim wrote: > fs, Could you check PS25? Thank you. Yes, ...
5 years ago (2015-12-22 13:53:34 UTC) #65
hyunjunekim2
On 2015/12/22 13:53:34, fs wrote: > On 2015/12/22 at 13:37:02, hyunjune.kim wrote: > > fs, ...
5 years ago (2015-12-22 14:07:59 UTC) #66
hyunjunekim2
fs, Do you say that try spliting currentColor-inheritance-about-fill-color.svg?
5 years ago (2015-12-22 14:10:05 UTC) #67
fs
On 2015/12/22 at 14:10:05, hyunjune.kim wrote: > fs, Do you say that try spliting currentColor-inheritance-about-fill-color.svg? ...
5 years ago (2015-12-22 14:18:14 UTC) #68
hyunjunekim2
fs, Could you check PS27? and the split out CL is this one(https://codereview.chromium.org/1545673002/). Thank you.
5 years ago (2015-12-22 15:28:14 UTC) #69
hyunjunekim2
fs, merged this one(https://codereview.chromium.org/1545673002/). Could you check PS28? Thank you.
5 years ago (2015-12-23 15:52:54 UTC) #71
fs
LGTM w/ minor style nit https://codereview.chromium.org/1455153003/diff/540001/third_party/WebKit/Source/core/style/SVGComputedStyle.h File third_party/WebKit/Source/core/style/SVGComputedStyle.h (right): https://codereview.chromium.org/1455153003/diff/540001/third_party/WebKit/Source/core/style/SVGComputedStyle.h#newcode369 third_party/WebKit/Source/core/style/SVGComputedStyle.h:369: || visitedLinkFillPaintType() == SVG_PAINTTYPE_CURRENTCOLOR ...
5 years ago (2015-12-23 16:13:43 UTC) #72
hyunjunekim2
On 2015/12/23 16:13:43, fs (OoO) wrote: > LGTM w/ minor style nit > > https://codereview.chromium.org/1455153003/diff/540001/third_party/WebKit/Source/core/style/SVGComputedStyle.h ...
4 years, 12 months ago (2015-12-24 02:45:10 UTC) #73
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1455153003/560001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1455153003/560001
4 years, 11 months ago (2016-01-03 09:43:36 UTC) #76
commit-bot: I haz the power
Committed patchset #29 (id:560001)
4 years, 11 months ago (2016-01-03 11:02:54 UTC) #78
commit-bot: I haz the power
4 years, 11 months ago (2016-01-03 11:03:54 UTC) #80
Message was sent while issue was closed.
Patchset 29 (id:??) landed as
https://crrev.com/ba6fc5130a3ca06c653ece942a19d06e64be187d
Cr-Commit-Position: refs/heads/master@{#367286}

Powered by Google App Engine
This is Rietveld 408576698