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

Unified Diff: third_party/WebKit/Source/core/dom/TextLinkColors.cpp

Issue 1376573004: Split out Color from CSSPrimitiveValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_property
Patch Set: Rebase Created 5 years, 2 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/dom/TextLinkColors.cpp
diff --git a/third_party/WebKit/Source/core/dom/TextLinkColors.cpp b/third_party/WebKit/Source/core/dom/TextLinkColors.cpp
index 64ad2c09e412215b9680c87a13f6eff8a60ae76c..d26bb348dd8e639d41b38b8c8fe0572406efc6e4 100644
--- a/third_party/WebKit/Source/core/dom/TextLinkColors.cpp
+++ b/third_party/WebKit/Source/core/dom/TextLinkColors.cpp
@@ -28,6 +28,7 @@
#include "config.h"
#include "core/dom/TextLinkColors.h"
+#include "core/css/CSSColorValue.h"
#include "core/css/CSSPrimitiveValue.h"
#include "core/css/StyleColor.h"
#include "core/layout/LayoutTheme.h"
@@ -58,12 +59,12 @@ void TextLinkColors::resetActiveLinkColor()
m_activeLinkColor = Color(255, 0, 0);
}
-Color TextLinkColors::colorFromPrimitiveValue(const CSSPrimitiveValue* value, Color currentColor, bool forVisitedLink) const
+Color TextLinkColors::colorFromCSSValue(const CSSValue* value, Color currentColor, bool forVisitedLink) const
{
- if (value->isRGBColor())
- return Color(value->getRGBA32Value());
+ if (value->isColorValue())
+ return Color(toCSSColorValue(value)->value());
- CSSValueID valueID = value->getValueID();
+ CSSValueID valueID = toCSSPrimitiveValue(value)->getValueID();
switch (valueID) {
case 0:
return Color();

Powered by Google App Engine
This is Rietveld 408576698