bool isValid() const;
void setCheckedButton(HTMLInputElement*);
- WillBeHeapHashSet<RawPtrWillBeMember<HTMLInputElement> > m_members;
+ WillBeHeapHashSet<RawPtrWillBeMember<HTMLInputElement>> m_members;
RawPtrWillBeMember<HTMLInputElement> m_checkedButton;
size_t m_requiredCount;
};
}
if (wasValid != isValid())
setNeedsValidityCheckForAllButtons();
- typedef WillBeHeapHashSet<RawPtrWillBeMember<HTMLInputElement> >::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);
}
}
void RadioButtonGroup::remove(HTMLInputElement* button)
{
ASSERT(button->type() == InputTypeNames::radio);
- WillBeHeapHashSet<RawPtrWillBeMember<HTMLInputElement> >::iterator it = m_members.find(button);
+ WillBeHeapHashSet<RawPtrWillBeMember<HTMLInputElement>>::iterator it = m_members.find(button);
if (it == m_members.end())
return;
bool wasValid = isValid();
void RadioButtonGroup::setNeedsValidityCheckForAllButtons()
{
- typedef WillBeHeapHashSet<RawPtrWillBeMember<HTMLInputElement> >::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();
}
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