<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[201659] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/201659">201659</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2016-06-03 14:36:51 -0700 (Fri, 03 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>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 &quot;CheckedRadioButtons&quot; to &quot;RadioButtonGroups&quot; 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:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoredomDOMAllInOnecpp">trunk/Source/WebCore/dom/DOMAllInOne.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlFormControllerh">trunk/Source/WebCore/html/FormController.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormElementh">trunk/Source/WebCore/html/HTMLFormElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementcpp">trunk/Source/WebCore/html/HTMLInputElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementh">trunk/Source/WebCore/html/HTMLInputElement.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoredomRadioButtonGroupscpp">trunk/Source/WebCore/dom/RadioButtonGroups.cpp</a></li>
<li><a href="#trunkSourceWebCoredomRadioButtonGroupsh">trunk/Source/WebCore/dom/RadioButtonGroups.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoredomCheckedRadioButtonscpp">trunk/Source/WebCore/dom/CheckedRadioButtons.cpp</a></li>
<li><a href="#trunkSourceWebCoredomCheckedRadioButtonsh">trunk/Source/WebCore/dom/CheckedRadioButtons.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (201658 => 201659)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-06-03 21:35:06 UTC (rev 201658)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-06-03 21:36:51 UTC (rev 201659)
</span><span class="lines">@@ -1396,7 +1396,6 @@
</span><span class="cx">     dom/BeforeUnloadEvent.cpp
</span><span class="cx">     dom/CDATASection.cpp
</span><span class="cx">     dom/CharacterData.cpp
</span><del>-    dom/CheckedRadioButtons.cpp
</del><span class="cx">     dom/ChildListMutationScope.cpp
</span><span class="cx">     dom/ChildNodeList.cpp
</span><span class="cx">     dom/ClassCollection.cpp
</span><span class="lines">@@ -1491,6 +1490,7 @@
</span><span class="cx">     dom/ProgressEvent.cpp
</span><span class="cx">     dom/PseudoElement.cpp
</span><span class="cx">     dom/QualifiedName.cpp
</span><ins>+    dom/RadioButtonGroups.cpp
</ins><span class="cx">     dom/Range.cpp
</span><span class="cx">     dom/RegisteredEventListener.cpp
</span><span class="cx">     dom/ScopedEventQueue.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (201658 => 201659)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-06-03 21:35:06 UTC (rev 201658)
+++ trunk/Source/WebCore/ChangeLog        2016-06-03 21:36:51 UTC (rev 201659)
</span><span class="lines">@@ -1,3 +1,87 @@
</span><ins>+2016-06-03  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
+
+        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 &quot;CheckedRadioButtons&quot; to &quot;RadioButtonGroups&quot; 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:
+
</ins><span class="cx"> 2016-06-03  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, roll out r196633 as it broke PageCache on iOS for WebKit.org
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (201658 => 201659)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-06-03 21:35:06 UTC (rev 201658)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-06-03 21:36:51 UTC (rev 201659)
</span><span class="lines">@@ -3764,8 +3764,8 @@
</span><span class="cx">                 93F1E1EC1A40FDDC00348D13 /* NSPopoverSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F1E1EB1A40FDDC00348D13 /* NSPopoverSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 93F6F1ED127F70B10055CB06 /* WebGLContextEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F6F1EA127F70B10055CB06 /* WebGLContextEvent.cpp */; };
</span><span class="cx">                 93F6F1EE127F70B10055CB06 /* WebGLContextEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F6F1EB127F70B10055CB06 /* WebGLContextEvent.h */; };
</span><del>-                93F925430F7EF5B8007E37C9 /* CheckedRadioButtons.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F925410F7EF5B8007E37C9 /* CheckedRadioButtons.h */; settings = {ATTRIBUTES = (Private, ); }; };
-                93F925440F7EF5B8007E37C9 /* CheckedRadioButtons.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F925420F7EF5B8007E37C9 /* CheckedRadioButtons.cpp */; };
</del><ins>+                93F925430F7EF5B8007E37C9 /* RadioButtonGroups.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F925410F7EF5B8007E37C9 /* RadioButtonGroups.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                93F925440F7EF5B8007E37C9 /* RadioButtonGroups.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F925420F7EF5B8007E37C9 /* RadioButtonGroups.cpp */; };
</ins><span class="cx">                 93F9B6570BA0F35E00854064 /* DOMHTMLCanvasElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93F9B6540BA0F35E00854064 /* DOMHTMLCanvasElement.mm */; };
</span><span class="cx">                 93F9B6580BA0F35E00854064 /* DOMHTMLCanvasElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 93F9B6550BA0F35E00854064 /* DOMHTMLCanvasElementInternal.h */; };
</span><span class="cx">                 93F9B6E00BA0FB7200854064 /* JSComment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93F9B6DE0BA0FB7200854064 /* JSComment.cpp */; };
</span><span class="lines">@@ -11417,8 +11417,8 @@
</span><span class="cx">                 93F8B3050A300FE100F61AB8 /* CodeGenerator.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; name = CodeGenerator.pm; path = scripts/CodeGenerator.pm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93F8B3060A300FEA00F61AB8 /* CodeGeneratorJS.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; name = CodeGeneratorJS.pm; path = ../scripts/CodeGeneratorJS.pm; sourceTree = &quot;&lt;group&gt;&quot;; wrapsLines = 0; };
</span><span class="cx">                 93F8B3070A300FEA00F61AB8 /* generate-bindings.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; name = &quot;generate-bindings.pl&quot;; path = &quot;scripts/generate-bindings.pl&quot;; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                93F925410F7EF5B8007E37C9 /* CheckedRadioButtons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CheckedRadioButtons.h; sourceTree = &quot;&lt;group&gt;&quot;; };
-                93F925420F7EF5B8007E37C9 /* CheckedRadioButtons.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckedRadioButtons.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                93F925410F7EF5B8007E37C9 /* RadioButtonGroups.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RadioButtonGroups.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                93F925420F7EF5B8007E37C9 /* RadioButtonGroups.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RadioButtonGroups.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 93F9B6540BA0F35E00854064 /* DOMHTMLCanvasElement.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMHTMLCanvasElement.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93F9B6550BA0F35E00854064 /* DOMHTMLCanvasElementInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMHTMLCanvasElementInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 93F9B6DE0BA0FB7200854064 /* JSComment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSComment.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -24238,8 +24238,6 @@
</span><span class="cx">                                 6550B695099DF0270090D781 /* CharacterData.cpp */,
</span><span class="cx">                                 6550B696099DF0270090D781 /* CharacterData.h */,
</span><span class="cx">                                 93EEC1E609C2877700C515D1 /* CharacterData.idl */,
</span><del>-                                93F925420F7EF5B8007E37C9 /* CheckedRadioButtons.cpp */,
-                                93F925410F7EF5B8007E37C9 /* CheckedRadioButtons.h */,
</del><span class="cx">                                 D619A305144E00BE004BC302 /* ChildListMutationScope.cpp */,
</span><span class="cx">                                 D619A306144E00BE004BC302 /* ChildListMutationScope.h */,
</span><span class="cx">                                 83D26D3C1AFDCC50001B3873 /* ChildNode.idl */,
</span><span class="lines">@@ -24518,6 +24516,8 @@
</span><span class="cx">                                 FF945ECA161F7F3600971BC8 /* PseudoElement.h */,
</span><span class="cx">                                 550A0BC7085F6039007353D6 /* QualifiedName.cpp */,
</span><span class="cx">                                 550A0BC8085F6039007353D6 /* QualifiedName.h */,
</span><ins>+                                93F925420F7EF5B8007E37C9 /* RadioButtonGroups.cpp */,
+                                93F925410F7EF5B8007E37C9 /* RadioButtonGroups.h */,
</ins><span class="cx">                                 F523D30302DE4476018635CA /* Range.cpp */,
</span><span class="cx">                                 F523D30402DE4476018635CA /* Range.h */,
</span><span class="cx">                                 936DD03A09CEAC270056AE8C /* Range.idl */,
</span><span class="lines">@@ -25278,7 +25278,7 @@
</span><span class="cx">                                 97B8FFD116AE7F960038388D /* CharacterReferenceParserInlines.h in Headers */,
</span><span class="cx">                                 B2C3DA2A0D006C1D00EF6F26 /* CharsetData.h in Headers */,
</span><span class="cx">                                 F55B3DB21251F12D003EF269 /* CheckboxInputType.h in Headers */,
</span><del>-                                93F925430F7EF5B8007E37C9 /* CheckedRadioButtons.h in Headers */,
</del><ins>+                                93F925430F7EF5B8007E37C9 /* RadioButtonGroups.h in Headers */,
</ins><span class="cx">                                 D619A308144E00BE004BC302 /* ChildListMutationScope.h in Headers */,
</span><span class="cx">                                 A81872200977D3C0005826D9 /* ChildNodeList.h in Headers */,
</span><span class="cx">                                 14D823520AF92A790004F057 /* Chrome.h in Headers */,
</span><span class="lines">@@ -29222,7 +29222,7 @@
</span><span class="cx">                                 6550B69F099DF0270090D781 /* CharacterData.cpp in Sources */,
</span><span class="cx">                                 9326DC0C09DAD5D600AFC847 /* CharsetData.cpp in Sources */,
</span><span class="cx">                                 F55B3DB11251F12D003EF269 /* CheckboxInputType.cpp in Sources */,
</span><del>-                                93F925440F7EF5B8007E37C9 /* CheckedRadioButtons.cpp in Sources */,
</del><ins>+                                93F925440F7EF5B8007E37C9 /* RadioButtonGroups.cpp in Sources */,
</ins><span class="cx">                                 D619A307144E00BE004BC302 /* ChildListMutationScope.cpp in Sources */,
</span><span class="cx">                                 A81872250977D3C0005826D9 /* ChildNodeList.cpp in Sources */,
</span><span class="cx">                                 14D8238B0AF92DF60004F057 /* Chrome.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoredomCheckedRadioButtonscpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/dom/CheckedRadioButtons.cpp (201658 => 201659)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CheckedRadioButtons.cpp        2016-06-03 21:35:06 UTC (rev 201658)
+++ trunk/Source/WebCore/dom/CheckedRadioButtons.cpp        2016-06-03 21:36:51 UTC (rev 201659)
</span><span class="lines">@@ -1,287 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#include &quot;config.h&quot;
-#include &quot;CheckedRadioButtons.h&quot;
-#include &quot;Range.h&quot;
-
-#include &quot;HTMLInputElement.h&quot;
-#include &lt;wtf/HashSet.h&gt;
-
-namespace WebCore {
-
-class RadioButtonGroup {
-    WTF_MAKE_FAST_ALLOCATED;
-public:
-    RadioButtonGroup();
-    bool isEmpty() const { return m_members.isEmpty(); }
-    bool isRequired() const { return m_requiredCount; }
-    HTMLInputElement* checkedButton() const { return m_checkedButton; }
-    void add(HTMLInputElement*);
-    void updateCheckedState(HTMLInputElement*);
-    void requiredAttributeChanged(HTMLInputElement*);
-    void remove(HTMLInputElement*);
-    bool contains(HTMLInputElement*) const;
-    Vector&lt;HTMLInputElement*&gt; members() const;
-    
-private:
-    void updateValidityForAllButtons();
-    bool isValid() const;
-    void setCheckedButton(HTMLInputElement*);
-
-    HashSet&lt;HTMLInputElement*&gt; m_members;
-    HTMLInputElement* m_checkedButton;
-    size_t m_requiredCount;
-};
-
-RadioButtonGroup::RadioButtonGroup()
-    : m_checkedButton(nullptr)
-    , m_requiredCount(0)
-{
-}
-
-inline bool RadioButtonGroup::isValid() const
-{
-    return !isRequired() || m_checkedButton;
-}
-
-Vector&lt;HTMLInputElement*&gt; RadioButtonGroup::members() const
-{
-    Vector&lt;HTMLInputElement*&gt; members;
-    copyToVector(m_members, members);
-    std::sort(members.begin(), members.end(), documentOrderComparator);
-    return members;
-}
-    
-void RadioButtonGroup::setCheckedButton(HTMLInputElement* button)
-{
-    HTMLInputElement* oldCheckedButton = m_checkedButton;
-    if (oldCheckedButton == button)
-        return;
-    m_checkedButton = button;
-    if (oldCheckedButton)
-        oldCheckedButton-&gt;setChecked(false);
-}
-
-void RadioButtonGroup::add(HTMLInputElement* button)
-{
-    ASSERT(button-&gt;isRadioButton());
-    if (!m_members.add(button).isNewEntry)
-        return;
-    bool groupWasValid = isValid();
-    if (button-&gt;isRequired())
-        ++m_requiredCount;
-    if (button-&gt;checked())
-        setCheckedButton(button);
-
-    bool groupIsValid = isValid();
-    if (groupWasValid != groupIsValid)
-        updateValidityForAllButtons();
-    else if (!groupIsValid) {
-        // A radio button not in a group is always valid. We need to make it
-        // invalid only if the group is invalid.
-        button-&gt;updateValidity();
-    }
-}
-
-void RadioButtonGroup::updateCheckedState(HTMLInputElement* button)
-{
-    ASSERT(button-&gt;isRadioButton());
-    ASSERT(m_members.contains(button));
-    bool wasValid = isValid();
-    if (button-&gt;checked())
-        setCheckedButton(button);
-    else {
-        if (m_checkedButton == button)
-            m_checkedButton = nullptr;
-    }
-    if (wasValid != isValid())
-        updateValidityForAllButtons();
-}
-
-void RadioButtonGroup::requiredAttributeChanged(HTMLInputElement* button)
-{
-    ASSERT(button-&gt;isRadioButton());
-    ASSERT(m_members.contains(button));
-    bool wasValid = isValid();
-    if (button-&gt;isRequired())
-        ++m_requiredCount;
-    else {
-        ASSERT(m_requiredCount);
-        --m_requiredCount;
-    }
-    if (wasValid != isValid())
-        updateValidityForAllButtons();
-}
-
-void RadioButtonGroup::remove(HTMLInputElement* button)
-{
-    ASSERT(button-&gt;isRadioButton());
-    HashSet&lt;HTMLInputElement*&gt;::iterator it = m_members.find(button);
-    if (it == m_members.end())
-        return;
-    bool wasValid = isValid();
-    m_members.remove(it);
-    if (button-&gt;isRequired()) {
-        ASSERT(m_requiredCount);
-        --m_requiredCount;
-    }
-    if (m_checkedButton == button)
-        m_checkedButton = nullptr;
-
-    if (m_members.isEmpty()) {
-        ASSERT(!m_requiredCount);
-        ASSERT(!m_checkedButton);
-    } else if (wasValid != isValid())
-        updateValidityForAllButtons();
-    if (!wasValid) {
-        // A radio button not in a group is always valid. We need to make it
-        // valid only if the group was invalid.
-        button-&gt;updateValidity();
-    }
-}
-
-void RadioButtonGroup::updateValidityForAllButtons()
-{
-    for (auto&amp; button : m_members) {
-        ASSERT(button-&gt;isRadioButton());
-        button-&gt;updateValidity();
-    }
-}
-
-bool RadioButtonGroup::contains(HTMLInputElement* button) const
-{
-    return m_members.contains(button);
-}
-
-// ----------------------------------------------------------------
-
-// Explicity define empty constructor and destructor in order to prevent the
-// compiler from generating them as inlines. So we don't need to to define
-// RadioButtonGroup in the header.
-CheckedRadioButtons::CheckedRadioButtons()
-{
-}
-
-CheckedRadioButtons::~CheckedRadioButtons()
-{
-}
-
-void CheckedRadioButtons::addButton(HTMLInputElement* element)
-{
-    ASSERT(element-&gt;isRadioButton());
-    if (element-&gt;name().isEmpty())
-        return;
-
-    if (!m_nameToGroupMap)
-        m_nameToGroupMap = std::make_unique&lt;NameToGroupMap&gt;();
-
-    auto&amp; group = m_nameToGroupMap-&gt;add(element-&gt;name().impl(), nullptr).iterator-&gt;value;
-    if (!group)
-        group = std::make_unique&lt;RadioButtonGroup&gt;();
-    group-&gt;add(element);
-}
-
-Vector&lt;HTMLInputElement*&gt; CheckedRadioButtons::groupMembers(const HTMLInputElement&amp; element) const
-{
-    ASSERT(element.isRadioButton());
-    if (!element.isRadioButton())
-        return { };
-    
-    auto* name = element.name().impl();
-    if (!name)
-        return { };
-
-    auto* group = m_nameToGroupMap-&gt;get(name);
-    if (!group)
-        return { };
-    return group-&gt;members();
-}
-    
-void CheckedRadioButtons::updateCheckedState(HTMLInputElement* element)
-{
-    ASSERT(element-&gt;isRadioButton());
-    if (element-&gt;name().isEmpty())
-        return;
-    ASSERT(m_nameToGroupMap);
-    if (!m_nameToGroupMap)
-        return;
-    RadioButtonGroup* group = m_nameToGroupMap-&gt;get(element-&gt;name().impl());
-    ASSERT(group);
-    group-&gt;updateCheckedState(element);
-}
-
-void CheckedRadioButtons::requiredAttributeChanged(HTMLInputElement* element)
-{
-    ASSERT(element-&gt;isRadioButton());
-    if (element-&gt;name().isEmpty())
-        return;
-    ASSERT(m_nameToGroupMap);
-    if (!m_nameToGroupMap)
-        return;
-    RadioButtonGroup* group = m_nameToGroupMap-&gt;get(element-&gt;name().impl());
-    ASSERT(group);
-    group-&gt;requiredAttributeChanged(element);
-}
-
-HTMLInputElement* CheckedRadioButtons::checkedButtonForGroup(const AtomicString&amp; name) const
-{
-    if (!m_nameToGroupMap)
-        return 0;
-    m_nameToGroupMap-&gt;checkConsistency();
-    RadioButtonGroup* group = m_nameToGroupMap-&gt;get(name.impl());
-    return group ? group-&gt;checkedButton() : nullptr;
-}
-
-bool CheckedRadioButtons::isInRequiredGroup(HTMLInputElement* element) const
-{
-    ASSERT(element-&gt;isRadioButton());
-    if (element-&gt;name().isEmpty())
-        return false;
-    if (!m_nameToGroupMap)
-        return false;
-    RadioButtonGroup* group = m_nameToGroupMap-&gt;get(element-&gt;name().impl());
-    return group &amp;&amp; group-&gt;isRequired() &amp;&amp; group-&gt;contains(element);
-}
-
-void CheckedRadioButtons::removeButton(HTMLInputElement* element)
-{
-    ASSERT(element-&gt;isRadioButton());
-    if (element-&gt;name().isEmpty())
-        return;
-    if (!m_nameToGroupMap)
-        return;
-
-    m_nameToGroupMap-&gt;checkConsistency();
-    NameToGroupMap::iterator it = m_nameToGroupMap-&gt;find(element-&gt;name().impl());
-    if (it == m_nameToGroupMap-&gt;end())
-        return;
-    it-&gt;value-&gt;remove(element);
-    if (it-&gt;value-&gt;isEmpty()) {
-        // FIXME: We may skip deallocating the empty RadioButtonGroup for
-        // performance improvement. If we do so, we need to change the key type
-        // of m_nameToGroupMap from AtomicStringImpl* to RefPtr&lt;AtomicStringImpl&gt;.
-        m_nameToGroupMap-&gt;remove(it);
-        if (m_nameToGroupMap-&gt;isEmpty())
-            m_nameToGroupMap = nullptr;
-    }
-}
-
-} // namespace
</del></span></pre></div>
<a id="trunkSourceWebCoredomCheckedRadioButtonsh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/dom/CheckedRadioButtons.h (201658 => 201659)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CheckedRadioButtons.h        2016-06-03 21:35:06 UTC (rev 201658)
+++ trunk/Source/WebCore/dom/CheckedRadioButtons.h        2016-06-03 21:36:51 UTC (rev 201659)
</span><span class="lines">@@ -1,55 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef CheckedRadioButtons_h
-#define CheckedRadioButtons_h
-
-#include &lt;memory&gt;
-#include &lt;wtf/Forward.h&gt;
-#include &lt;wtf/HashMap.h&gt;
-#include &lt;wtf/Vector.h&gt;
-
-namespace WebCore {
-
-class HTMLInputElement;
-class RadioButtonGroup;
-
-// FIXME: Rename the class. The class was a simple map from a name to a checked
-// radio button. It manages RadioButtonGroup objects now.
-class CheckedRadioButtons {
-public:
-    CheckedRadioButtons();
-    ~CheckedRadioButtons();
-    void addButton(HTMLInputElement*);
-    void updateCheckedState(HTMLInputElement*);
-    void requiredAttributeChanged(HTMLInputElement*);
-    void removeButton(HTMLInputElement*);
-    HTMLInputElement* checkedButtonForGroup(const AtomicString&amp; groupName) const;
-    bool isInRequiredGroup(HTMLInputElement*) const;
-    Vector&lt;HTMLInputElement*&gt; groupMembers(const HTMLInputElement&amp;) const;
-    
-private:
-    typedef HashMap&lt;AtomicStringImpl*, std::unique_ptr&lt;RadioButtonGroup&gt;&gt; NameToGroupMap;
-    std::unique_ptr&lt;NameToGroupMap&gt; m_nameToGroupMap;
-};
-
-} // namespace WebCore
-
-#endif // CheckedRadioButtons_h
</del></span></pre></div>
<a id="trunkSourceWebCoredomDOMAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DOMAllInOne.cpp (201658 => 201659)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMAllInOne.cpp        2016-06-03 21:35:06 UTC (rev 201658)
+++ trunk/Source/WebCore/dom/DOMAllInOne.cpp        2016-06-03 21:36:51 UTC (rev 201659)
</span><span class="lines">@@ -34,7 +34,6 @@
</span><span class="cx"> #include &quot;BeforeUnloadEvent.cpp&quot;
</span><span class="cx"> #include &quot;CDATASection.cpp&quot;
</span><span class="cx"> #include &quot;CharacterData.cpp&quot;
</span><del>-#include &quot;CheckedRadioButtons.cpp&quot;
</del><span class="cx"> #include &quot;ChildListMutationScope.cpp&quot;
</span><span class="cx"> #include &quot;ChildNodeList.cpp&quot;
</span><span class="cx"> #include &quot;ClassCollection.cpp&quot;
</span><span class="lines">@@ -129,6 +128,7 @@
</span><span class="cx"> // Build error if adding QualifiedName.cpp to DOMAllInOne.cpp
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=146586
</span><span class="cx"> // #include &quot;QualifiedName.cpp&quot;
</span><ins>+#include &quot;RadioButtonGroups.cpp&quot;
</ins><span class="cx"> #include &quot;Range.cpp&quot;
</span><span class="cx"> #include &quot;RegisteredEventListener.cpp&quot;
</span><span class="cx"> #include &quot;ScopedEventQueue.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoredomRadioButtonGroupscppfromrev201658trunkSourceWebCoredomCheckedRadioButtonscpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/dom/RadioButtonGroups.cpp (from rev 201658, trunk/Source/WebCore/dom/CheckedRadioButtons.cpp) (0 => 201659)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/RadioButtonGroups.cpp                                (rev 0)
+++ trunk/Source/WebCore/dom/RadioButtonGroups.cpp        2016-06-03 21:36:51 UTC (rev 201659)
</span><span class="lines">@@ -0,0 +1,287 @@
</span><ins>+/*
+ * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include &quot;config.h&quot;
+#include &quot;RadioButtonGroups.h&quot;
+
+#include &quot;HTMLInputElement.h&quot;
+#include &quot;Range.h&quot;
+#include &lt;wtf/HashSet.h&gt;
+
+namespace WebCore {
+
+class RadioButtonGroup {
+    WTF_MAKE_FAST_ALLOCATED;
+public:
+    RadioButtonGroup();
+    bool isEmpty() const { return m_members.isEmpty(); }
+    bool isRequired() const { return m_requiredCount; }
+    HTMLInputElement* checkedButton() const { return m_checkedButton; }
+    void add(HTMLInputElement*);
+    void updateCheckedState(HTMLInputElement*);
+    void requiredAttributeChanged(HTMLInputElement*);
+    void remove(HTMLInputElement*);
+    bool contains(HTMLInputElement*) const;
+    Vector&lt;HTMLInputElement*&gt; members() const;
+
+private:
+    void updateValidityForAllButtons();
+    bool isValid() const;
+    void setCheckedButton(HTMLInputElement*);
+
+    HashSet&lt;HTMLInputElement*&gt; m_members;
+    HTMLInputElement* m_checkedButton;
+    size_t m_requiredCount;
+};
+
+RadioButtonGroup::RadioButtonGroup()
+    : m_checkedButton(nullptr)
+    , m_requiredCount(0)
+{
+}
+
+inline bool RadioButtonGroup::isValid() const
+{
+    return !isRequired() || m_checkedButton;
+}
+
+Vector&lt;HTMLInputElement*&gt; RadioButtonGroup::members() const
+{
+    Vector&lt;HTMLInputElement*&gt; members;
+    copyToVector(m_members, members);
+    std::sort(members.begin(), members.end(), documentOrderComparator);
+    return members;
+}
+
+void RadioButtonGroup::setCheckedButton(HTMLInputElement* button)
+{
+    HTMLInputElement* oldCheckedButton = m_checkedButton;
+    if (oldCheckedButton == button)
+        return;
+    m_checkedButton = button;
+    if (oldCheckedButton)
+        oldCheckedButton-&gt;setChecked(false);
+}
+
+void RadioButtonGroup::add(HTMLInputElement* button)
+{
+    ASSERT(button-&gt;isRadioButton());
+    if (!m_members.add(button).isNewEntry)
+        return;
+    bool groupWasValid = isValid();
+    if (button-&gt;isRequired())
+        ++m_requiredCount;
+    if (button-&gt;checked())
+        setCheckedButton(button);
+
+    bool groupIsValid = isValid();
+    if (groupWasValid != groupIsValid)
+        updateValidityForAllButtons();
+    else if (!groupIsValid) {
+        // A radio button not in a group is always valid. We need to make it
+        // invalid only if the group is invalid.
+        button-&gt;updateValidity();
+    }
+}
+
+void RadioButtonGroup::updateCheckedState(HTMLInputElement* button)
+{
+    ASSERT(button-&gt;isRadioButton());
+    ASSERT(m_members.contains(button));
+    bool wasValid = isValid();
+    if (button-&gt;checked())
+        setCheckedButton(button);
+    else {
+        if (m_checkedButton == button)
+            m_checkedButton = nullptr;
+    }
+    if (wasValid != isValid())
+        updateValidityForAllButtons();
+}
+
+void RadioButtonGroup::requiredAttributeChanged(HTMLInputElement* button)
+{
+    ASSERT(button-&gt;isRadioButton());
+    ASSERT(m_members.contains(button));
+    bool wasValid = isValid();
+    if (button-&gt;isRequired())
+        ++m_requiredCount;
+    else {
+        ASSERT(m_requiredCount);
+        --m_requiredCount;
+    }
+    if (wasValid != isValid())
+        updateValidityForAllButtons();
+}
+
+void RadioButtonGroup::remove(HTMLInputElement* button)
+{
+    ASSERT(button-&gt;isRadioButton());
+    HashSet&lt;HTMLInputElement*&gt;::iterator it = m_members.find(button);
+    if (it == m_members.end())
+        return;
+    bool wasValid = isValid();
+    m_members.remove(it);
+    if (button-&gt;isRequired()) {
+        ASSERT(m_requiredCount);
+        --m_requiredCount;
+    }
+    if (m_checkedButton == button)
+        m_checkedButton = nullptr;
+
+    if (m_members.isEmpty()) {
+        ASSERT(!m_requiredCount);
+        ASSERT(!m_checkedButton);
+    } else if (wasValid != isValid())
+        updateValidityForAllButtons();
+    if (!wasValid) {
+        // A radio button not in a group is always valid. We need to make it
+        // valid only if the group was invalid.
+        button-&gt;updateValidity();
+    }
+}
+
+void RadioButtonGroup::updateValidityForAllButtons()
+{
+    for (auto&amp; button : m_members) {
+        ASSERT(button-&gt;isRadioButton());
+        button-&gt;updateValidity();
+    }
+}
+
+bool RadioButtonGroup::contains(HTMLInputElement* button) const
+{
+    return m_members.contains(button);
+}
+
+// ----------------------------------------------------------------
+
+// Explicity define empty constructor and destructor in order to prevent the
+// compiler from generating them as inlines. So we don't need to to define
+// RadioButtonGroup in the header.
+RadioButtonGroups::RadioButtonGroups()
+{
+}
+
+RadioButtonGroups::~RadioButtonGroups()
+{
+}
+
+void RadioButtonGroups::addButton(HTMLInputElement* element)
+{
+    ASSERT(element-&gt;isRadioButton());
+    if (element-&gt;name().isEmpty())
+        return;
+
+    if (!m_nameToGroupMap)
+        m_nameToGroupMap = std::make_unique&lt;NameToGroupMap&gt;();
+
+    auto&amp; group = m_nameToGroupMap-&gt;add(element-&gt;name().impl(), nullptr).iterator-&gt;value;
+    if (!group)
+        group = std::make_unique&lt;RadioButtonGroup&gt;();
+    group-&gt;add(element);
+}
+
+Vector&lt;HTMLInputElement*&gt; RadioButtonGroups::groupMembers(const HTMLInputElement&amp; element) const
+{
+    ASSERT(element.isRadioButton());
+    if (!element.isRadioButton())
+        return { };
+
+    auto* name = element.name().impl();
+    if (!name)
+        return { };
+
+    auto* group = m_nameToGroupMap-&gt;get(name);
+    if (!group)
+        return { };
+    return group-&gt;members();
+}
+
+void RadioButtonGroups::updateCheckedState(HTMLInputElement* element)
+{
+    ASSERT(element-&gt;isRadioButton());
+    if (element-&gt;name().isEmpty())
+        return;
+    ASSERT(m_nameToGroupMap);
+    if (!m_nameToGroupMap)
+        return;
+    RadioButtonGroup* group = m_nameToGroupMap-&gt;get(element-&gt;name().impl());
+    ASSERT(group);
+    group-&gt;updateCheckedState(element);
+}
+
+void RadioButtonGroups::requiredAttributeChanged(HTMLInputElement* element)
+{
+    ASSERT(element-&gt;isRadioButton());
+    if (element-&gt;name().isEmpty())
+        return;
+    ASSERT(m_nameToGroupMap);
+    if (!m_nameToGroupMap)
+        return;
+    RadioButtonGroup* group = m_nameToGroupMap-&gt;get(element-&gt;name().impl());
+    ASSERT(group);
+    group-&gt;requiredAttributeChanged(element);
+}
+
+HTMLInputElement* RadioButtonGroups::checkedButtonForGroup(const AtomicString&amp; name) const
+{
+    if (!m_nameToGroupMap)
+        return 0;
+    m_nameToGroupMap-&gt;checkConsistency();
+    RadioButtonGroup* group = m_nameToGroupMap-&gt;get(name.impl());
+    return group ? group-&gt;checkedButton() : nullptr;
+}
+
+bool RadioButtonGroups::isInRequiredGroup(HTMLInputElement* element) const
+{
+    ASSERT(element-&gt;isRadioButton());
+    if (element-&gt;name().isEmpty())
+        return false;
+    if (!m_nameToGroupMap)
+        return false;
+    RadioButtonGroup* group = m_nameToGroupMap-&gt;get(element-&gt;name().impl());
+    return group &amp;&amp; group-&gt;isRequired() &amp;&amp; group-&gt;contains(element);
+}
+
+void RadioButtonGroups::removeButton(HTMLInputElement* element)
+{
+    ASSERT(element-&gt;isRadioButton());
+    if (element-&gt;name().isEmpty())
+        return;
+    if (!m_nameToGroupMap)
+        return;
+
+    m_nameToGroupMap-&gt;checkConsistency();
+    NameToGroupMap::iterator it = m_nameToGroupMap-&gt;find(element-&gt;name().impl());
+    if (it == m_nameToGroupMap-&gt;end())
+        return;
+    it-&gt;value-&gt;remove(element);
+    if (it-&gt;value-&gt;isEmpty()) {
+        // FIXME: We may skip deallocating the empty RadioButtonGroup for
+        // performance improvement. If we do so, we need to change the key type
+        // of m_nameToGroupMap from AtomicStringImpl* to RefPtr&lt;AtomicStringImpl&gt;.
+        m_nameToGroupMap-&gt;remove(it);
+        if (m_nameToGroupMap-&gt;isEmpty())
+            m_nameToGroupMap = nullptr;
+    }
+}
+
+} // namespace
</ins></span></pre></div>
<a id="trunkSourceWebCoredomRadioButtonGroupshfromrev201658trunkSourceWebCoredomCheckedRadioButtonsh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/dom/RadioButtonGroups.h (from rev 201658, trunk/Source/WebCore/dom/CheckedRadioButtons.h) (0 => 201659)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/RadioButtonGroups.h                                (rev 0)
+++ trunk/Source/WebCore/dom/RadioButtonGroups.h        2016-06-03 21:36:51 UTC (rev 201659)
</span><span class="lines">@@ -0,0 +1,50 @@
</span><ins>+/*
+ * Copyright (C) 2007, 2008, 2009, 2016 Apple Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#pragma once
+
+#include &lt;memory&gt;
+#include &lt;wtf/Forward.h&gt;
+#include &lt;wtf/HashMap.h&gt;
+#include &lt;wtf/Vector.h&gt;
+
+namespace WebCore {
+
+class HTMLInputElement;
+class RadioButtonGroup;
+
+class RadioButtonGroups {
+public:
+    RadioButtonGroups();
+    ~RadioButtonGroups();
+    void addButton(HTMLInputElement*);
+    void updateCheckedState(HTMLInputElement*);
+    void requiredAttributeChanged(HTMLInputElement*);
+    void removeButton(HTMLInputElement*);
+    HTMLInputElement* checkedButtonForGroup(const AtomicString&amp; groupName) const;
+    bool isInRequiredGroup(HTMLInputElement*) const;
+    Vector&lt;HTMLInputElement*&gt; groupMembers(const HTMLInputElement&amp;) const;
+
+private:
+    typedef HashMap&lt;AtomicStringImpl*, std::unique_ptr&lt;RadioButtonGroup&gt;&gt; NameToGroupMap;
+    std::unique_ptr&lt;NameToGroupMap&gt; m_nameToGroupMap;
+};
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorehtmlFormControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/FormController.h (201658 => 201659)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/FormController.h        2016-06-03 21:35:06 UTC (rev 201658)
+++ trunk/Source/WebCore/html/FormController.h        2016-06-03 21:36:51 UTC (rev 201659)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> #ifndef FormController_h
</span><span class="cx"> #define FormController_h
</span><span class="cx"> 
</span><del>-#include &quot;CheckedRadioButtons.h&quot;
</del><ins>+#include &quot;RadioButtonGroups.h&quot;
</ins><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="cx"> #include &lt;wtf/ListHashSet.h&gt;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">     FormController();
</span><span class="cx">     ~FormController();
</span><span class="cx"> 
</span><del>-    CheckedRadioButtons&amp; checkedRadioButtons() { return m_checkedRadioButtons; }
</del><ins>+    RadioButtonGroups&amp; radioButtonGroups() { return m_radioButtonGroups; }
</ins><span class="cx"> 
</span><span class="cx">     void registerFormElementWithState(HTMLFormControlElementWithState*);
</span><span class="cx">     void unregisterFormElementWithState(HTMLFormControlElementWithState*);
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx">     FormControlState takeStateForFormElement(const HTMLFormControlElementWithState&amp;);
</span><span class="cx">     static void formStatesFromStateVector(const Vector&lt;String&gt;&amp;, SavedFormStateMap&amp;);
</span><span class="cx"> 
</span><del>-    CheckedRadioButtons m_checkedRadioButtons;
</del><ins>+    RadioButtonGroups m_radioButtonGroups;
</ins><span class="cx">     FormElementListHashSet m_formElementsWithState;
</span><span class="cx">     SavedFormStateMap m_savedFormStateMap;
</span><span class="cx">     std::unique_ptr&lt;FormKeyGenerator&gt; m_formKeyGenerator;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormElement.h (201658 => 201659)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormElement.h        2016-06-03 21:35:06 UTC (rev 201658)
+++ trunk/Source/WebCore/html/HTMLFormElement.h        2016-06-03 21:36:51 UTC (rev 201659)
</span><span class="lines">@@ -24,10 +24,10 @@
</span><span class="cx"> #ifndef HTMLFormElement_h
</span><span class="cx"> #define HTMLFormElement_h
</span><span class="cx"> 
</span><del>-#include &quot;CheckedRadioButtons.h&quot;
</del><span class="cx"> #include &quot;FormState.h&quot;
</span><span class="cx"> #include &quot;FormSubmission.h&quot;
</span><span class="cx"> #include &quot;HTMLElement.h&quot;
</span><ins>+#include &quot;RadioButtonGroups.h&quot;
</ins><span class="cx"> #include &lt;memory&gt;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(IOS_AUTOCORRECT_AND_AUTOCAPITALIZE)
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx">     void finishRequestAutocomplete(AutocompleteResult);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    CheckedRadioButtons&amp; checkedRadioButtons() { return m_checkedRadioButtons; }
</del><ins>+    RadioButtonGroups&amp; radioButtonGroups() { return m_radioButtonGroups; }
</ins><span class="cx"> 
</span><span class="cx">     const Vector&lt;FormAssociatedElement*&gt;&amp; associatedElements() const { return m_associatedElements; }
</span><span class="cx">     const Vector&lt;HTMLImageElement*&gt;&amp; imageElements() const { return m_imageElements; }
</span><span class="lines">@@ -185,7 +185,7 @@
</span><span class="cx">     FormSubmission::Attributes m_attributes;
</span><span class="cx">     std::unique_ptr&lt;PastNamesMap&gt; m_pastNamesMap;
</span><span class="cx"> 
</span><del>-    CheckedRadioButtons m_checkedRadioButtons;
</del><ins>+    RadioButtonGroups m_radioButtonGroups;
</ins><span class="cx"> 
</span><span class="cx">     unsigned m_associatedElementsBeforeIndex;
</span><span class="cx">     unsigned m_associatedElementsAfterIndex;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (201658 => 201659)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.cpp        2016-06-03 21:35:06 UTC (rev 201658)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp        2016-06-03 21:36:51 UTC (rev 201659)
</span><span class="lines">@@ -158,7 +158,7 @@
</span><span class="cx">     // setForm(0) may register this to a document-level radio button group.
</span><span class="cx">     // We should unregister it to avoid accessing a deleted object.
</span><span class="cx">     if (isRadioButton())
</span><del>-        document().formController().checkedRadioButtons().removeButton(this);
</del><ins>+        document().formController().radioButtonGroups().removeButton(this);
</ins><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx">     if (m_hasTouchEventHandler)
</span><span class="cx">         document().didRemoveEventTargetNode(*this);
</span><span class="lines">@@ -854,7 +854,7 @@
</span><span class="cx">     m_isChecked = nowChecked;
</span><span class="cx">     setNeedsStyleRecalc();
</span><span class="cx"> 
</span><del>-    if (CheckedRadioButtons* buttons = checkedRadioButtons())
</del><ins>+    if (RadioButtonGroups* buttons = radioButtonGroups())
</ins><span class="cx">             buttons-&gt;updateCheckedState(this);
</span><span class="cx">     if (renderer() &amp;&amp; renderer()-&gt;style().hasAppearance())
</span><span class="cx">         renderer()-&gt;theme().stateChanged(*renderer(), ControlStates::CheckedState);
</span><span class="lines">@@ -1495,7 +1495,7 @@
</span><span class="cx">         if (needsSuspensionCallback)
</span><span class="cx">             oldDocument-&gt;unregisterForDocumentSuspensionCallbacks(this);
</span><span class="cx">         if (isRadioButton())
</span><del>-            oldDocument-&gt;formController().checkedRadioButtons().removeButton(this);
</del><ins>+            oldDocument-&gt;formController().radioButtonGroups().removeButton(this);
</ins><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><span class="cx">         if (m_hasTouchEventHandler)
</span><span class="cx">             oldDocument-&gt;didRemoveEventTargetNode(*this);
</span><span class="lines">@@ -1528,7 +1528,7 @@
</span><span class="cx"> void HTMLInputElement::requiredAttributeChanged()
</span><span class="cx"> {
</span><span class="cx">     HTMLTextFormControlElement::requiredAttributeChanged();
</span><del>-    if (CheckedRadioButtons* buttons = checkedRadioButtons())
</del><ins>+    if (RadioButtonGroups* buttons = radioButtonGroups())
</ins><span class="cx">         buttons-&gt;requiredAttributeChanged(this);
</span><span class="cx">     m_inputType-&gt;requiredAttributeChanged();
</span><span class="cx"> }
</span><span class="lines">@@ -1772,14 +1772,14 @@
</span><span class="cx"> bool HTMLInputElement::isInRequiredRadioButtonGroup()
</span><span class="cx"> {
</span><span class="cx">     ASSERT(isRadioButton());
</span><del>-    if (CheckedRadioButtons* buttons = checkedRadioButtons())
</del><ins>+    if (RadioButtonGroups* buttons = radioButtonGroups())
</ins><span class="cx">         return buttons-&gt;isInRequiredGroup(this);
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Vector&lt;HTMLInputElement*&gt; HTMLInputElement::radioButtonGroup() const
</span><span class="cx"> {
</span><del>-    CheckedRadioButtons* buttons = checkedRadioButtons();
</del><ins>+    RadioButtonGroups* buttons = radioButtonGroups();
</ins><span class="cx">     if (!buttons)
</span><span class="cx">         return { };
</span><span class="cx">     return buttons-&gt;groupMembers(*this);
</span><span class="lines">@@ -1787,31 +1787,31 @@
</span><span class="cx">     
</span><span class="cx"> HTMLInputElement* HTMLInputElement::checkedRadioButtonForGroup() const
</span><span class="cx"> {
</span><del>-    if (CheckedRadioButtons* buttons = checkedRadioButtons())
</del><ins>+    if (RadioButtonGroups* buttons = radioButtonGroups())
</ins><span class="cx">         return buttons-&gt;checkedButtonForGroup(name());
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-CheckedRadioButtons* HTMLInputElement::checkedRadioButtons() const
</del><ins>+RadioButtonGroups* HTMLInputElement::radioButtonGroups() const
</ins><span class="cx"> {
</span><span class="cx">     if (!isRadioButton())
</span><span class="cx">         return 0;
</span><span class="cx">     if (HTMLFormElement* formElement = form())
</span><del>-        return &amp;formElement-&gt;checkedRadioButtons();
</del><ins>+        return &amp;formElement-&gt;radioButtonGroups();
</ins><span class="cx">     if (inDocument())
</span><del>-        return &amp;document().formController().checkedRadioButtons();
</del><ins>+        return &amp;document().formController().radioButtonGroups();
</ins><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline void HTMLInputElement::addToRadioButtonGroup()
</span><span class="cx"> {
</span><del>-    if (CheckedRadioButtons* buttons = checkedRadioButtons())
</del><ins>+    if (RadioButtonGroups* buttons = radioButtonGroups())
</ins><span class="cx">         buttons-&gt;addButton(this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> inline void HTMLInputElement::removeFromRadioButtonGroup()
</span><span class="cx"> {
</span><del>-    if (CheckedRadioButtons* buttons = checkedRadioButtons())
</del><ins>+    if (RadioButtonGroups* buttons = radioButtonGroups())
</ins><span class="cx">         buttons-&gt;removeButton(this);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.h (201658 => 201659)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.h        2016-06-03 21:35:06 UTC (rev 201658)
+++ trunk/Source/WebCore/html/HTMLInputElement.h        2016-06-03 21:36:51 UTC (rev 201659)
</span><span class="lines">@@ -36,7 +36,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class CheckedRadioButtons;
</del><span class="cx"> class DragData;
</span><span class="cx"> class FileList;
</span><span class="cx"> class HTMLDataListElement;
</span><span class="lines">@@ -45,6 +44,7 @@
</span><span class="cx"> class Icon;
</span><span class="cx"> class InputType;
</span><span class="cx"> class ListAttributeTargetObserver;
</span><ins>+class RadioButtonGroups;
</ins><span class="cx"> class TextControlInnerTextElement;
</span><span class="cx"> class URL;
</span><span class="cx"> struct DateTimeChooserParameters;
</span><span class="lines">@@ -421,7 +421,7 @@
</span><span class="cx">     void updateValueIfNeeded();
</span><span class="cx"> 
</span><span class="cx">     // Returns null if this isn't associated with any radio button group.
</span><del>-    CheckedRadioButtons* checkedRadioButtons() const;
</del><ins>+    RadioButtonGroups* radioButtonGroups() const;
</ins><span class="cx">     void addToRadioButtonGroup();
</span><span class="cx">     void removeFromRadioButtonGroup();
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>