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

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 comment 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..d393e0f21cd28862b485dc058a1d5c07ab3bcc14 100644
--- a/Source/core/html/HTMLLinkElement.cpp
+++ b/Source/core/html/HTMLLinkElement.cpp
@@ -164,6 +164,8 @@ void HTMLLinkElement::parseAttribute(const QualifiedName& name, const AtomicStri
{
if (name == relAttr) {
m_relAttribute = LinkRelAttribute(value);
+ if (m_relList)
+ m_relList->setValue(value);
process();
} else if (name == hrefAttr) {
process();
@@ -421,6 +423,13 @@ const AtomicString& HTMLLinkElement::rel() const
return getAttribute(relAttr);
}
+DOMTokenList& HTMLLinkElement::relList()
+{
+ if (!m_relList)
+ m_relList = RelList::create(this);
+ return *m_relList;
+}
+
const AtomicString& HTMLLinkElement::type() const
{
return getAttribute(typeAttr);

Powered by Google App Engine
This is Rietveld 408576698