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

Unified Diff: Source/core/animation/css/CSSAnimatableValueFactory.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/animation/css/CSSAnimatableValueFactory.cpp
diff --git a/Source/core/animation/css/CSSAnimatableValueFactory.cpp b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
index 8d4bf344fd05adf6cf2ff708e5f84cf6e3aa4bb4..e6f6418e31e6d3947f5545c5f962b1e589af3e32 100644
--- a/Source/core/animation/css/CSSAnimatableValueFactory.cpp
+++ b/Source/core/animation/css/CSSAnimatableValueFactory.cpp
@@ -102,18 +102,18 @@ inline static PassRefPtr<AnimatableValue> createFromLengthBox(const LengthBox le
PassRefPtr<AnimatableValue> CSSAnimatableValueFactory::createFromColor(CSSPropertyID property, const RenderStyle* style)
{
- StyleColor color = style->colorIncludingFallback(property, false);
- StyleColor visitedLinkColor = style->colorIncludingFallback(property, true);
- Color fallbackColor = style->color().color();
- Color fallbackVisitedLinkColor = style->visitedLinkColor().color();
+ Color color = style->colorIncludingFallback(property, false);
+ Color visitedLinkColor = style->colorIncludingFallback(property, true);
+ Color fallbackColor = style->color();
+ Color fallbackVisitedLinkColor = style->visitedLinkColor();
Color resolvedColor;
- if (color.isValid() && !color.isCurrentColor())
- resolvedColor = color.color();
+ if (color.isValid())
+ resolvedColor = color;
else
resolvedColor = fallbackColor;
Color resolvedVisitedLinkColor;
- if (visitedLinkColor.isValid() && !visitedLinkColor.isCurrentColor())
- resolvedVisitedLinkColor = visitedLinkColor.color();
+ if (visitedLinkColor.isValid())
+ resolvedVisitedLinkColor = visitedLinkColor;
else
resolvedVisitedLinkColor = fallbackVisitedLinkColor;
return AnimatableColor::create(resolvedColor, resolvedVisitedLinkColor);

Powered by Google App Engine
This is Rietveld 408576698