RESOLVED FIXED 139898
Move color CSS properties to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=139898
Summary Move color CSS properties to the new StyleBuilder
Chris Dumez
Reported 2014-12-22 19:59:06 PST
Move color CSS properties to the new StyleBuilder.
Attachments
Patch (31.23 KB, patch)
2014-12-22 22:20 PST, Chris Dumez
no flags
Patch (31.27 KB, patch)
2014-12-23 09:07 PST, Chris Dumez
no flags
Patch (1.55 KB, patch)
2014-12-23 13:45 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2014-12-22 22:20:14 PST
Antti Koivisto
Comment 2 2014-12-23 04:25:58 PST
Comment on attachment 243665 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=243665&action=review > Source/WebCore/css/CSSPropertyNames.in:69 > +// * ColorProperty: > +// Indicates that this CSS property is a color property with a > +// "setVisitedLinkXXX()" setter on RenderStyle to be called when > +// StyleResolver::applyPropertyToVisitedLinkStyle() return true. > +// The regular setter on RenderStyle will only be called if > +// StyleResolver::applyPropertyToRegularStyle() returns true. I think this should have a name that indicates that the property works for visited links. VisitedLinkSupportingColorProperty or something.
Chris Dumez
Comment 3 2014-12-23 09:07:47 PST
Chris Dumez
Comment 4 2014-12-23 09:08:24 PST
(In reply to comment #2) > Comment on attachment 243665 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=243665&action=review > > > Source/WebCore/css/CSSPropertyNames.in:69 > > +// * ColorProperty: > > +// Indicates that this CSS property is a color property with a > > +// "setVisitedLinkXXX()" setter on RenderStyle to be called when > > +// StyleResolver::applyPropertyToVisitedLinkStyle() return true. > > +// The regular setter on RenderStyle will only be called if > > +// StyleResolver::applyPropertyToRegularStyle() returns true. > > I think this should have a name that indicates that the property works for > visited links. VisitedLinkSupportingColorProperty or something. I used "VisitedLinkColorSupport" in the latest patch.
WebKit Commit Bot
Comment 5 2014-12-23 10:37:24 PST
Comment on attachment 243677 [details] Patch Clearing flags on attachment: 243677 Committed r177687: <http://trac.webkit.org/changeset/177687>
WebKit Commit Bot
Comment 6 2014-12-23 10:37:29 PST
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 7 2014-12-23 11:57:35 PST
Comment on attachment 243665 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=243665&action=review > Source/WebCore/rendering/style/RenderStyle.h:2086 > + static Color invalidColor() { static Color invalid; return invalid; } I just noticed this pointless global variable. How about just this? static Color invalidColor() { return Color(); }
Chris Dumez
Comment 8 2014-12-23 13:45:53 PST
Reopening to attach new patch.
Chris Dumez
Comment 9 2014-12-23 13:45:55 PST
Chris Dumez
Comment 10 2014-12-23 13:47:40 PST
(In reply to comment #7) > Comment on attachment 243665 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=243665&action=review > > > Source/WebCore/rendering/style/RenderStyle.h:2086 > > + static Color invalidColor() { static Color invalid; return invalid; } > > I just noticed this pointless global variable. How about just this? > > static Color invalidColor() { return Color(); } My guess is that the idea was to avoid calling the Color constructor every time. However, the default Color constructor is really cheap so this is likely not worth it. I uploaded another patch to fix this here.
WebKit Commit Bot
Comment 11 2014-12-23 20:58:54 PST
Comment on attachment 243689 [details] Patch Clearing flags on attachment: 243689 Committed r177720: <http://trac.webkit.org/changeset/177720>
WebKit Commit Bot
Comment 12 2014-12-23 20:59:00 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.