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

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
« no previous file with comments | « LayoutTests/fast/dom/HTMLHrElement/script-tests/color-noshade-attribute.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLHRElement.cpp
diff --git a/Source/core/html/HTMLHRElement.cpp b/Source/core/html/HTMLHRElement.cpp
index e8a35a1c550f078c28c5aeb9efac9244d1df8f68..912c589e927827e4183666eef859a4be03da5150 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);
- RefPtrWillBeRawPtr<CSSPrimitiveValue> darkGrayValue = cssValuePool().createColorValue(Color::darkGray);
- style->setProperty(CSSPropertyBorderColor, darkGrayValue);
- style->setProperty(CSSPropertyBackgroundColor, darkGrayValue);
+ RefPtrWillBeRawPtr<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();
« no previous file with comments | « LayoutTests/fast/dom/HTMLHrElement/script-tests/color-noshade-attribute.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698