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

Unified Diff: Source/core/html/RelList.h

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/RelList.h
diff --git a/Source/core/html/ClassList.h b/Source/core/html/RelList.h
similarity index 75%
copy from Source/core/html/ClassList.h
copy to Source/core/html/RelList.h
index 13444d972532aeed4dc00888cc927db7babcc405..9c6277e2244933e7224bb81646a8493691c5659b 100644
--- a/Source/core/html/ClassList.h
+++ b/Source/core/html/RelList.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2014 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -22,8 +22,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef ClassList_h
-#define ClassList_h
+#ifndef RelList_h
+#define RelList_h
#include "core/HTMLNames.h"
#include "core/dom/DOMTokenList.h"
@@ -38,11 +38,11 @@ class Element;
typedef int ExceptionCode;
-class ClassList FINAL : public DOMTokenList {
+class RelList FINAL : public DOMTokenList {
public:
- static PassOwnPtrWillBeRawPtr<ClassList> create(Element* element)
+ static PassOwnPtrWillBeRawPtr<RelList> create(Element* element)
{
- return adoptPtrWillBeNoop(new ClassList(element));
+ return adoptPtrWillBeNoop(new RelList(element));
}
#if !ENABLE(OILPAN)
@@ -55,24 +55,23 @@ public:
virtual Element* element() OVERRIDE { return m_element; }
- void clearValueForQuirksMode() { m_classNamesForQuirksMode = nullptr; }
+ virtual void setValue(const AtomicString& relAttrvalue) OVERRIDE;
sof 2014/08/23 19:22:19 The parameter's purpose ought to be clear, so no n
virtual void trace(Visitor*) OVERRIDE;
private:
- explicit ClassList(Element*);
+ explicit RelList(Element*);
virtual bool containsInternal(const AtomicString&) const OVERRIDE;
- const SpaceSplitString& classNames() const;
+ const SpaceSplitString& relListAttr() const;
- virtual const AtomicString& value() const OVERRIDE { return m_element->getAttribute(HTMLNames::classAttr); }
- virtual void setValue(const AtomicString& value) OVERRIDE { m_element->setAttribute(HTMLNames::classAttr, value); }
+ virtual const AtomicString& value() const OVERRIDE { return m_element->fastGetAttribute(HTMLNames::relAttr); }
RawPtrWillBeMember<Element> m_element;
- mutable OwnPtr<SpaceSplitString> m_classNamesForQuirksMode;
+ mutable OwnPtrWillBeMember<SpaceSplitString> m_relAttrNames;
sof 2014/08/23 19:22:19 SpaceSplitString is not on the Oilpan heap, so you
};
} // namespace WebCore
-#endif // ClassList_h
+#endif // RelList_h

Powered by Google App Engine
This is Rietveld 408576698