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

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

Issue 23581008: Revert r154797: "Move isValid/isCurrentColor from Color to StyleColor" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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: Source/core/dom/TextLinkColors.cpp
diff --git a/Source/core/dom/TextLinkColors.cpp b/Source/core/dom/TextLinkColors.cpp
index a48f7318f25a2f1fd235dacae0267464f4aa508d..42b61c7ee59e8d09714f096617edd5db31423aff 100644
--- a/Source/core/dom/TextLinkColors.cpp
+++ b/Source/core/dom/TextLinkColors.cpp
@@ -44,17 +44,17 @@ TextLinkColors::TextLinkColors()
void TextLinkColors::resetLinkColor()
{
- m_linkColor = StyleColor(0, 0, 238);
+ m_linkColor = Color(0, 0, 238);
}
void TextLinkColors::resetVisitedLinkColor()
{
- m_visitedLinkColor = StyleColor(85, 26, 139);
+ m_visitedLinkColor = Color(85, 26, 139);
}
void TextLinkColors::resetActiveLinkColor()
{
- m_activeLinkColor = StyleColor(255, 0, 0);
+ m_activeLinkColor.setNamedColor("red");
}
static Color colorForCSSValue(CSSValueID cssValueId)
@@ -94,10 +94,10 @@ static Color colorForCSSValue(CSSValueID cssValueId)
return RenderTheme::theme().systemColor(cssValueId);
}
-StyleColor TextLinkColors::colorFromPrimitiveValue(const CSSPrimitiveValue* value, bool forVisitedLink) const
+Color TextLinkColors::colorFromPrimitiveValue(const CSSPrimitiveValue* value, Color currentColor, bool forVisitedLink) const
{
if (value->isRGBColor())
- return StyleColor(value->getRGBA32Value());
+ return Color(value->getRGBA32Value());
CSSValueID valueID = value->getValueID();
switch (valueID) {
@@ -112,7 +112,7 @@ StyleColor TextLinkColors::colorFromPrimitiveValue(const CSSPrimitiveValue* valu
case CSSValueWebkitFocusRingColor:
return RenderTheme::focusRingColor();
case CSSValueCurrentcolor:
- return StyleColor::currentColor();
+ return currentColor;
default:
return colorForCSSValue(valueID);
}

Powered by Google App Engine
This is Rietveld 408576698