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

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: 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..da121dc87b9e00a0e3827a92a73bbb6ff18aaef2 100644
--- a/Source/core/html/HTMLLinkElement.cpp
+++ b/Source/core/html/HTMLLinkElement.cpp
@@ -137,6 +137,7 @@ inline HTMLLinkElement::HTMLLinkElement(Document& document, bool createdByParser
: HTMLElement(linkTag, document)
, m_linkLoader(this)
, m_sizes(DOMSettableTokenList::create())
+ , m_relList(ClassList::create(this))
, m_createdByParser(createdByParser)
, m_isInShadowTree(false)
{
@@ -164,6 +165,7 @@ void HTMLLinkElement::parseAttribute(const QualifiedName& name, const AtomicStri
{
if (name == relAttr) {
m_relAttribute = LinkRelAttribute(value);
+ m_relList->setValue(value);
process();
} else if (name == hrefAttr) {
process();
@@ -421,6 +423,11 @@ const AtomicString& HTMLLinkElement::rel() const
return getAttribute(relAttr);
}
+DOMTokenList* HTMLLinkElement::relList() const
Inactive 2014/07/17 19:37:57 Could return a DOMTokenList&
+{
+ return m_relList.get();
Inactive 2014/07/17 19:37:57 You could lazy initialize m_relList here instead o
+}
+
const AtomicString& HTMLLinkElement::type() const
{
return getAttribute(typeAttr);

Powered by Google App Engine
This is Rietveld 408576698