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

Unified Diff: Source/core/html/HTMLElement.cpp

Issue 20061003: Move isValid/isCurrentColor from Color to StyleColor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index 54a2bbb4075d3ae94baeb7c7e6747fa5f0dfb5f8..2b9bf8629115bed4b42e34d7cdb3f50258b78e46 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -1054,9 +1054,9 @@ void HTMLElement::addHTMLColorToStyle(MutableStylePropertySet* style, CSSPropert
return;
// If the string is a named CSS color or a 3/6-digit hex color, use that.
- Color parsedColor(colorString);
+ StyleColor parsedColor(colorString);
if (!parsedColor.isValid())
- parsedColor.setRGB(parseColorStringWithCrazyLegacyRules(colorString));
+ parsedColor = parseColorStringWithCrazyLegacyRules(colorString);
style->setProperty(propertyID, cssValuePool().createColorValue(parsedColor.rgb()));
}

Powered by Google App Engine
This is Rietveld 408576698