Title: [177720] trunk/Source/WebCore
Revision
177720
Author
[email protected]
Date
2014-12-23 20:58:51 -0800 (Tue, 23 Dec 2014)

Log Message

Simplify RenderStyle::invalidColor() function
https://bugs.webkit.org/show_bug.cgi?id=139898

Reviewed by Andreas Kling.

Simplify RenderStyle::invalidColor() function by getting rid of the
static variable. The default constructor for Color is very cheap
anyway.

* rendering/style/RenderStyle.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (177719 => 177720)


--- trunk/Source/WebCore/ChangeLog	2014-12-24 04:50:15 UTC (rev 177719)
+++ trunk/Source/WebCore/ChangeLog	2014-12-24 04:58:51 UTC (rev 177720)
@@ -1,3 +1,16 @@
+2014-12-23  Chris Dumez  <[email protected]>
+
+        Simplify RenderStyle::invalidColor() function
+        https://bugs.webkit.org/show_bug.cgi?id=139898
+
+        Reviewed by Andreas Kling.
+
+        Simplify RenderStyle::invalidColor() function by getting rid of the
+        static variable. The default constructor for Color is very cheap
+        anyway.
+
+        * rendering/style/RenderStyle.h:
+
 2014-12-23  Jaehun Lim  <[email protected]>
 
         Unreviewed, fix build warning after r177712

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (177719 => 177720)


--- trunk/Source/WebCore/rendering/style/RenderStyle.h	2014-12-24 04:50:15 UTC (rev 177719)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h	2014-12-24 04:58:51 UTC (rev 177720)
@@ -2083,7 +2083,7 @@
     }
 
     // Color accessors are all private to make sure callers use visitedDependentColor instead to access them.
-    static Color invalidColor() { static Color invalid; return invalid; }
+    static Color invalidColor() { return Color(); }
     Color borderLeftColor() const { return surround->border.left().color(); }
     Color borderRightColor() const { return surround->border.right().color(); }
     Color borderTopColor() const { return surround->border.top().color(); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to