Index: Source/core/html/RadioNodeList.cpp |
diff --git a/Source/core/html/RadioNodeList.cpp b/Source/core/html/RadioNodeList.cpp |
index e3a4ad92b16429bcc1d3e25c919d7a0360d0336e..1359849bf8c0b539bfbf2e507a74c93ca6499c26 100644 |
--- a/Source/core/html/RadioNodeList.cpp |
+++ b/Source/core/html/RadioNodeList.cpp |
@@ -40,7 +40,6 @@ using namespace HTMLNames; |
RadioNodeList::RadioNodeList(ContainerNode& rootNode, const AtomicString& name, CollectionType type) |
: LiveNodeList(rootNode, type, InvalidateForFormControls, isHTMLFormElement(rootNode) ? NodeListIsRootedAtDocument : NodeListIsRootedAtNode) |
, m_name(name) |
- , m_onlyMatchImgElements(type == RadioImgNodeListType) |
{ |
ScriptWrappable::init(this); |
} |
@@ -48,7 +47,7 @@ RadioNodeList::RadioNodeList(ContainerNode& rootNode, const AtomicString& name, |
RadioNodeList::~RadioNodeList() |
{ |
#if !ENABLE(OILPAN) |
- ownerNode().nodeLists()->removeCache(this, m_onlyMatchImgElements ? RadioImgNodeListType : RadioNodeListType, m_name); |
+ ownerNode().nodeLists()->removeCache(this, type(), m_name); |
#endif |
} |
@@ -64,7 +63,7 @@ static inline HTMLInputElement* toRadioButtonInputElement(Element& element) |
String RadioNodeList::value() const |
{ |
- if (m_onlyMatchImgElements) |
+ if (shouldOnlyMatchImgElements()) |
return String(); |
unsigned length = this->length(); |
for (unsigned i = 0; i < length; ++i) { |
@@ -78,7 +77,7 @@ String RadioNodeList::value() const |
void RadioNodeList::setValue(const String& value) |
{ |
- if (m_onlyMatchImgElements) |
+ if (shouldOnlyMatchImgElements()) |
return; |
unsigned length = this->length(); |
for (unsigned i = 0; i < length; ++i) { |
@@ -97,7 +96,7 @@ bool RadioNodeList::matchesByIdOrName(const Element& testElement) const |
bool RadioNodeList::checkElementMatchesRadioNodeListFilter(const Element& testElement) const |
{ |
- ASSERT(!m_onlyMatchImgElements); |
+ ASSERT(!shouldOnlyMatchImgElements()); |
ASSERT(isHTMLObjectElement(testElement) || testElement.isFormControlElement()); |
if (isHTMLFormElement(ownerNode())) { |
HTMLFormElement* formElement = toHTMLElement(testElement).formOwner(); |
@@ -110,7 +109,7 @@ bool RadioNodeList::checkElementMatchesRadioNodeListFilter(const Element& testEl |
bool RadioNodeList::elementMatches(const Element& element) const |
{ |
- if (m_onlyMatchImgElements) { |
+ if (shouldOnlyMatchImgElements()) { |
if (!isHTMLImageElement(element)) |
return false; |