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

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 and review feedback 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 06f62ac8cc7594b46e08be6db4aab465338dd797..10b70d9a88e4430213be4cae4bd6724dcccc80f4 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();
« no previous file with comments | « third_party/WebKit/Source/core/dom/TextLinkColors.h ('k') | third_party/WebKit/Source/core/editing/EditingStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698