Index: third_party/WebKit/Source/core/html/HTMLBodyElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLBodyElement.cpp b/third_party/WebKit/Source/core/html/HTMLBodyElement.cpp |
index 3de09f468785710fffa0189a9774fcfa011f1e18..872b201fe0f669cc50d9ea9ba09a5db18fa7f48d 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLBodyElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLBodyElement.cpp |
@@ -94,14 +94,18 @@ void HTMLBodyElement::parseAttribute(const QualifiedName& name, const AtomicStri |
document().textLinkColors().resetActiveLinkColor(); |
} else { |
Color color; |
- if (CSSParser::parseColor(color, value, !document().inQuirksMode())) { |
- if (name == linkAttr) |
- document().textLinkColors().setLinkColor(color); |
- else if (name == vlinkAttr) |
- document().textLinkColors().setVisitedLinkColor(color); |
- else |
- document().textLinkColors().setActiveLinkColor(color); |
+ String stringValue = value; |
+ if (!CSSParser::parseColor(color, value, !document().inQuirksMode()) |
simonp
2016/04/29 13:37:19
Maybe I'm missing something but shouldn't this be
Anton Obzhirov
2016/05/04 13:23:48
Yes, you are right, the value should be parsed usi
|
+ && !HTMLElement::parseColorWithLegacyRules(stringValue, color)) { |
+ return; |
} |
+ |
+ if (name == linkAttr) |
+ document().textLinkColors().setLinkColor(color); |
+ else if (name == vlinkAttr) |
+ document().textLinkColors().setVisitedLinkColor(color); |
+ else |
+ document().textLinkColors().setActiveLinkColor(color); |
} |
setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::LinkColorChange)); |