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

Unified Diff: Source/core/html/HTMLElement.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/html/HTMLElement.cpp
diff --git a/Source/core/html/HTMLElement.cpp b/Source/core/html/HTMLElement.cpp
index 503fe07915439bf4f6c60b8bc49dedc0bc312079..8dfbcfa4a0e6ad8c4fb2db86822329bd2cde9ebd 100644
--- a/Source/core/html/HTMLElement.cpp
+++ b/Source/core/html/HTMLElement.cpp
@@ -1063,9 +1063,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.
- StyleColor parsedColor(colorString);
+ Color parsedColor(colorString);
if (!parsedColor.isValid())
- parsedColor = parseColorStringWithCrazyLegacyRules(colorString);
+ parsedColor.setRGB(parseColorStringWithCrazyLegacyRules(colorString));
style->setProperty(propertyID, cssValuePool().createColorValue(parsedColor.rgb()));
}

Powered by Google App Engine
This is Rietveld 408576698