RESOLVED FIXED 83404
Remove dead code in SVGCSSParser
https://bugs.webkit.org/show_bug.cgi?id=83404
Summary Remove dead code in SVGCSSParser
Rob Buis
Reported 2012-04-06 15:40:51 PDT
The CSSPropertyColor handling code is unreachable, because CSSParser handles it. I think this was kept as a possible way to deal with SVGColor interface (bug 15012), but since it is deprecated this code is really not needed anymore.
Attachments
Patch (1.58 KB, patch)
2012-04-06 15:47 PDT, Rob Buis
zimmermann: review+
Patch (5.48 KB, patch)
2012-04-06 19:21 PDT, Rob Buis
zimmermann: review+
Rob Buis
Comment 1 2012-04-06 15:47:43 PDT
Rob Buis
Comment 2 2012-04-06 19:21:30 PDT
Nikolas Zimmermann
Comment 3 2012-04-06 23:57:05 PDT
Comment on attachment 136080 [details] Patch CSSPropertyColor is already handled by CSSParser I guess, so we never reach this code path? If so, please include this in the ChangeLog ("why" change logs are better than "what" change logs). Still r=me.
Nikolas Zimmermann
Comment 4 2012-04-06 23:58:57 PDT
Comment on attachment 136120 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=136120&action=review Ah, just saw you posted a new patch, r=me for that as well, as it resolved my issue :-) > LayoutTests/svg/custom/script-tests/currentColor-on-color.js:13 > +rectElement.setAttribute("color", "currentColor"); This is not needed, is it? > LayoutTests/svg/custom/script-tests/currentColor-on-color.js:19 > +shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).color", "rgb(0, 128, 0)"); s/document.defaultView// (it's not need).
Rob Buis
Comment 5 2012-04-07 04:32:24 PDT
Hi Niko, Thanks for the review! (In reply to comment #4) > (From update of attachment 136120 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=136120&action=review > > Ah, just saw you posted a new patch, r=me for that as well, as it resolved my issue :-) Nice :) > > LayoutTests/svg/custom/script-tests/currentColor-on-color.js:13 > > +rectElement.setAttribute("color", "currentColor"); > > This is not needed, is it? I think it is. Read the LayoutTests Changelog :) Basically we inherit the color=currentColor CSS3 behaviour from CSSParser.cpp (matches what FF does), and I agreed with Dirk to make a regression test for that since we are giving up dealing with color property in SVGCSSParser.cpp, based on his bug and closing of bug 15012. > > LayoutTests/svg/custom/script-tests/currentColor-on-color.js:19 > > +shouldBeEqualToString("document.defaultView.getComputedStyle(rectElement).color", "rgb(0, 128, 0)"); > > s/document.defaultView// (it's not need). Great! Will fix before landing. Cheers, Rob.
Rob Buis
Comment 6 2012-04-17 07:10:07 PDT
Fix landed in r113546.
Note You need to log in before you can comment on or make changes to this bug.