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

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

Issue 162993002: hr color attribute not working. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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/HTMLHRElement.cpp
diff --git a/Source/core/html/HTMLHRElement.cpp b/Source/core/html/HTMLHRElement.cpp
index 7a6edf88eb51c5aeadaf83839ea9482c77a9624c..00f0cbde606c26f51df191bdb941bbcf8d0c6d75 100644
--- a/Source/core/html/HTMLHRElement.cpp
+++ b/Source/core/html/HTMLHRElement.cpp
@@ -76,11 +76,13 @@ void HTMLHRElement::collectStyleForPresentationAttribute(const QualifiedName& na
addHTMLColorToStyle(style, CSSPropertyBorderColor, value);
addHTMLColorToStyle(style, CSSPropertyBackgroundColor, value);
} else if (name == noshadeAttr) {
- addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderStyle, CSSValueSolid);
+ if (!hasAttribute(colorAttr)) {
+ addPropertyToPresentationAttributeStyle(style, CSSPropertyBorderStyle, CSSValueSolid);
- RefPtr<CSSPrimitiveValue> darkGrayValue = cssValuePool().createColorValue(Color::darkGray);
- style->setProperty(CSSPropertyBorderColor, darkGrayValue);
- style->setProperty(CSSPropertyBackgroundColor, darkGrayValue);
+ RefPtr<CSSPrimitiveValue> darkGrayValue = cssValuePool().createColorValue(Color::darkGray);
+ style->setProperty(CSSPropertyBorderColor, darkGrayValue);
+ style->setProperty(CSSPropertyBackgroundColor, darkGrayValue);
+ }
} else if (name == sizeAttr) {
StringImpl* si = value.impl();
int size = si->toInt();

Powered by Google App Engine
This is Rietveld 408576698