Changeset 201659 in webkit


Ignore:
Timestamp:
Jun 3, 2016 2:36:51 PM (8 years ago)
Author:
benjamin@webkit.org
Message:

Rename CheckedRadioButtons into RadioButtonGroups
https://bugs.webkit.org/show_bug.cgi?id=158326

Reviewed by Alex Christensen.

CheckedRadioButtons handles the set of all the Radio Button Groups
for a particular form or document.
The name is wrong and apparently comes from former uses of this class
(see the comment above the class declaration).

This patch renames "CheckedRadioButtons" to "RadioButtonGroups" to reflect that it handles
all the Radio Button Group from a given context (form or document).
Internally it has a set of RadioButtonGroup but that is never explicitely
exposed.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/CheckedRadioButtons.cpp:

(WebCore::RadioButtonGroup::isEmpty): Deleted.
(WebCore::RadioButtonGroup::isRequired): Deleted.
(WebCore::RadioButtonGroup::checkedButton): Deleted.
(WebCore::RadioButtonGroup::RadioButtonGroup): Deleted.
(WebCore::RadioButtonGroup::isValid): Deleted.
(WebCore::RadioButtonGroup::members): Deleted.
(WebCore::RadioButtonGroup::setCheckedButton): Deleted.
(WebCore::RadioButtonGroup::add): Deleted.
(WebCore::RadioButtonGroup::updateCheckedState): Deleted.
(WebCore::RadioButtonGroup::requiredAttributeChanged): Deleted.
(WebCore::RadioButtonGroup::remove): Deleted.
(WebCore::RadioButtonGroup::updateValidityForAllButtons): Deleted.
(WebCore::RadioButtonGroup::contains): Deleted.
(WebCore::CheckedRadioButtons::CheckedRadioButtons): Deleted.
(WebCore::CheckedRadioButtons::~CheckedRadioButtons): Deleted.
(WebCore::CheckedRadioButtons::addButton): Deleted.
(WebCore::CheckedRadioButtons::groupMembers): Deleted.
(WebCore::CheckedRadioButtons::updateCheckedState): Deleted.
(WebCore::CheckedRadioButtons::requiredAttributeChanged): Deleted.
(WebCore::CheckedRadioButtons::checkedButtonForGroup): Deleted.
(WebCore::CheckedRadioButtons::isInRequiredGroup): Deleted.
(WebCore::CheckedRadioButtons::removeButton): Deleted.

  • dom/RadioButtonGroups.cpp: Renamed from Source/WebCore/dom/CheckedRadioButtons.cpp.

(WebCore::RadioButtonGroup::isEmpty):
(WebCore::RadioButtonGroup::isRequired):
(WebCore::RadioButtonGroup::checkedButton):
(WebCore::RadioButtonGroup::RadioButtonGroup):
(WebCore::RadioButtonGroup::isValid):
(WebCore::RadioButtonGroup::members):
(WebCore::RadioButtonGroup::setCheckedButton):
(WebCore::RadioButtonGroup::add):
(WebCore::RadioButtonGroup::updateCheckedState):
(WebCore::RadioButtonGroup::requiredAttributeChanged):
(WebCore::RadioButtonGroup::remove):
(WebCore::RadioButtonGroup::updateValidityForAllButtons):
(WebCore::RadioButtonGroup::contains):
(WebCore::RadioButtonGroups::RadioButtonGroups):
(WebCore::RadioButtonGroups::~RadioButtonGroups):
(WebCore::RadioButtonGroups::addButton):
(WebCore::RadioButtonGroups::groupMembers):
(WebCore::RadioButtonGroups::updateCheckedState):
(WebCore::RadioButtonGroups::requiredAttributeChanged):
(WebCore::RadioButtonGroups::checkedButtonForGroup):
(WebCore::RadioButtonGroups::isInRequiredGroup):
(WebCore::RadioButtonGroups::removeButton):

  • dom/RadioButtonGroups.h: Renamed from Source/WebCore/dom/CheckedRadioButtons.h.
  • html/FormController.h:

