X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fcore%2Fhtml%2Fforms%2FRadioButtonGroupScope.cpp;h=924db86fed57e921ec967acf312729068849c536;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=4e4c55a50d4bfef96213a4bceae6ebecd33ac5cb;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.cpp b/src/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.cpp index 4e4c55a..924db86 100644 --- a/src/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.cpp +++ b/src/third_party/WebKit/Source/core/html/forms/RadioButtonGroupScope.cpp @@ -48,7 +48,7 @@ private: bool isValid() const; void setCheckedButton(HTMLInputElement*); - WillBeHeapHashSet > m_members; + WillBeHeapHashSet> m_members; RawPtrWillBeMember m_checkedButton; size_t m_requiredCount; }; @@ -113,10 +113,8 @@ void RadioButtonGroup::updateCheckedState(HTMLInputElement* button) } if (wasValid != isValid()) setNeedsValidityCheckForAllButtons(); - typedef WillBeHeapHashSet >::const_iterator Iterator; - Iterator end = m_members.end(); - for (Iterator it = m_members.begin(); it != end; ++it) { - (*it)->pseudoStateChanged(CSSSelector::PseudoIndeterminate); + for (HTMLInputElement* const inputElement : m_members) { + inputElement->pseudoStateChanged(CSSSelector::PseudoIndeterminate); } } @@ -138,7 +136,7 @@ void RadioButtonGroup::requiredAttributeChanged(HTMLInputElement* button) void RadioButtonGroup::remove(HTMLInputElement* button) { ASSERT(button->type() == InputTypeNames::radio); - WillBeHeapHashSet >::iterator it = m_members.find(button); + WillBeHeapHashSet>::iterator it = m_members.find(button); if (it == m_members.end()) return; bool wasValid = isValid(); @@ -165,10 +163,7 @@ void RadioButtonGroup::remove(HTMLInputElement* button) void RadioButtonGroup::setNeedsValidityCheckForAllButtons() { - typedef WillBeHeapHashSet >::const_iterator Iterator; - Iterator end = m_members.end(); - for (Iterator it = m_members.begin(); it != end; ++it) { - HTMLInputElement* button = *it; + for (HTMLInputElement* const button : m_members) { ASSERT(button->type() == InputTypeNames::radio); button->setNeedsValidityCheck(); } @@ -244,9 +239,9 @@ void RadioButtonGroupScope::requiredAttributeChanged(HTMLInputElement* element) HTMLInputElement* RadioButtonGroupScope::checkedButtonForGroup(const AtomicString& name) const { if (!m_nameToGroupMap) - return 0; + return nullptr; RadioButtonGroup* group = m_nameToGroupMap->get(name); - return group ? group->checkedButton() : 0; + return group ? group->checkedButton() : nullptr; } bool RadioButtonGroupScope::isInRequiredGroup(HTMLInputElement* element) const