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

Unified Diff: third_party/WebKit/Source/core/html/HTMLBodyElement.cpp

Issue 1921823006: Fix parsing of <body link vlink alink> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « AUTHORS ('k') | third_party/WebKit/Source/core/html/HTMLElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « AUTHORS ('k') | third_party/WebKit/Source/core/html/HTMLElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698