(WebCore::FormController::radioButtonGroups):
(WebCore::FormController::checkedRadioButtons): Deleted.

  • html/HTMLFormElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::~HTMLInputElement):
(WebCore::HTMLInputElement::setChecked):
(WebCore::HTMLInputElement::didMoveToNewDocument):
(WebCore::HTMLInputElement::requiredAttributeChanged):
(WebCore::HTMLInputElement::isInRequiredRadioButtonGroup):
(WebCore::HTMLInputElement::radioButtonGroup):
(WebCore::HTMLInputElement::checkedRadioButtonForGroup):
(WebCore::HTMLInputElement::radioButtonGroups):
(WebCore::HTMLInputElement::addToRadioButtonGroup):
(WebCore::HTMLInputElement::removeFromRadioButtonGroup):
(WebCore::HTMLInputElement::checkedRadioButtons): Deleted.

  • html/HTMLInputElement.h:
Location:
trunk/Source/WebCore
Files:
8 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r201549 r201659  
    13971397    dom/CDATASection.cpp
    13981398    dom/CharacterData.cpp
    1399     dom/CheckedRadioButtons.cpp
    14001399    dom/ChildListMutationScope.cpp
    14011400    dom/ChildNodeList.cpp
     
    14921491    dom/PseudoElement.cpp
    14931492    dom/QualifiedName.cpp
     1493    dom/RadioButtonGroups.cpp
    14941494    dom/Range.cpp
    14951495    dom/RegisteredEventListener.cpp
  • trunk/Source/WebCore/ChangeLog

    r201655 r201659  
     12016-06-03  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        Rename CheckedRadioButtons into RadioButtonGroups
     4        https://bugs.webkit.org/show_bug.cgi?id=158326
     5
     6        Reviewed by Alex Christensen.
     7
     8        CheckedRadioButtons handles the set of all the Radio Button Groups
     9        for a particular form or document.
     10        The name is wrong and apparently comes from former uses of this class
     11        (see the comment above the class declaration).
     12
     13        This patch renames "CheckedRadioButtons" to "RadioButtonGroups" to reflect that it handles
     14        all the Radio Button Group from a given context (form or document).
     15        Internally it has a set of RadioButtonGroup but that is never explicitely
     16        exposed.
     17
     18        * CMakeLists.txt:
     19        * WebCore.xcodeproj/project.pbxproj:
     20        * dom/CheckedRadioButtons.cpp:
     21        (WebCore::RadioButtonGroup::isEmpty): Deleted.
     22        (WebCore::RadioButtonGroup::isRequired): Deleted.
     23        (WebCore::RadioButtonGroup::checkedButton): Deleted.
     24        (WebCore::RadioButtonGroup::RadioButtonGroup): Deleted.
     25        (WebCore::RadioButtonGroup::isValid): Deleted.
     26        (WebCore::RadioButtonGroup::members): Deleted.
     27        (WebCore::RadioButtonGroup::setCheckedButton): Deleted.
     28        (WebCore::RadioButtonGroup::add): Deleted.
     29        (WebCore::RadioButtonGroup::updateCheckedState): Deleted.
     30        (WebCore::RadioButtonGroup::requiredAttributeChanged): Deleted.
     31        (WebCore::RadioButtonGroup::remove): Deleted.
     32        (WebCore::RadioButtonGroup::updateValidityForAllButtons): Deleted.
     33        (WebCore::RadioButtonGroup::contains): Deleted.
     34        (WebCore::CheckedRadioButtons::CheckedRadioButtons): Deleted.
     35        (WebCore::CheckedRadioButtons::~CheckedRadioButtons): Deleted.
     36        (WebCore::CheckedRadioButtons::addButton): Deleted.
     37        (WebCore::CheckedRadioButtons::groupMembers): Deleted.
     38        (WebCore::CheckedRadioButtons::updateCheckedState): Deleted.
     39        (WebCore::CheckedRadioButtons::requiredAttributeChanged): Deleted.
     40        (WebCore::CheckedRadioButtons::checkedButtonForGroup): Deleted.
     41        (WebCore::CheckedRadioButtons::isInRequiredGroup): Deleted.
     42        (WebCore::CheckedRadioButtons::removeButton): Deleted.
     43        * dom/RadioButtonGroups.cpp: Renamed from Source/WebCore/dom/CheckedRadioButtons.cpp.
     44        (WebCore::RadioButtonGroup::isEmpty):
     45        (WebCore::RadioButtonGroup::isRequired):
     46        (WebCore::RadioButtonGroup::checkedButton):
     47        (WebCore::RadioButtonGroup::RadioButtonGroup):
     48        (WebCore::RadioButtonGroup::isValid):
     49        (WebCore::RadioButtonGroup::members):
     50        (WebCore::RadioButtonGroup::setCheckedButton):
     51        (WebCore::RadioButtonGroup::add):
     52        (WebCore::RadioButtonGroup::updateCheckedState):
     53        (WebCore::RadioButtonGroup::requiredAttributeChanged):
     54        (WebCore::RadioButtonGroup::remove):
     55        (WebCore::RadioButtonGroup::updateValidityForAllButtons):
     56        (WebCore::RadioButtonGroup::contains):
     57        (WebCore::RadioButtonGroups::RadioButtonGroups):
     58        (WebCore::RadioButtonGroups::~RadioButtonGroups):
     59        (WebCore::RadioButtonGroups::addButton):
     60        (WebCore::RadioButtonGroups::groupMembers):
     61        (WebCore::RadioButtonGroups::updateCheckedState):
     62        (WebCore::RadioButtonGroups::requiredAttributeChanged):
     63        (WebCore::RadioButtonGroups::checkedButtonForGroup):
     64        (WebCore::RadioButtonGroups::isInRequiredGroup):
     65        (WebCore::RadioButtonGroups::removeButton):
     66        * dom/RadioButtonGroups.h: Renamed from Source/WebCore/dom/CheckedRadioButtons.h.
     67        * html/FormController.h:
     68        (WebCore::FormController::radioButtonGroups):
     69        (WebCore::FormController::checkedRadioButtons): Deleted.
     70        * html/HTMLFormElement.h:
     71        * html/HTMLInputElement.cpp:
     72        (WebCore::HTMLInputElement::~HTMLInputElement):
     73        (WebCore::HTMLInputElement::setChecked):
     74        (WebCore::HTMLInputElement::didMoveToNewDocument):
     75        (WebCore::HTMLInputElement::requiredAttributeChanged):
     76        (WebCore::HTMLInputElement::isInRequiredRadioButtonGroup):
     77        (WebCore::HTMLInputElement::radioButtonGroup):
     78        (WebCore::HTMLInputElement::checkedRadioButtonForGroup):
     79        (WebCore::HTMLInputElement::radioButtonGroups):
     80        (WebCore::HTMLInputElement::addToRadioButtonGroup):
     81        (WebCore::HTMLInputElement::removeFromRadioButtonGroup):
     82        (WebCore::HTMLInputElement::checkedRadioButtons): Deleted.
     83        * html/HTMLInputElement.h:
     84
    1852016-06-03  Chris Dumez  <cdumez@apple.com>
    286
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r201633 r201659  
    37653765                93F6F1ED127F70B10055CB06 /* WebGLContextEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F6F1EA127F70B10055CB06 /* WebGLContextEvent.cpp */; };
    37663766                93F6F1EE127F70B10055CB06 /* WebGLContextEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F6F1EB127F70B10055CB06 /* WebGLContextEvent.h */; };
    3767                 93F925430F7EF5B8007E37C9 /* CheckedRadioButtons.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F925410F7EF5B8007E37C9 /* CheckedRadioButtons.h */; settings = {ATTRIBUTES = (Private, ); }; };
    3768                 93F925440F7EF5B8007E37C9 /* CheckedRadioButtons.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F925420F7EF5B8007E37C9 /* CheckedRadioButtons.cpp */; };
     3767                93F925430F7EF5B8007E37C9 /* RadioButtonGroups.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F925410F7EF5B8007E37C9 /* RadioButtonGroups.h */; settings = {ATTRIBUTES = (Private, ); }; };
     3768                93F925440F7EF5B8007E37C9 /* RadioButtonGroups.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F925420F7EF5B8007E37C9 /* RadioButtonGroups.cpp */; };
    37693769                93F9B6570BA0F35E00854064 /* DOMHTMLCanvasElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93F9B6540BA0F35E00854064 /* DOMHTMLCanvasElement.mm */; };
    37703770                93F9B6580BA0F35E00854064 /* DOMHTMLCanvasElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F9B6550BA0F35E00854064 /* DOMHTMLCanvasElementInternal.h */; };
     
    1141811418                93F8B3060A300FEA00F61AB8 /* CodeGeneratorJS.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; name = CodeGeneratorJS.pm; path = ../scripts/CodeGeneratorJS.pm; sourceTree = "<group>"; wrapsLines = 0; };
    1141911419                93F8B3070A300FEA00F61AB8 /* generate-bindings.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; name = "generate-bindings.pl"; path = "scripts/generate-bindings.pl"; sourceTree = "<group>"; };
    11420                 93F925410F7EF5B8007E37C9 /* CheckedRadioButtons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckedRadioButtons.h; sourceTree = "<group>"; };
    11421                 93F925420F7EF5B8007E37C9 /* CheckedRadioButtons.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckedRadioButtons.cpp; sourceTree = "<group>"; };
     11420                93F925410F7EF5B8007E37C9 /* RadioButtonGroups.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RadioButtonGroups.h; sourceTree = "<group>"; };
     11421                93F925420F7EF5B8007E37C9 /* RadioButtonGroups.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RadioButtonGroups.cpp; sourceTree = "<group>"; };
    1142211422                93F9B6540BA0F35E00854064 /* DOMHTMLCanvasElement.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMHTMLCanvasElement.mm; sourceTree = "<group>"; };
    1142311423                93F9B6550BA0F35E00854064 /* DOMHTMLCanvasElementInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMHTMLCanvasElementInternal.h; sourceTree = "<group>"; };
     
    2423924239                                6550B696099DF0270090D781 /* CharacterData.h */,
    2424024240                                93EEC1E609C2877700C515D1 /* CharacterData.idl */,
    24241                                 93F925420F7EF5B8007E37C9 /* CheckedRadioButtons.cpp */,
    24242                                 93F925410F7EF5B8007E37C9 /* CheckedRadioButtons.h */,
    2424324241                                D619A305144E00BE004BC302 /* ChildListMutationScope.cpp */,
    2424424242                                D619A306144E00BE004BC302 /* ChildListMutationScope.h */,
     
    2451924517                                550A0BC7085F6039007353D6 /* QualifiedName.cpp */,
    2452024518                                550A0BC8085F6039007353D6 /* QualifiedName.h */,
     24519                                93F925420F7EF5B8007E37C9 /* RadioButtonGroups.cpp */,
     24520                                93F925410F7EF5B8007E37C9 /* RadioButtonGroups.h */,
    2452124521                                F523D30302DE4476018635CA /* Range.cpp */,
    2452224522                                F523D30402DE4476018635CA /* Range.h */,
     
    2527925279                                B2C3DA2A0D006C1D00EF6F26 /* CharsetData.h in Headers */,
    2528025280                                F55B3DB21251F12D003EF269 /* CheckboxInputType.h in Headers */,
    25281                                 93F925430F7EF5B8007E37C9 /* CheckedRadioButtons.h in Headers */,
     25281                                93F925430F7EF5B8007E37C9 /* RadioButtonGroups.h in Headers */,
    2528225282                                D619A308144E00BE004BC302 /* ChildListMutationScope.h in Headers */,
    2528325283                                A81872200977D3C0005826D9 /* ChildNodeList.h in Headers */,
     
    2922329223                                9326DC0C09DAD5D600AFC847 /* CharsetData.cpp in Sources */,
    2922429224                                F55B3DB11251F12D003EF269 /* CheckboxInputType.cpp in Sources */,
    29225                                 93F925440F7EF5B8007E37C9 /* CheckedRadioButtons.cpp in Sources */,
     29225                                93F925440F7EF5B8007E37C9 /* RadioButtonGroups.cpp in Sources */,
    2922629226                                D619A307144E00BE004BC302 /* ChildListMutationScope.cpp in Sources */,
    2922729227                                A81872250977D3C0005826D9 /* ChildNodeList.cpp in Sources */,
  • trunk/Source/WebCore/dom/DOMAllInOne.cpp

    r197924 r201659  
    3535#include "CDATASection.cpp"
    3636#include "CharacterData.cpp"
    37 #include "CheckedRadioButtons.cpp"
    3837#include "ChildListMutationScope.cpp"
    3938#include "ChildNodeList.cpp"
     
    130129// https://bugs.webkit.org/show_bug.cgi?id=146586
    131130// #include "QualifiedName.cpp"
     131#include "RadioButtonGroups.cpp"
    132132#include "Range.cpp"
    133133#include "RegisteredEventListener.cpp"
  • trunk/Source/WebCore/dom/RadioButtonGroups.cpp

    r201658 r201659  
    2020
    2121#include "config.h"
    22 #include "CheckedRadioButtons.h"
     22#include "RadioButtonGroups.h"
     23
     24#include "HTMLInputElement.h"
    2325#include "Range.h"
    24 
    25 #include "HTMLInputElement.h"
    2626#include <wtf/HashSet.h>
    2727
     
    4141    bool contains(HTMLInputElement*) const;
    4242    Vector<HTMLInputElement*> members() const;
    43    
     43
    4444private:
    4545    void updateValidityForAllButtons();
     
    7070    return members;
    7171}
    72    
     72
    7373void RadioButtonGroup::setCheckedButton(HTMLInputElement* button)
    7474{
     
    177177// compiler from generating them as inlines. So we don't need to to define
    178178// RadioButtonGroup in the header.
    179 CheckedRadioButtons::CheckedRadioButtons()
    180 {
    181 }
    182 
    183 CheckedRadioButtons::~CheckedRadioButtons()
    184 {
    185 }
    186 
    187 void CheckedRadioButtons::addButton(HTMLInputElement* element)
     179RadioButtonGroups::RadioButtonGroups()
     180{
     181}
     182
     183RadioButtonGroups::~RadioButtonGroups()
     184{
     185}
     186
     187void RadioButtonGroups::addButton(HTMLInputElement* element)
    188188{
    189189    ASSERT(element->isRadioButton());
     
    200200}
    201201
    202 Vector<HTMLInputElement*> CheckedRadioButtons::groupMembers(const HTMLInputElement& element) const
     202Vector<HTMLInputElement*> RadioButtonGroups::groupMembers(const HTMLInputElement& element) const
    203203{
    204204    ASSERT(element.isRadioButton());
    205205    if (!element.isRadioButton())
    206206        return { };
    207    
     207
    208208    auto* name = element.name().impl();
    209209    if (!name)
     
    215215    return group->members();
    216216}
    217    
    218 void CheckedRadioButtons::updateCheckedState(HTMLInputElement* element)
     217
     218void RadioButtonGroups::updateCheckedState(HTMLInputElement* element)
    219219{
    220220    ASSERT(element->isRadioButton());
     
    229229}
    230230
    231 void CheckedRadioButtons::requiredAttributeChanged(HTMLInputElement* element)
     231void RadioButtonGroups::requiredAttributeChanged(HTMLInputElement* element)
    232232{
    233233    ASSERT(element->isRadioButton());
     
    242242}
    243243
    244 HTMLInputElement* CheckedRadioButtons::checkedButtonForGroup(const AtomicString& name) const
     244HTMLInputElement* RadioButtonGroups::checkedButtonForGroup(const AtomicString& name) const
    245245{
    246246    if (!m_nameToGroupMap)
     
    251251}
    252252
    253 bool CheckedRadioButtons::isInRequiredGroup(HTMLInputElement* element) const
     253bool RadioButtonGroups::isInRequiredGroup(HTMLInputElement* element) const
    254254{
    255255    ASSERT(element->isRadioButton());
     
    262262}
    263263
    264 void CheckedRadioButtons::removeButton(HTMLInputElement* element)
     264void RadioButtonGroups::removeButton(HTMLInputElement* element)
    265265{
    266266    ASSERT(element->isRadioButton());
  • trunk/Source/WebCore/dom/RadioButtonGroups.h

    r201658 r201659  
    11/*
    2  * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2007, 2008, 2009, 2016 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    1919 */
    2020
    21 #ifndef CheckedRadioButtons_h
    22 #define CheckedRadioButtons_h
     21#pragma once
    2322
    2423#include <memory>
     
    3231class RadioButtonGroup;
    3332
    34 // FIXME: Rename the class. The class was a simple map from a name to a checked
    35 // radio button. It manages RadioButtonGroup objects now.
    36 class CheckedRadioButtons {
     33class RadioButtonGroups {
    3734public:
    38     CheckedRadioButtons();
    39     ~CheckedRadioButtons();
     35    RadioButtonGroups();
     36    ~RadioButtonGroups();
    4037    void addButton(HTMLInputElement*);
    4138    void updateCheckedState(HTMLInputElement*);
     
    4542    bool isInRequiredGroup(HTMLInputElement*) const;
    4643    Vector<HTMLInputElement*> groupMembers(const HTMLInputElement&) const;
    47    
     44
    4845private:
    4946    typedef HashMap<AtomicStringImpl*, std::unique_ptr<RadioButtonGroup>> NameToGroupMap;
     
    5249
    5350} // namespace WebCore
    54 
    55 #endif // CheckedRadioButtons_h
  • trunk/Source/WebCore/html/FormController.h

    r176290 r201659  
    2323#define FormController_h
    2424
    25 #include "CheckedRadioButtons.h"
     25#include "RadioButtonGroups.h"
    2626#include <wtf/Forward.h>
    2727#include <wtf/ListHashSet.h>
     
    7878    ~FormController();
    7979
    80     CheckedRadioButtons& checkedRadioButtons() { return m_checkedRadioButtons; }
     80    RadioButtonGroups& radioButtonGroups() { return m_radioButtonGroups; }
    8181
    8282    void registerFormElementWithState(HTMLFormControlElementWithState*);
     
    103103    static void formStatesFromStateVector(const Vector<String>&, SavedFormStateMap&);
    104104
    105     CheckedRadioButtons m_checkedRadioButtons;
     105    RadioButtonGroups m_radioButtonGroups;
    106106    FormElementListHashSet m_formElementsWithState;
    107107    SavedFormStateMap m_savedFormStateMap;
  • trunk/Source/WebCore/html/HTMLFormElement.h

    r197626 r201659  
    2525#define HTMLFormElement_h
    2626
    27 #include "CheckedRadioButtons.h"
    2827#include "FormState.h"
    2928#include "FormSubmission.h"
    3029#include "HTMLElement.h"
     30#include "RadioButtonGroups.h"
    3131#include <memory>
    3232
     
    132132#endif
    133133
    134     CheckedRadioButtons& checkedRadioButtons() { return m_checkedRadioButtons; }
     134    RadioButtonGroups& radioButtonGroups() { return m_radioButtonGroups; }
    135135
    136136    const Vector<FormAssociatedElement*>& associatedElements() const { return m_associatedElements; }
     
    186186    std::unique_ptr<PastNamesMap> m_pastNamesMap;
    187187
    188     CheckedRadioButtons m_checkedRadioButtons;
     188    RadioButtonGroups m_radioButtonGroups;
    189189
    190190    unsigned m_associatedElementsBeforeIndex;
  • trunk/Source/WebCore/html/HTMLInputElement.cpp

    r200895 r201659  
    159159    // We should unregister it to avoid accessing a deleted object.
    160160    if (isRadioButton())
    161         document().formController().checkedRadioButtons().removeButton(this);
     161        document().formController().radioButtonGroups().removeButton(this);
    162162#if ENABLE(TOUCH_EVENTS)
    163163    if (m_hasTouchEventHandler)
     
    855855    setNeedsStyleRecalc();
    856856
    857     if (CheckedRadioButtons* buttons = checkedRadioButtons())
     857    if (RadioButtonGroups* buttons = radioButtonGroups())
    858858            buttons->updateCheckedState(this);
    859859    if (renderer() && renderer()->style().hasAppearance())
     
    14961496            oldDocument->unregisterForDocumentSuspensionCallbacks(this);
    14971497        if (isRadioButton())
    1498             oldDocument->formController().checkedRadioButtons().removeButton(this);
     1498            oldDocument->formController().radioButtonGroups().removeButton(this);
    14991499#if ENABLE(TOUCH_EVENTS)
    15001500        if (m_hasTouchEventHandler)
     
    15291529{
    15301530    HTMLTextFormControlElement::requiredAttributeChanged();
    1531     if (CheckedRadioButtons* buttons = checkedRadioButtons())
     1531    if (RadioButtonGroups* buttons = radioButtonGroups())
    15321532        buttons->requiredAttributeChanged(this);
    15331533    m_inputType->requiredAttributeChanged();
     
    17731773{
    17741774    ASSERT(isRadioButton());
    1775     if (CheckedRadioButtons* buttons = checkedRadioButtons())
     1775    if (RadioButtonGroups* buttons = radioButtonGroups())
    17761776        return buttons->isInRequiredGroup(this);
    17771777    return false;
     
    17801780Vector<HTMLInputElement*> HTMLInputElement::radioButtonGroup() const
    17811781{
    1782     CheckedRadioButtons* buttons = checkedRadioButtons();
     1782    RadioButtonGroups* buttons = radioButtonGroups();
    17831783    if (!buttons)
    17841784        return { };
     
    17881788HTMLInputElement* HTMLInputElement::checkedRadioButtonForGroup() const
    17891789{
    1790     if (CheckedRadioButtons* buttons = checkedRadioButtons())
     1790    if (RadioButtonGroups* buttons = radioButtonGroups())
    17911791        return buttons->checkedButtonForGroup(name());
    17921792    return 0;
    17931793}
    17941794
    1795 CheckedRadioButtons* HTMLInputElement::checkedRadioButtons() const
     1795RadioButtonGroups* HTMLInputElement::radioButtonGroups() const
    17961796{
    17971797    if (!isRadioButton())
    17981798        return 0;
    17991799    if (HTMLFormElement* formElement = form())
    1800         return &formElement->checkedRadioButtons();
     1800        return &formElement->radioButtonGroups();
    18011801    if (inDocument())
    1802         return &document().formController().checkedRadioButtons();
     1802        return &document().formController().radioButtonGroups();
    18031803    return 0;
    18041804}
     
    18061806inline void HTMLInputElement::addToRadioButtonGroup()
    18071807{
    1808     if (CheckedRadioButtons* buttons = checkedRadioButtons())
     1808    if (RadioButtonGroups* buttons = radioButtonGroups())
    18091809        buttons->addButton(this);
    18101810}
     
    18121812inline void HTMLInputElement::removeFromRadioButtonGroup()
    18131813{
    1814     if (CheckedRadioButtons* buttons = checkedRadioButtons())
     1814    if (RadioButtonGroups* buttons = radioButtonGroups())
    18151815        buttons->removeButton(this);
    18161816}
  • trunk/Source/WebCore/html/HTMLInputElement.h

    r200041 r201659  
    3737namespace WebCore {
    3838
    39 class CheckedRadioButtons;
    4039class DragData;
    4140class FileList;
     
    4645class InputType;
    4746class ListAttributeTargetObserver;
     47class RadioButtonGroups;
    4848class TextControlInnerTextElement;
    4949class URL;
     
    422422
    423423    // Returns null if this isn't associated with any radio button group.
    424     CheckedRadioButtons* checkedRadioButtons() const;
     424    RadioButtonGroups* radioButtonGroups() const;
    425425    void addToRadioButtonGroup();
    426426    void removeFromRadioButtonGroup();
Note: See TracChangeset for help on using the changeset viewer.