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

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

Issue 1496773002: Move code in some attributeChanged overrides to parseAttribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
index 5d9972492db2e830f1d6d5d79a37968e626fe426..7d27e7cfbf7d07d2b40b7db27dfc3c9d00c72e44 100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
@@ -167,6 +167,8 @@ void HTMLLinkElement::parseAttribute(const QualifiedName& name, const AtomicStri
m_relAttribute = LinkRelAttribute(value);
process();
} else if (name == hrefAttr) {
+ // Log href attribute before logging resource fetching in process().
+ logEventIfIsolatedWorldAndInDocument("blinkSetAttribute", "link", hrefAttr.toString(), oldValue, value);
process();
} else if (name == typeAttr) {
m_type = value;
@@ -454,13 +456,6 @@ DEFINE_TRACE(HTMLLinkElement)
DOMSettableTokenListObserver::trace(visitor);
}
-void HTMLLinkElement::attributeChanged(const QualifiedName& name, const AtomicString& oldValue, const AtomicString& newValue, AttributeModificationReason reason)
-{
- if (name == hrefAttr)
- logEventIfIsolatedWorldAndInDocument("blinkSetAttribute", "link", hrefAttr.toString(), oldValue, newValue);
- HTMLElement::attributeChanged(name, oldValue, newValue, reason);
-}
-
PassOwnPtrWillBeRawPtr<LinkStyle> LinkStyle::create(HTMLLinkElement* owner)
{
return adoptPtrWillBeNoop(new LinkStyle(owner));
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLinkElement.h ('k') | third_party/WebKit/Source/core/html/HTMLScriptElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698