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..b02addcd392c180b000cb4dd7a636527be5361f0 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLBodyElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLBodyElement.cpp |
@@ -94,14 +94,16 @@ 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 (!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)); |