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

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

Issue 400763002: Adding relList attr to link and anchor element Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modified as per review comments Created 6 years, 5 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
Index: Source/core/html/HTMLLinkElement.cpp
diff --git a/Source/core/html/HTMLLinkElement.cpp b/Source/core/html/HTMLLinkElement.cpp
index 99624489fabad5b929db12a74f0f7905310fa3fb..cc166712e8f0a6d2760331276ccf822a574d4ab2 100644
--- a/Source/core/html/HTMLLinkElement.cpp
+++ b/Source/core/html/HTMLLinkElement.cpp
@@ -421,6 +421,13 @@ const AtomicString& HTMLLinkElement::rel() const
return getAttribute(relAttr);
}
+DOMTokenList& HTMLLinkElement::relList()
+{
+ if (!m_relList)
+ setRelList(RelList::create(this));
Inactive 2014/07/23 13:26:43 m_relList = RelList::create(this);
+ return *m_relList.get();
Inactive 2014/07/23 13:26:43 .get() is unnecessary
+}
+
const AtomicString& HTMLLinkElement::type() const
{
return getAttribute(typeAttr);
@@ -466,6 +473,10 @@ void HTMLLinkElement::attributeWillChange(const QualifiedName& name, const Atomi
activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data());
}
}
+
+ if (name == relAttr && m_relList)
Inactive 2014/07/23 13:26:43 I would do this in HTMLLinkElement::parseAttribute
+ m_relList->setValue(newValue);
+
HTMLElement::attributeWillChange(name, oldValue, newValue);
}

Powered by Google App Engine
This is Rietveld 408576698