Move color CSS properties to the new StyleBuilder.
Created attachment 243665 [details] Patch
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.
Created attachment 243677 [details] Patch
(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.
Comment on attachment 243677 [details] Patch Clearing flags on attachment: 243677 Committed r177687: <http://trac.webkit.org/changeset/177687>
All reviewed patches have been landed. Closing bug.
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(); }
Reopening to attach new patch.
Created attachment 243689 [details] Patch
(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.
Comment on attachment 243689 [details] Patch Clearing flags on attachment: 243689 Committed r177720: <http://trac.webkit.org/changeset/177720>