Chromium Code Reviews

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

Issue 480473002: Drop unnecessary RadioNodeList::m_onlyMatchImgElements member (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « Source/core/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/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;
« no previous file with comments | « Source/core/html/RadioNodeList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine