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

Unified Diff: Source/WebCore/html/RadioNodeList.cpp

Issue 10695128: Merge 120979 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 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
« no previous file with comments | « Source/WebCore/html/RadioNodeList.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/html/RadioNodeList.cpp
===================================================================
--- Source/WebCore/html/RadioNodeList.cpp (revision 122245)
+++ Source/WebCore/html/RadioNodeList.cpp (working copy)
@@ -31,23 +31,23 @@
#include "HTMLInputElement.h"
#include "HTMLNames.h"
#include "HTMLObjectElement.h"
+#include "NodeRareData.h"
namespace WebCore {
using namespace HTMLNames;
-RadioNodeList::RadioNodeList(Element* baseElement, const AtomicString& name)
- : DynamicSubtreeNodeList(baseElement, baseElement->hasTagName(formTag) ? RootedAtDocument : RootedAtNode)
+RadioNodeList::RadioNodeList(Node* rootNode, const AtomicString& name)
+ : DynamicSubtreeNodeList(rootNode, rootNode->hasTagName(formTag) ? RootedAtDocument : RootedAtNode)
, m_name(name)
- , m_baseElement(baseElement)
{
- m_baseElement->document()->registerDynamicSubtreeNodeList(this);
+ document()->registerDynamicSubtreeNodeList(this);
}
RadioNodeList::~RadioNodeList()
{
- m_baseElement->removeCachedRadioNodeList(this, m_name);
- m_baseElement->document()->unregisterDynamicSubtreeNodeList(this);
+ m_node->nodeLists()->removeCacheWithAtomicName(this, DynamicNodeList::RadioNodeListType, m_name);
+ document()->unregisterDynamicSubtreeNodeList(this);
}
static inline HTMLInputElement* toRadioButtonInputElement(Node* node)
@@ -86,13 +86,13 @@
bool RadioNodeList::checkElementMatchesRadioNodeListFilter(Element* testElement) const
{
ASSERT(testElement->hasTagName(objectTag) || testElement->isFormControlElement());
- if (m_baseElement->hasTagName(formTag)) {
+ if (m_node->hasTagName(formTag)) {
HTMLFormElement* formElement = 0;
if (testElement->hasTagName(objectTag))
formElement = static_cast<HTMLObjectElement*>(testElement)->form();
else
formElement = static_cast<HTMLFormControlElement*>(testElement)->form();
- if (!formElement || formElement != m_baseElement)
+ if (!formElement || formElement != m_node)
return false;
}
« no previous file with comments | « Source/WebCore/html/RadioNodeList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698