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

Unified Diff: third_party/WebKit/Source/core/css/StyleColor.h

Issue 2345543002: debugging for crbug.com/646539
Patch Set: 3 TUs, 2 .h Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/StyleColor.h
diff --git a/third_party/WebKit/Source/core/css/StyleColor.h b/third_party/WebKit/Source/core/css/StyleColor.h
index 30248269a3015d9b7e3a06664c132f5c7bc6a361..88f11ae377e6cf0076039e42c8d00853df9e72e0 100644
--- a/third_party/WebKit/Source/core/css/StyleColor.h
+++ b/third_party/WebKit/Source/core/css/StyleColor.h
@@ -31,46 +31,11 @@
#ifndef StyleColor_h
#define StyleColor_h
-#include "core/CSSValueKeywords.h"
#include "platform/graphics/Color.h"
-#include "wtf/Allocator.h"
+#include "wtf/Assertions.h"
namespace blink {
-class StyleColor {
- DISALLOW_NEW();
-public:
- StyleColor() : m_currentColor(true) { }
- StyleColor(Color color) : m_color(color), m_currentColor(false) { }
- static StyleColor currentColor() { return StyleColor(); }
-
- bool isCurrentColor() const { return m_currentColor; }
- Color getColor() const { ASSERT(!isCurrentColor()); return m_color; }
-
- Color resolve(Color currentColor) const { return m_currentColor ? currentColor : m_color; }
-
- static Color colorFromKeyword(CSSValueID);
- static bool isColorKeyword(CSSValueID);
- static bool isSystemColor(CSSValueID);
-
-private:
- Color m_color;
- bool m_currentColor;
-};
-
-inline bool operator==(const StyleColor& a, const StyleColor& b)
-{
- if (a.isCurrentColor() || b.isCurrentColor())
- return a.isCurrentColor() && b.isCurrentColor();
- return a.getColor() == b.getColor();
-}
-
-inline bool operator!=(const StyleColor& a, const StyleColor& b)
-{
- return !(a == b);
-}
-
-
} // namespace blink
#endif // StyleColor_h
« no previous file with comments | « third_party/WebKit/Source/core/css/BUILD.gn ('k') | third_party/WebKit/Source/core/css/parser/CSSParserMode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698