<!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>[210667] trunk</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/210667">210667</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-01-12 10:30:53 -0800 (Thu, 12 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>[WebIDL] Autogenerate named getters
https://bugs.webkit.org/show_bug.cgi?id=166835
Patch by Sam Weinig <sam@webkit.org> on 2017-01-12
Reviewed by Alex Christensen.
Source/WebCore:
* Modules/mediastream/RTCStatsResponse.idl:
Update type to be nullable, since generator expects that for now.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCustomSQLStatementErrorCallback.cpp: Removed.
* bindings/js/JSDOMMimeTypeArrayCustom.cpp: Removed.
* bindings/js/JSDOMNamedFlowCollectionCustom.cpp: Removed.
* bindings/js/JSDOMPluginArrayCustom.cpp: Removed.
* bindings/js/JSDOMPluginCustom.cpp: Removed.
* bindings/js/JSNamedNodeMapCustom.cpp: Removed.
* bindings/js/JSRTCStatsResponseCustom.cpp: Removed.
* bindings/js/JSStyleSheetListCustom.cpp: Removed.
Remove deleted files.
* bindings/js/JSSQLStatementErrorCallbackCustom.cpp:
Renamed from Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp for consistency.
* bindings/IDLTypes.h:
(WebCore::IDLNullable::nullValue):
(WebCore::IDLNullable::isNullValue):
(WebCore::IDLNullable::extractValueFromNullable):
Add Nullable traits for IDLNullable, that call down to the underlying type. This allows
us to more easily tests for nullability without stripping the IDLNullable off.
* bindings/js/JSDOMStringMapCustom.cpp:
(WebCore::JSDOMStringMap::getOwnPropertySlotDelegate): Deleted.
(WebCore::JSDOMStringMap::getOwnPropertyNames): Deleted.
Remove overriden getOwnPropertySlot and getOwnPropertyNames.
* bindings/js/JSHTMLCollectionCustom.cpp:
(WebCore::JSHTMLCollection::nameGetter): Deleted.
* bindings/js/JSHTMLFormElementCustom.cpp:
(WebCore::JSHTMLFormElement::nameGetter): Deleted.
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::nameGetter): Deleted.
* bindings/js/JSStorageCustom.cpp:
(WebCore::JSStorage::nameGetter): Deleted.
Remove custom name getters.
* bindings/js/JSHTMLSelectElementCustom.cpp:
(WebCore::selectElementIndexSetter):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::setItem):
(WebCore::HTMLSelectElement::setLength):
(WebCore::HTMLSelectElement::setOption): Deleted.
* html/HTMLSelectElement.h:
Add implementation of HTMLSelectElement::setItem() that does properly
removes if the option is null. Re-implement selectElementIndexSetter to
use it and switch conversion code to use JSDOMConvert.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateIndexedGetter):
(GenerateNamedGetter):
Extract typed getter generation into their own functions.
(GenerateGetOwnPropertySlotBody):
(GenerateGetOwnPropertySlotBodyByIndex):
Extract getOwnPropertySlotBody / getOwnPropertySlotBodyByIndex generation
into their own functions. Add support for generating name getters.
(GenerateGetOwnPropertyNames):
Extract getOwnPropertyNames generation into its own function, adding support
for respecting the LegacyUnenumerableNamedProperties attribute and switching
the default to not include named properties in the enumerated names.
(GeneratePut):
(GeneratePutByIndex):
Extract put / putByIndex generators into their own functions in preparation
of supporting namedSetters in the future.
(GetIndexedSetterFunction):
(GetNamedSetterFunction):
(GetNamedDeleterFunction):
Add helper getter functions to extract named/index setter/deleters.
(InstanceOverridesPut):
Add helper predicate to determine if an interface needs an implementation
of put.
(GenerateHeader):
Place custom helper functions (e.g. nameGetter/putDelegate/etc.) together
in the generated header.
(GenerateImplementation):
(GenerateCallbackImplementationContent):
Replace inline generation with calls to the new helper generator functions.
(NativeToJSValueUsingReferences):
(NativeToJSValueUsingPointers):
(NativeToJSValue):
Remove unused inFunctionCall parameter, and add new suppressExceptionCheck
parameter, which is used for nameGetters.
* bindings/scripts/IDLAttributes.txt:
Add LegacyUnenumerableNamedProperties.
* css/StyleSheetList.cpp:
(WebCore::StyleSheetList::namedItem):
(WebCore::StyleSheetList::getNamedItem): Deleted.
* css/StyleSheetList.h:
* css/StyleSheetList.idl:
Rename getNamedItem to namedItem, and make it return a CSSStyleSheet*
which is what the bindings specify.
* dom/DOMNamedFlowCollection.idl:
Add LegacyUnenumerableNamedProperties to match existing behavior.
* dom/DOMStringMap.h:
Switch from typedef to type alias.
* dom/DOMStringMap.idl:
Remove CustomEnumerateProperty and JSCustomGetOwnPropertySlotAndDescriptor
and add the getter. Also add the missing setter and deleter commented out.
* dom/DatasetDOMStringMap.h:
* dom/DatasetDOMStringMap.cpp:
(WebCore::DatasetDOMStringMap::supportedPropertyNames):
(WebCore::DatasetDOMStringMap::names): Deleted.
Rename names to supportedPropertyNames to support the bindings.
(WebCore::DatasetDOMStringMap::item):
(WebCore::DatasetDOMStringMap::namedItem):
Add namedItems (to support the bindings), and rework item to return
an optional rather than using a bool out parameter.
* dom/NamedNodeMap.idl:
Add LegacyUnenumerableNamedProperties matching the spec.
* html/HTMLAllCollection.idl:
Add CustomNamedGetter and LegacyUnenumerableNamedProperties. Update signatures
to match the spec. Commenting out ones not implemented yet.
* html/HTMLCollection.idl:
Add LegacyUnenumerableNamedProperties matching the spec.
* html/HTMLFormControlsCollection.idl:
Add CustomNamedGetter. Update signature of the getter to match the spec.
The reason this can't be generated yet is that we don't have a good strategy
for functions with differing return types that shadow each other.
* html/HTMLFormElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::namedItem):
(WebCore::HTMLFormElement::supportedPropertyNames):
Add implementation of namedItem and stub of supportedPropertyNames.
* html/HTMLFormElement.idl:
Add LegacyUnenumerableNamedProperties and remove CustomNamedGetter. Update
the signatures to match the spec.
* page/DOMWindow.idl:
Add LegacyUnenumerableNamedProperties matching the spec.
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
Add LegacyUnenumerableNamedProperties and add nullability to return types.
LayoutTests:
* fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
* fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
* js/dom/reflect-set-onto-dom-expected.txt:
Update exception text.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLSelectElementselectselectedIndexexpectedtxt">trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLSelectElementselectselectedIndexmultipleexpectedtxt">trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsdomreflectsetontodomexpectedtxt">trunk/LayoutTests/js/dom/reflect-set-onto-dom-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCStatsResponseidl">trunk/Source/WebCore/Modules/mediastream/RTCStatsResponse.idl</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsIDLTypesh">trunk/Source/WebCore/bindings/IDLTypes.h</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSBindingsAllInOnecpp">trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMStringMapCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMStringMapCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLCollectionCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLOptionsCollectionCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLSelectElementCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSStorageCustomcpp">trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsIDLAttributestxt">trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt</a></li>
<li><a href="#trunkSourceWebCorecssStyleSheetListcpp">trunk/Source/WebCore/css/StyleSheetList.cpp</a></li>
<li><a href="#trunkSourceWebCorecssStyleSheetListh">trunk/Source/WebCore/css/StyleSheetList.h</a></li>
<li><a href="#trunkSourceWebCorecssStyleSheetListidl">trunk/Source/WebCore/css/StyleSheetList.idl</a></li>
<li><a href="#trunkSourceWebCoredomDOMNamedFlowCollectionidl">trunk/Source/WebCore/dom/DOMNamedFlowCollection.idl</a></li>
<li><a href="#trunkSourceWebCoredomDOMStringMaph">trunk/Source/WebCore/dom/DOMStringMap.h</a></li>
<li><a href="#trunkSourceWebCoredomDOMStringMapidl">trunk/Source/WebCore/dom/DOMStringMap.idl</a></li>
<li><a href="#trunkSourceWebCoredomDatasetDOMStringMapcpp">trunk/Source/WebCore/dom/DatasetDOMStringMap.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDatasetDOMStringMaph">trunk/Source/WebCore/dom/DatasetDOMStringMap.h</a></li>
<li><a href="#trunkSourceWebCoredomNamedNodeMapidl">trunk/Source/WebCore/dom/NamedNodeMap.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAllCollectionidl">trunk/Source/WebCore/html/HTMLAllCollection.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLCollectionidl">trunk/Source/WebCore/html/HTMLCollection.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormControlsCollectionidl">trunk/Source/WebCore/html/HTMLFormControlsCollection.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormElementcpp">trunk/Source/WebCore/html/HTMLFormElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormElementh">trunk/Source/WebCore/html/HTMLFormElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFormElementidl">trunk/Source/WebCore/html/HTMLFormElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLSelectElementcpp">trunk/Source/WebCore/html/HTMLSelectElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLSelectElementh">trunk/Source/WebCore/html/HTMLSelectElement.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowidl">trunk/Source/WebCore/page/DOMWindow.idl</a></li>
<li><a href="#trunkSourceWebCorepluginsDOMMimeTypeArrayidl">trunk/Source/WebCore/plugins/DOMMimeTypeArray.idl</a></li>
<li><a href="#trunkSourceWebCorepluginsDOMPluginidl">trunk/Source/WebCore/plugins/DOMPlugin.idl</a></li>
<li><a href="#trunkSourceWebCorepluginsDOMPluginArrayidl">trunk/Source/WebCore/plugins/DOMPluginArray.idl</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMMimeTypeArrayCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMNamedFlowCollectionCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMNamedFlowCollectionCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMPluginArrayCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSDOMPluginCustomcpp">trunk/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLFormElementCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSNamedNodeMapCustomcpp">trunk/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSRTCStatsResponseCustomcpp">trunk/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSStyleSheetListCustomcpp">trunk/Source/WebCore/bindings/js/JSStyleSheetListCustom.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/LayoutTests/ChangeLog        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-01-12 Sam Weinig <sam@webkit.org>
+
+ [WebIDL] Autogenerate named getters
+ https://bugs.webkit.org/show_bug.cgi?id=166835
+
+ Reviewed by Alex Christensen.
+
+ * fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
+ * fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
+ * js/dom/reflect-set-onto-dom-expected.txt:
+ Update exception text.
+
</ins><span class="cx"> 2017-01-12 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Rebaseline inspector/dom/getAccessibilityPropertiesForNode.html after r210605.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLSelectElementselectselectedIndexexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> PASS mySelect.options.length is 10
</span><span class="cx"> PASS mySelect.selectedIndex is -1
</span><span class="cx"> 19) trying to set an element that's not an option: select element
</span><del>-PASS mySelect.options[10] = mySelect; threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
</del><ins>+PASS mySelect.options[10] = mySelect; threw exception TypeError: Type error.
</ins><span class="cx"> PASS mySelect.options.length is 10
</span><span class="cx"> PASS mySelect.selectedIndex is -1
</span><span class="cx"> 20) trying to set a option element using an invalid index: negative infinity
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLSelectElementselectselectedIndexmultipleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> PASS mySelect.options.length is 10
</span><span class="cx"> PASS mySelect.selectedIndex is 0
</span><span class="cx"> 19) trying to set an element that's not an option: select element
</span><del>-PASS mySelect.options[10] = mySelect; threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
</del><ins>+PASS mySelect.options[10] = mySelect; threw exception TypeError: Type error.
</ins><span class="cx"> PASS mySelect.options.length is 10
</span><span class="cx"> PASS mySelect.selectedIndex is 0
</span><span class="cx"> 20) trying to set a option element using an invalid index: negative infinity
</span></span></pre></div>
<a id="trunkLayoutTestsjsdomreflectsetontodomexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/dom/reflect-set-onto-dom-expected.txt (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/dom/reflect-set-onto-dom-expected.txt        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/LayoutTests/js/dom/reflect-set-onto-dom-expected.txt        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -110,7 +110,7 @@
</span><span class="cx"> PASS Reflect.get(select, "length") is 42
</span><span class="cx"> PASS Reflect.set(select, 44, option2) is true
</span><span class="cx"> PASS Reflect.get(select, 44).value is "kilimanjaro"
</span><del>-PASS Reflect.set(select, 20, "Kilimanjaro") threw exception TypeMismatchError (DOM Exception 17): The type of an object was incompatible with the expected type of the parameter associated to the object..
</del><ins>+PASS Reflect.set(select, 20, "Kilimanjaro") threw exception TypeError: Type error.
</ins><span class="cx"> CustomIndexedSetter ignores the receiver. These methods only work with ::put (not ::defineOwnProperty). So they behave as the special setter, we should not fallback to the OrdinarySet.
</span><span class="cx"> PASS Reflect.set(select, 0, option3, receiver) is true
</span><span class="cx"> PASS Reflect.get(receiver, 0) is undefined
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -1101,10 +1101,6 @@
</span><span class="cx"> bindings/js/JSDOMBinding.cpp
</span><span class="cx"> bindings/js/JSDOMGlobalObject.cpp
</span><span class="cx"> bindings/js/JSDOMGlobalObjectTask.cpp
</span><del>- bindings/js/JSDOMMimeTypeArrayCustom.cpp
- bindings/js/JSDOMNamedFlowCollectionCustom.cpp
- bindings/js/JSDOMPluginArrayCustom.cpp
- bindings/js/JSDOMPluginCustom.cpp
</del><span class="cx"> bindings/js/JSDOMPromise.cpp
</span><span class="cx"> bindings/js/JSDOMStringMapCustom.cpp
</span><span class="cx"> bindings/js/JSDOMWindowBase.cpp
</span><span class="lines">@@ -1130,7 +1126,6 @@
</span><span class="cx"> bindings/js/JSHTMLElementCustom.cpp
</span><span class="cx"> bindings/js/JSHTMLEmbedElementCustom.cpp
</span><span class="cx"> bindings/js/JSHTMLFormControlsCollectionCustom.cpp
</span><del>- bindings/js/JSHTMLFormElementCustom.cpp
</del><span class="cx"> bindings/js/JSHTMLFrameElementCustom.cpp
</span><span class="cx"> bindings/js/JSHTMLFrameSetElementCustom.cpp
</span><span class="cx"> bindings/js/JSHTMLInputElementCustom.cpp
</span><span class="lines">@@ -1156,7 +1151,6 @@
</span><span class="cx"> bindings/js/JSMessagePortCustom.cpp
</span><span class="cx"> bindings/js/JSMutationCallback.cpp
</span><span class="cx"> bindings/js/JSMutationObserverCustom.cpp
</span><del>- bindings/js/JSNamedNodeMapCustom.cpp
</del><span class="cx"> bindings/js/JSNodeCustom.cpp
</span><span class="cx"> bindings/js/JSNodeFilterCustom.cpp
</span><span class="cx"> bindings/js/JSNodeIteratorCustom.cpp
</span><span class="lines">@@ -1166,12 +1160,10 @@
</span><span class="cx"> bindings/js/JSPopStateEventCustom.cpp
</span><span class="cx"> bindings/js/JSReadableStreamPrivateConstructors.cpp
</span><span class="cx"> bindings/js/JSReadableStreamSourceCustom.cpp
</span><del>- bindings/js/JSRTCStatsResponseCustom.cpp
</del><span class="cx"> bindings/js/JSSQLStatementErrorCallbackCustom.cpp
</span><span class="cx"> bindings/js/JSSVGPathSegCustom.cpp
</span><span class="cx"> bindings/js/JSStorageCustom.cpp
</span><span class="cx"> bindings/js/JSStyleSheetCustom.cpp
</span><del>- bindings/js/JSStyleSheetListCustom.cpp
</del><span class="cx"> bindings/js/JSSubtleCryptoCustom.cpp
</span><span class="cx"> bindings/js/JSTextCustom.cpp
</span><span class="cx"> bindings/js/JSTextTrackCueCustom.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/ChangeLog        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -1,3 +1,168 @@
</span><ins>+2017-01-12 Sam Weinig <sam@webkit.org>
+
+ [WebIDL] Autogenerate named getters
+ https://bugs.webkit.org/show_bug.cgi?id=166835
+
+ Reviewed by Alex Christensen.
+
+ * Modules/mediastream/RTCStatsResponse.idl:
+ Update type to be nullable, since generator expects that for now.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSCustomSQLStatementErrorCallback.cpp: Removed.
+ * bindings/js/JSDOMMimeTypeArrayCustom.cpp: Removed.
+ * bindings/js/JSDOMNamedFlowCollectionCustom.cpp: Removed.
+ * bindings/js/JSDOMPluginArrayCustom.cpp: Removed.
+ * bindings/js/JSDOMPluginCustom.cpp: Removed.
+ * bindings/js/JSNamedNodeMapCustom.cpp: Removed.
+ * bindings/js/JSRTCStatsResponseCustom.cpp: Removed.
+ * bindings/js/JSStyleSheetListCustom.cpp: Removed.
+ Remove deleted files.
+
+ * bindings/js/JSSQLStatementErrorCallbackCustom.cpp:
+ Renamed from Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp for consistency.
+
+ * bindings/IDLTypes.h:
+ (WebCore::IDLNullable::nullValue):
+ (WebCore::IDLNullable::isNullValue):
+ (WebCore::IDLNullable::extractValueFromNullable):
+ Add Nullable traits for IDLNullable, that call down to the underlying type. This allows
+ us to more easily tests for nullability without stripping the IDLNullable off.
+
+ * bindings/js/JSDOMStringMapCustom.cpp:
+ (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate): Deleted.
+ (WebCore::JSDOMStringMap::getOwnPropertyNames): Deleted.
+ Remove overriden getOwnPropertySlot and getOwnPropertyNames.
+
+ * bindings/js/JSHTMLCollectionCustom.cpp:
+ (WebCore::JSHTMLCollection::nameGetter): Deleted.
+ * bindings/js/JSHTMLFormElementCustom.cpp:
+ (WebCore::JSHTMLFormElement::nameGetter): Deleted.
+ * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
+ (WebCore::JSHTMLOptionsCollection::nameGetter): Deleted.
+ * bindings/js/JSStorageCustom.cpp:
+ (WebCore::JSStorage::nameGetter): Deleted.
+ Remove custom name getters.
+
+ * bindings/js/JSHTMLSelectElementCustom.cpp:
+ (WebCore::selectElementIndexSetter):
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::setItem):
+ (WebCore::HTMLSelectElement::setLength):
+ (WebCore::HTMLSelectElement::setOption): Deleted.
+ * html/HTMLSelectElement.h:
+ Add implementation of HTMLSelectElement::setItem() that does properly
+ removes if the option is null. Re-implement selectElementIndexSetter to
+ use it and switch conversion code to use JSDOMConvert.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateIndexedGetter):
+ (GenerateNamedGetter):
+ Extract typed getter generation into their own functions.
+
+ (GenerateGetOwnPropertySlotBody):
+ (GenerateGetOwnPropertySlotBodyByIndex):
+ Extract getOwnPropertySlotBody / getOwnPropertySlotBodyByIndex generation
+ into their own functions. Add support for generating name getters.
+
+ (GenerateGetOwnPropertyNames):
+ Extract getOwnPropertyNames generation into its own function, adding support
+ for respecting the LegacyUnenumerableNamedProperties attribute and switching
+ the default to not include named properties in the enumerated names.
+
+ (GeneratePut):
+ (GeneratePutByIndex):
+ Extract put / putByIndex generators into their own functions in preparation
+ of supporting namedSetters in the future.
+
+ (GetIndexedSetterFunction):
+ (GetNamedSetterFunction):
+ (GetNamedDeleterFunction):
+ Add helper getter functions to extract named/index setter/deleters.
+
+ (InstanceOverridesPut):
+ Add helper predicate to determine if an interface needs an implementation
+ of put.
+
+ (GenerateHeader):
+ Place custom helper functions (e.g. nameGetter/putDelegate/etc.) together
+ in the generated header.
+
+ (GenerateImplementation):
+ (GenerateCallbackImplementationContent):
+ Replace inline generation with calls to the new helper generator functions.
+
+ (NativeToJSValueUsingReferences):
+ (NativeToJSValueUsingPointers):
+ (NativeToJSValue):
+ Remove unused inFunctionCall parameter, and add new suppressExceptionCheck
+ parameter, which is used for nameGetters.
+
+ * bindings/scripts/IDLAttributes.txt:
+ Add LegacyUnenumerableNamedProperties.
+
+ * css/StyleSheetList.cpp:
+ (WebCore::StyleSheetList::namedItem):
+ (WebCore::StyleSheetList::getNamedItem): Deleted.
+ * css/StyleSheetList.h:
+ * css/StyleSheetList.idl:
+ Rename getNamedItem to namedItem, and make it return a CSSStyleSheet*
+ which is what the bindings specify.
+
+ * dom/DOMNamedFlowCollection.idl:
+ Add LegacyUnenumerableNamedProperties to match existing behavior.
+
+ * dom/DOMStringMap.h:
+ Switch from typedef to type alias.
+
+ * dom/DOMStringMap.idl:
+ Remove CustomEnumerateProperty and JSCustomGetOwnPropertySlotAndDescriptor
+ and add the getter. Also add the missing setter and deleter commented out.
+
+ * dom/DatasetDOMStringMap.h:
+ * dom/DatasetDOMStringMap.cpp:
+ (WebCore::DatasetDOMStringMap::supportedPropertyNames):
+ (WebCore::DatasetDOMStringMap::names): Deleted.
+ Rename names to supportedPropertyNames to support the bindings.
+
+ (WebCore::DatasetDOMStringMap::item):
+ (WebCore::DatasetDOMStringMap::namedItem):
+ Add namedItems (to support the bindings), and rework item to return
+ an optional rather than using a bool out parameter.
+
+ * dom/NamedNodeMap.idl:
+ Add LegacyUnenumerableNamedProperties matching the spec.
+
+ * html/HTMLAllCollection.idl:
+ Add CustomNamedGetter and LegacyUnenumerableNamedProperties. Update signatures
+ to match the spec. Commenting out ones not implemented yet.
+
+ * html/HTMLCollection.idl:
+ Add LegacyUnenumerableNamedProperties matching the spec.
+
+ * html/HTMLFormControlsCollection.idl:
+ Add CustomNamedGetter. Update signature of the getter to match the spec.
+ The reason this can't be generated yet is that we don't have a good strategy
+ for functions with differing return types that shadow each other.
+
+ * html/HTMLFormElement.h:
+ * html/HTMLFormElement.cpp:
+ (WebCore::HTMLFormElement::namedItem):
+ (WebCore::HTMLFormElement::supportedPropertyNames):
+ Add implementation of namedItem and stub of supportedPropertyNames.
+
+ * html/HTMLFormElement.idl:
+ Add LegacyUnenumerableNamedProperties and remove CustomNamedGetter. Update
+ the signatures to match the spec.
+
+ * page/DOMWindow.idl:
+ Add LegacyUnenumerableNamedProperties matching the spec.
+
+ * plugins/DOMMimeTypeArray.idl:
+ * plugins/DOMPlugin.idl:
+ * plugins/DOMPluginArray.idl:
+ Add LegacyUnenumerableNamedProperties and add nullability to return types.
+
</ins><span class="cx"> 2017-01-12 Said Abou-Hallawa <sabouhallawa@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS][WK1] Fix initialization of CADisplayLink::preferredFramesPerSecond
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCStatsResponseidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCStatsResponse.idl (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCStatsResponse.idl        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/Modules/mediastream/RTCStatsResponse.idl        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -27,5 +27,5 @@
</span><span class="cx"> Conditional=WEB_RTC,
</span><span class="cx"> ] interface RTCStatsResponse {
</span><span class="cx"> sequence<RTCStatsReport> result();
</span><del>- getter RTCStatsReport namedItem(DOMString name);
</del><ins>+ getter RTCStatsReport? namedItem(DOMString name);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -286,7 +286,6 @@
</span><span class="cx">                 07D6A4F31BED5F8800174146 /* MockRealtimeAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07D6A4F11BED5F8800174146 /* MockRealtimeAudioSource.cpp */; };
</span><span class="cx">                 07D6A4F41BED5F8800174146 /* MockRealtimeAudioSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 07D6A4F21BED5F8800174146 /* MockRealtimeAudioSource.h */; };
</span><span class="cx">                 07D6A4F81BF2307D00174146 /* AudioTrackPrivateMediaStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 07D6A4F61BF2307D00174146 /* AudioTrackPrivateMediaStream.h */; };
</span><del>-                07DC5FD417D3EEE90099F890 /* JSRTCStatsResponseCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07DC5FD317D3EEE90099F890 /* JSRTCStatsResponseCustom.cpp */; };
</del><span class="cx">                 07E116B11489C9A100EC5ACE /* JSTextTrackCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07E116B01489C9A100EC5ACE /* JSTextTrackCustom.cpp */; };
</span><span class="cx">                 07E117071489EBEB00EC5ACE /* JSTextTrackCueCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07E117061489EBEB00EC5ACE /* JSTextTrackCueCustom.cpp */; };
</span><span class="cx">                 07E3DFD11A9E786500764CA8 /* MediaPlaybackTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 07E3DFD01A9E786500764CA8 /* MediaPlaybackTarget.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -1737,7 +1736,6 @@
</span><span class="cx">                 465307D01DB6EE4800E4137C /* JSUIEventInit.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E045EF1DAA104F00B0D8B9 /* JSUIEventInit.h */; };
</span><span class="cx">                 465307D11DB6EE4A00E4137C /* JSUIEventInit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83E045EE1DAA104F00B0D8B9 /* JSUIEventInit.cpp */; };
</span><span class="cx">                 465A8E791C8A24CE00E7D3E4 /* RuntimeApplicationChecks.mm in Sources */ = {isa = PBXBuildFile; fileRef = 465A8E781C8A24CE00E7D3E4 /* RuntimeApplicationChecks.mm */; };
</span><del>-                4669B2871B852A0B000F905F /* JSDOMNamedFlowCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46F2768E1B85297F005C2556 /* JSDOMNamedFlowCollectionCustom.cpp */; };
</del><span class="cx">                 4671E0651D67A59600C6B497 /* CanvasPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4671E0631D67A57B00C6B497 /* CanvasPath.cpp */; };
</span><span class="cx">                 4671E0661D67A59600C6B497 /* CanvasPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 4671E0641D67A57B00C6B497 /* CanvasPath.h */; };
</span><span class="cx">                 467302021C4EFE7800BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h in Headers */ = {isa = PBXBuildFile; fileRef = 467302011C4EFE6600BCB357 /* IgnoreOpensDuringUnloadCountIncrementer.h */; };
</span><span class="lines">@@ -4238,7 +4236,6 @@
</span><span class="cx">                 A84D827C11D333ED00972990 /* RawDataDocumentParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A84D827B11D333ED00972990 /* RawDataDocumentParser.h */; };
</span><span class="cx">                 A84D82C111D3474800972990 /* ScriptableDocumentParser.h in Headers */ = {isa = PBXBuildFile; fileRef = A84D82BF11D3474800972990 /* ScriptableDocumentParser.h */; };
</span><span class="cx">                 A84D82C211D3474800972990 /* ScriptableDocumentParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A84D82C011D3474800972990 /* ScriptableDocumentParser.cpp */; };
</span><del>-                A84EBD780CB8C89200079609 /* JSStyleSheetListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A84EBD770CB8C89200079609 /* JSStyleSheetListCustom.cpp */; };
</del><span class="cx">                 A84EBD830CB8C97700079609 /* JSStyleSheetList.h in Headers */ = {isa = PBXBuildFile; fileRef = A84EBD810CB8C97700079609 /* JSStyleSheetList.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A84EBD840CB8C97700079609 /* JSStyleSheetList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A84EBD820CB8C97700079609 /* JSStyleSheetList.cpp */; };
</span><span class="cx">                 A853123D11D0471B00D4D077 /* FragmentScriptingPermission.h in Headers */ = {isa = PBXBuildFile; fileRef = A853123C11D0471B00D4D077 /* FragmentScriptingPermission.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -4365,7 +4362,6 @@
</span><span class="cx">                 A8D05FA80A23B301005E7203 /* JSCSSRuleList.h in Headers */ = {isa = PBXBuildFile; fileRef = A8D05FA60A23B301005E7203 /* JSCSSRuleList.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A8D064FB0A23C0CC005E7203 /* JSHTMLFormElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8D064F90A23C0CC005E7203 /* JSHTMLFormElement.cpp */; };
</span><span class="cx">                 A8D064FC0A23C0CC005E7203 /* JSHTMLFormElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8D064FA0A23C0CC005E7203 /* JSHTMLFormElement.h */; };
</span><del>-                A8D065AE0A2446CD005E7203 /* JSHTMLFormElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8D065AD0A2446CD005E7203 /* JSHTMLFormElementCustom.cpp */; };
</del><span class="cx">                 A8D06B390A265DCD005E7203 /* HTMLNames.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = A8D06B370A265DCD005E7203 /* HTMLNames.h */; settings = {ATTRIBUTES = (); }; };
</span><span class="cx">                 A8D06B3A0A265DCD005E7203 /* HTMLNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8D06B380A265DCD005E7203 /* HTMLNames.cpp */; };
</span><span class="cx">                 A8D223FD16B52E4E00157288 /* HTMLResourcePreloader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8D223FB16B52E4E00157288 /* HTMLResourcePreloader.cpp */; };
</span><span class="lines">@@ -4452,9 +4448,6 @@
</span><span class="cx">                 A9C6E4F40D745E48006442E9 /* PluginData.h in Headers */ = {isa = PBXBuildFile; fileRef = A9C6E4F20D745E48006442E9 /* PluginData.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 A9C6E5A50D746458006442E9 /* Navigator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9C6E5A30D746458006442E9 /* Navigator.cpp */; };
</span><span class="cx">                 A9C6E5A60D746458006442E9 /* Navigator.h in Headers */ = {isa = PBXBuildFile; fileRef = A9C6E5A40D746458006442E9 /* Navigator.h */; };
</span><del>-                A9C6E6470D7465CA006442E9 /* JSDOMMimeTypeArrayCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9C6E6460D7465CA006442E9 /* JSDOMMimeTypeArrayCustom.cpp */; };
-                A9C6E64C0D7465E7006442E9 /* JSDOMPluginArrayCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9C6E64A0D7465E7006442E9 /* JSDOMPluginArrayCustom.cpp */; };
-                A9C6E64D0D7465E7006442E9 /* JSDOMPluginCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9C6E64B0D7465E7006442E9 /* JSDOMPluginCustom.cpp */; };
</del><span class="cx">                 A9D247F70D757E3400FDF959 /* JSNavigator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9D247F50D757E3300FDF959 /* JSNavigator.cpp */; };
</span><span class="cx">                 A9D247F80D757E3400FDF959 /* JSNavigator.h in Headers */ = {isa = PBXBuildFile; fileRef = A9D247F60D757E3300FDF959 /* JSNavigator.h */; };
</span><span class="cx">                 A9D247FE0D757E6900FDF959 /* JSDOMPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A9D247FA0D757E6900FDF959 /* JSDOMPlugin.cpp */; };
</span><span class="lines">@@ -5460,7 +5453,6 @@
</span><span class="cx">                 BCD41ABB0C060DE800C0E446 /* JSHTMLFrameSetElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD41ABA0C060DE800C0E446 /* JSHTMLFrameSetElementCustom.cpp */; };
</span><span class="cx">                 BCD533640ED6848900887468 /* CachedScriptSourceProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = BCD533630ED6848900887468 /* CachedScriptSourceProvider.h */; };
</span><span class="cx">                 BCD9C2620C17AA67005C90A2 /* JSDOMWindowCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C25E0C17AA67005C90A2 /* JSDOMWindowCustom.cpp */; };
</span><del>-                BCD9C2630C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C25F0C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp */; };
</del><span class="cx">                 BCD9C2640C17AA67005C90A2 /* JSNodeCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C2600C17AA67005C90A2 /* JSNodeCustom.cpp */; };
</span><span class="cx">                 BCD9C2650C17AA67005C90A2 /* JSNodeListCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C2610C17AA67005C90A2 /* JSNodeListCustom.cpp */; };
</span><span class="cx">                 BCD9C2C00C17B69E005C90A2 /* JSNamedNodeMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD9C2BC0C17B69E005C90A2 /* JSNamedNodeMap.cpp */; };
</span><span class="lines">@@ -7263,7 +7255,6 @@
</span><span class="cx">                 07D6A4F11BED5F8800174146 /* MockRealtimeAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MockRealtimeAudioSource.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 07D6A4F21BED5F8800174146 /* MockRealtimeAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MockRealtimeAudioSource.h; sourceTree = "<group>"; };
</span><span class="cx">                 07D6A4F61BF2307D00174146 /* AudioTrackPrivateMediaStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioTrackPrivateMediaStream.h; path = platform/mediastream/AudioTrackPrivateMediaStream.h; sourceTree = SOURCE_ROOT; };
</span><del>-                07DC5FD317D3EEE90099F890 /* JSRTCStatsResponseCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCStatsResponseCustom.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 07E116B01489C9A100EC5ACE /* JSTextTrackCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrackCustom.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 07E117061489EBEB00EC5ACE /* JSTextTrackCueCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrackCueCustom.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 07E3DFD01A9E786500764CA8 /* MediaPlaybackTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlaybackTarget.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -8947,7 +8938,6 @@
</span><span class="cx">                 46DFF4991DC261F900B80B48 /* JSShadowRootMode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSShadowRootMode.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 46DFF49A1DC261F900B80B48 /* JSShadowRootMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSShadowRootMode.h; sourceTree = "<group>"; };
</span><span class="cx">                 46EBEA011B7D4D5D00BE4941 /* CollectionTraversal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectionTraversal.h; sourceTree = "<group>"; };
</span><del>-                46F2768E1B85297F005C2556 /* JSDOMNamedFlowCollectionCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMNamedFlowCollectionCustom.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ANGLEWebKitBridge.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ANGLEWebKitBridge.h; sourceTree = "<group>"; };
</span><span class="cx">                 49291E4A134172C800E753DE /* ImageRenderingMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageRenderingMode.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -11944,7 +11934,6 @@
</span><span class="cx">                 A84D827B11D333ED00972990 /* RawDataDocumentParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RawDataDocumentParser.h; sourceTree = "<group>"; };
</span><span class="cx">                 A84D82BF11D3474800972990 /* ScriptableDocumentParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptableDocumentParser.h; sourceTree = "<group>"; };
</span><span class="cx">                 A84D82C011D3474800972990 /* ScriptableDocumentParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptableDocumentParser.cpp; sourceTree = "<group>"; };
</span><del>-                A84EBD770CB8C89200079609 /* JSStyleSheetListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStyleSheetListCustom.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 A84EBD810CB8C97700079609 /* JSStyleSheetList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSStyleSheetList.h; sourceTree = "<group>"; };
</span><span class="cx">                 A84EBD820CB8C97700079609 /* JSStyleSheetList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSStyleSheetList.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 A853123C11D0471B00D4D077 /* FragmentScriptingPermission.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FragmentScriptingPermission.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -12078,7 +12067,6 @@
</span><span class="cx">                 A8D064FA0A23C0CC005E7203 /* JSHTMLFormElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLFormElement.h; sourceTree = "<group>"; };
</span><span class="cx">                 A8D0651B0A23C1FE005E7203 /* CSSRuleList.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = CSSRuleList.idl; sourceTree = "<group>"; };
</span><span class="cx">                 A8D0651C0A23C1FE005E7203 /* DeprecatedCSSOMValueList.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = DeprecatedCSSOMValueList.idl; sourceTree = "<group>"; };
</span><del>-                A8D065AD0A2446CD005E7203 /* JSHTMLFormElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLFormElementCustom.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 A8D06B370A265DCD005E7203 /* HTMLNames.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLNames.h; sourceTree = "<group>"; };
</span><span class="cx">                 A8D06B380A265DCD005E7203 /* HTMLNames.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLNames.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 A8D223FB16B52E4E00157288 /* HTMLResourcePreloader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLResourcePreloader.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -12165,9 +12153,6 @@
</span><span class="cx">                 A9C6E4F20D745E48006442E9 /* PluginData.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PluginData.h; sourceTree = "<group>"; };
</span><span class="cx">                 A9C6E5A30D746458006442E9 /* Navigator.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Navigator.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 A9C6E5A40D746458006442E9 /* Navigator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Navigator.h; sourceTree = "<group>"; };
</span><del>-                A9C6E6460D7465CA006442E9 /* JSDOMMimeTypeArrayCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMMimeTypeArrayCustom.cpp; sourceTree = "<group>"; };
-                A9C6E64A0D7465E7006442E9 /* JSDOMPluginArrayCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMPluginArrayCustom.cpp; sourceTree = "<group>"; };
-                A9C6E64B0D7465E7006442E9 /* JSDOMPluginCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMPluginCustom.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 A9C6E65D0D746694006442E9 /* Navigator.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = Navigator.idl; sourceTree = "<group>"; };
</span><span class="cx">                 A9C6E65E0D7466F2006442E9 /* DOMMimeType.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = DOMMimeType.idl; sourceTree = "<group>"; };
</span><span class="cx">                 A9C6E65F0D746700006442E9 /* DOMMimeTypeArray.idl */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = DOMMimeTypeArray.idl; sourceTree = "<group>"; };
</span><span class="lines">@@ -13364,7 +13349,6 @@
</span><span class="cx">                 BCD41ABA0C060DE800C0E446 /* JSHTMLFrameSetElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLFrameSetElementCustom.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BCD533630ED6848900887468 /* CachedScriptSourceProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedScriptSourceProvider.h; sourceTree = "<group>"; };
</span><span class="cx">                 BCD9C25E0C17AA67005C90A2 /* JSDOMWindowCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMWindowCustom.cpp; sourceTree = "<group>"; };
</span><del>-                BCD9C25F0C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNamedNodeMapCustom.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 BCD9C2600C17AA67005C90A2 /* JSNodeCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeCustom.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BCD9C2610C17AA67005C90A2 /* JSNodeListCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeListCustom.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BCD9C2BC0C17B69E005C90A2 /* JSNamedNodeMap.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSNamedNodeMap.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -18344,6 +18328,7 @@
</span><span class="cx">                                 ADEC78F718EE5308001315C2 /* JSElementCustom.h */,
</span><span class="cx">                                 BCEFAF4D0C317E6900FA81F6 /* JSEventCustom.cpp */,
</span><span class="cx">                                 E34EE49F1DC2D57500EAA9D3 /* JSEventCustom.h */,
</span><ins>+                                BCCBAD3A0C18BFF800CE890F /* JSHTMLCollectionCustom.cpp */,
</ins><span class="cx">                                 512BDB4C1C46B0FF006494DF /* JSIDBCursorCustom.cpp */,
</span><span class="cx">                                 5141298D1C5FD7E90059E714 /* JSIDBCursorWithValueCustom.cpp */,
</span><span class="cx">                                 5141299A1C6C166D0059E714 /* JSIDBIndexCustom.cpp */,
</span><span class="lines">@@ -22116,10 +22101,6 @@
</span><span class="cx">                                 590E1B4A11E4EF700069F784 /* JSDeviceOrientationEventCustom.cpp */,
</span><span class="cx">                                 49C7BA8C1042F5B10009D447 /* JSDocumentCustom.cpp */,
</span><span class="cx">                                 ADDA94BF19686F8000453029 /* JSDocumentCustom.h */,
</span><del>-                                A9C6E6460D7465CA006442E9 /* JSDOMMimeTypeArrayCustom.cpp */,
-                                46F2768E1B85297F005C2556 /* JSDOMNamedFlowCollectionCustom.cpp */,
-                                A9C6E64A0D7465E7006442E9 /* JSDOMPluginArrayCustom.cpp */,
-                                A9C6E64B0D7465E7006442E9 /* JSDOMPluginCustom.cpp */,
</del><span class="cx">                                 BC64649B11D8238C006455B0 /* JSDOMStringMapCustom.cpp */,
</span><span class="cx">                                 BCD9C25E0C17AA67005C90A2 /* JSDOMWindowCustom.cpp */,
</span><span class="cx">                                 652FBBBB0DE27CB60001D386 /* JSDOMWindowCustom.h */,
</span><span class="lines">@@ -22129,12 +22110,10 @@
</span><span class="cx">                                 BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */,
</span><span class="cx">                                 BC4EDEF30C08F3FB007EDD49 /* JSHTMLAppletElementCustom.cpp */,
</span><span class="cx">                                 9392262C1032107B006E7D5D /* JSHTMLCanvasElementCustom.cpp */,
</span><del>-                                BCCBAD3A0C18BFF800CE890F /* JSHTMLCollectionCustom.cpp */,
</del><span class="cx">                                 BC51580A0C03D404008BB0EE /* JSHTMLDocumentCustom.cpp */,
</span><span class="cx">                                 BC5823F40C0A98DF0053F1B5 /* JSHTMLElementCustom.cpp */,
</span><span class="cx">                                 BC6D44BD0C07EFB60072D2C9 /* JSHTMLEmbedElementCustom.cpp */,
</span><span class="cx">                                 9B1AB07B1648C7C40051F3F2 /* JSHTMLFormControlsCollectionCustom.cpp */,
</span><del>-                                A8D065AD0A2446CD005E7203 /* JSHTMLFormElementCustom.cpp */,
</del><span class="cx">                                 BC2ED7A40C6C0F3600920BFF /* JSHTMLFrameElementCustom.cpp */,
</span><span class="cx">                                 BCD41ABA0C060DE800C0E446 /* JSHTMLFrameSetElementCustom.cpp */,
</span><span class="cx">                                 BCC438770E886CC700533DD5 /* JSHTMLInputElementCustom.cpp */,
</span><span class="lines">@@ -22150,15 +22129,12 @@
</span><span class="cx">                                 410B7E711045FAB000D8224F /* JSMessageEventCustom.cpp */,
</span><span class="cx">                                 A1E5B31D1AAD1DA4006EBEFB /* JSMockContentFilterSettingsCustom.cpp */,
</span><span class="cx">                                 C6F0917E143A2BB900685849 /* JSMutationObserverCustom.cpp */,
</span><del>-                                BCD9C25F0C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp */,
</del><span class="cx">                                 BCD9C2600C17AA67005C90A2 /* JSNodeCustom.cpp */,
</span><span class="cx">                                 BC9439C2116CF4940048C750 /* JSNodeCustom.h */,
</span><span class="cx">                                 83F1206A1B8C103600D75F63 /* JSNodeFilterCustom.cpp */,
</span><span class="cx">                                 A85F22081430377D007CC884 /* JSPopStateEventCustom.cpp */,
</span><span class="cx">                                 418C395D1C8F0AAB0051C8A3 /* JSReadableStreamSourceCustom.cpp */,
</span><del>-                                07DC5FD317D3EEE90099F890 /* JSRTCStatsResponseCustom.cpp */,
</del><span class="cx">                                 51D0C5150DAA90B7003B3831 /* JSStorageCustom.cpp */,
</span><del>-                                A84EBD770CB8C89200079609 /* JSStyleSheetListCustom.cpp */,
</del><span class="cx">                                 57A9C88D1DA70BF800BC7305 /* JSSubtleCryptoCustom.cpp */,
</span><span class="cx">                                 07E116B01489C9A100EC5ACE /* JSTextTrackCustom.cpp */,
</span><span class="cx">                                 7C73FB17191EF808007DE061 /* JSUserMessageHandlersNamespaceCustom.cpp */,
</span><span class="lines">@@ -29921,15 +29897,11 @@
</span><span class="cx">                                 4138F8571D253F08001CB61E /* JSDOMIterator.cpp in Sources */,
</span><span class="cx">                                 A9D248060D757E7D00FDF959 /* JSDOMMimeType.cpp in Sources */,
</span><span class="cx">                                 A9D248080D757E7D00FDF959 /* JSDOMMimeTypeArray.cpp in Sources */,
</span><del>-                                A9C6E6470D7465CA006442E9 /* JSDOMMimeTypeArrayCustom.cpp in Sources */,
</del><span class="cx">                                 52CCA9E215E3F62C0053C77F /* JSDOMNamedFlowCollection.cpp in Sources */,
</span><del>-                                4669B2871B852A0B000F905F /* JSDOMNamedFlowCollectionCustom.cpp in Sources */,
</del><span class="cx">                                 1ACE53DF0A8D18810022947D /* JSDOMParser.cpp in Sources */,
</span><span class="cx">                                 FB91392B16AE4FC0001FE682 /* JSDOMPath.cpp in Sources */,
</span><span class="cx">                                 A9D247FE0D757E6900FDF959 /* JSDOMPlugin.cpp in Sources */,
</span><span class="cx">                                 A9D248000D757E6900FDF959 /* JSDOMPluginArray.cpp in Sources */,
</span><del>-                                A9C6E64C0D7465E7006442E9 /* JSDOMPluginArrayCustom.cpp in Sources */,
-                                A9C6E64D0D7465E7006442E9 /* JSDOMPluginCustom.cpp in Sources */,
</del><span class="cx">                                 0F4966AA1DB40C4300A274BB /* JSDOMPoint.cpp in Sources */,
</span><span class="cx">                                 0F4966AC1DB40C4300A274BB /* JSDOMPointInit.cpp in Sources */,
</span><span class="cx">                                 0F4966AE1DB40C4300A274BB /* JSDOMPointReadOnly.cpp in Sources */,
</span><span class="lines">@@ -30028,7 +30000,6 @@
</span><span class="cx">                                 9BF9A8801648DD2F001C6B23 /* JSHTMLFormControlsCollection.cpp in Sources */,
</span><span class="cx">                                 9B1AB07C1648C7C40051F3F2 /* JSHTMLFormControlsCollectionCustom.cpp in Sources */,
</span><span class="cx">                                 A8D064FB0A23C0CC005E7203 /* JSHTMLFormElement.cpp in Sources */,
</span><del>-                                A8D065AE0A2446CD005E7203 /* JSHTMLFormElementCustom.cpp in Sources */,
</del><span class="cx">                                 BC4918C60BFEA050009D6316 /* JSHTMLFrameElement.cpp in Sources */,
</span><span class="cx">                                 BC2ED7A50C6C0F3600920BFF /* JSHTMLFrameElementCustom.cpp in Sources */,
</span><span class="cx">                                 BC926F800C0552470082776B /* JSHTMLFrameSetElement.cpp in Sources */,
</span><span class="lines">@@ -30166,7 +30137,6 @@
</span><span class="cx">                                 C6F0917F143A2BB900685849 /* JSMutationObserverCustom.cpp in Sources */,
</span><span class="cx">                                 C6F08FC91431000D00685849 /* JSMutationRecord.cpp in Sources */,
</span><span class="cx">                                 BCD9C2C00C17B69E005C90A2 /* JSNamedNodeMap.cpp in Sources */,
</span><del>-                                BCD9C2630C17AA67005C90A2 /* JSNamedNodeMapCustom.cpp in Sources */,
</del><span class="cx">                                 A9D247F70D757E3400FDF959 /* JSNavigator.cpp in Sources */,
</span><span class="cx">                                 073BE34017D17E01002BD431 /* JSNavigatorUserMedia.cpp in Sources */,
</span><span class="cx">                                 14DC0D3709FED073007B0235 /* JSNode.cpp in Sources */,
</span><span class="lines">@@ -30244,7 +30214,6 @@
</span><span class="cx">                                 07969DBB17D14151007FF842 /* JSRTCSessionDescription.cpp in Sources */,
</span><span class="cx">                                 07969DC117D14151007FF842 /* JSRTCStatsReport.cpp in Sources */,
</span><span class="cx">                                 07969DC317D14151007FF842 /* JSRTCStatsResponse.cpp in Sources */,
</span><del>-                                07DC5FD417D3EEE90099F890 /* JSRTCStatsResponseCustom.cpp in Sources */,
</del><span class="cx">                                 5E2C436B1BCF071E0001E2BC /* JSRTCTrackEvent.cpp in Sources */,
</span><span class="cx">                                 BCEC01C20C274DDD009F4EC9 /* JSScreen.cpp in Sources */,
</span><span class="cx">                                 FDA15ECD12B03F61003A583A /* JSScriptProcessorNode.cpp in Sources */,
</span><span class="lines">@@ -30275,7 +30244,6 @@
</span><span class="cx">                                 BCE0139A0C0BEF180043860A /* JSStyleSheet.cpp in Sources */,
</span><span class="cx">                                 BC98A27D0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp in Sources */,
</span><span class="cx">                                 A84EBD840CB8C97700079609 /* JSStyleSheetList.cpp in Sources */,
</span><del>-                                A84EBD780CB8C89200079609 /* JSStyleSheetListCustom.cpp in Sources */,
</del><span class="cx">                                 571F218B1DA57C7B005C9EFD /* JSSubtleCrypto.cpp in Sources */,
</span><span class="cx">                                 57A9C88E1DA70BF800BC7305 /* JSSubtleCryptoCustom.cpp in Sources */,
</span><span class="cx">                                 B20111070AB7740500DB0E68 /* JSSVGAElement.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsIDLTypesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/IDLTypes.h (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/IDLTypes.h        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/IDLTypes.h        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -137,6 +137,11 @@
</span><span class="cx">
</span><span class="cx"> template<typename T> struct IDLNullable : IDLType<typename T::NullableType> {
</span><span class="cx"> using InnerType = T;
</span><ins>+
+ using NullableType = typename T::NullableType;
+ static inline decltype(T::nullValue()) nullValue() { return T::nullValue(); }
+ template<typename U> static inline bool isNullValue(U&& value) { return T::isNullValue(std::forward<U>(value)); }
+ template<typename U> static inline U&& extractValueFromNullable(U&& value) { return T::extractValueFromNullable(std::forward<U>(value)); }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template<typename T> struct IDLSequence : IDLType<Vector<typename T::ImplementationType>> {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSBindingsAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -49,10 +49,6 @@
</span><span class="cx"> #include "JSDOMBinding.cpp"
</span><span class="cx"> #include "JSDOMGlobalObject.cpp"
</span><span class="cx"> #include "JSDOMGlobalObjectTask.cpp"
</span><del>-#include "JSDOMMimeTypeArrayCustom.cpp"
-#include "JSDOMNamedFlowCollectionCustom.cpp"
-#include "JSDOMPluginArrayCustom.cpp"
-#include "JSDOMPluginCustom.cpp"
</del><span class="cx"> #include "JSDOMPromise.cpp"
</span><span class="cx"> #include "JSDOMStringMapCustom.cpp"
</span><span class="cx"> #include "JSDOMWindowBase.cpp"
</span><span class="lines">@@ -77,7 +73,6 @@
</span><span class="cx"> #include "JSHTMLElementCustom.cpp"
</span><span class="cx"> #include "JSHTMLEmbedElementCustom.cpp"
</span><span class="cx"> #include "JSHTMLFormControlsCollectionCustom.cpp"
</span><del>-#include "JSHTMLFormElementCustom.cpp"
</del><span class="cx"> #include "JSHTMLFrameElementCustom.cpp"
</span><span class="cx"> #include "JSHTMLFrameSetElementCustom.cpp"
</span><span class="cx"> #include "JSHTMLInputElementCustom.cpp"
</span><span class="lines">@@ -97,7 +92,6 @@
</span><span class="cx"> #include "JSMessagePortCustom.cpp"
</span><span class="cx"> #include "JSMutationCallback.cpp"
</span><span class="cx"> #include "JSMutationObserverCustom.cpp"
</span><del>-#include "JSNamedNodeMapCustom.cpp"
</del><span class="cx"> #include "JSNodeCustom.cpp"
</span><span class="cx"> #include "JSNodeFilterCustom.cpp"
</span><span class="cx"> #include "JSNodeIteratorCustom.cpp"
</span><span class="lines">@@ -108,7 +102,6 @@
</span><span class="cx"> #include "JSSVGPathSegCustom.cpp"
</span><span class="cx"> #include "JSStorageCustom.cpp"
</span><span class="cx"> #include "JSStyleSheetCustom.cpp"
</span><del>-#include "JSStyleSheetListCustom.cpp"
</del><span class="cx"> #include "JSTextCustom.cpp"
</span><span class="cx"> #include "JSTextTrackCueCustom.cpp"
</span><span class="cx"> #include "JSTextTrackCustom.cpp"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMMimeTypeArrayCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSDOMMimeTypeArrayCustom.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -1,42 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
- * Copyright (C) 2008 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-#include "JSDOMMimeTypeArray.h"
-
-#include "DOMMimeTypeArray.h"
-#include "JSDOMBinding.h"
-#include "JSDOMMimeType.h"
-#include <wtf/text/AtomicString.h>
-
-namespace WebCore {
-
-using namespace JSC;
-
-bool JSDOMMimeTypeArray::nameGetter(ExecState* exec, PropertyName propertyName, JSValue& value)
-{
- auto item = wrapped().namedItem(propertyNameToAtomicString(propertyName));
- if (!item)
- return false;
-
- value = toJS(exec, globalObject(), *item);
- return true;
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMNamedFlowCollectionCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSDOMNamedFlowCollectionCustom.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMNamedFlowCollectionCustom.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSDOMNamedFlowCollectionCustom.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -1,51 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "JSDOMNamedFlowCollection.h"
-
-#if ENABLE(CSS_REGIONS)
-
-#include "DOMNamedFlowCollection.h"
-#include "JSDOMBinding.h"
-#include "JSWebKitNamedFlow.h"
-
-namespace WebCore {
-
-using namespace JSC;
-
-bool JSDOMNamedFlowCollection::nameGetter(ExecState* exec, PropertyName propertyName, JSValue& value)
-{
- auto item = wrapped().namedItem(propertyNameToAtomicString(propertyName));
- if (!item)
- return false;
-
- value = toJS(exec, globalObject(), *item);
- return true;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(CSS_REGIONS)
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMPluginArrayCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSDOMPluginArrayCustom.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -1,42 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
- * Copyright (C) 2008 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-#include "JSDOMPluginArray.h"
-
-#include "DOMPluginArray.h"
-#include "JSDOMBinding.h"
-#include "JSDOMPlugin.h"
-#include <wtf/text/AtomicString.h>
-
-namespace WebCore {
-
-using namespace JSC;
-
-bool JSDOMPluginArray::nameGetter(ExecState* exec, PropertyName propertyName, JSValue& value)
-{
- auto item = wrapped().namedItem(propertyNameToAtomicString(propertyName));
- if (!item)
- return false;
-
- value = toJS(exec, globalObject(), *item);
- return true;
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMPluginCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSDOMPluginCustom.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -1,40 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-#include "JSDOMPlugin.h"
-
-#include "JSDOMBinding.h"
-#include "JSDOMMimeType.h"
-#include <wtf/text/AtomicString.h>
-
-namespace WebCore {
-
-using namespace JSC;
-
-bool JSDOMPlugin::nameGetter(ExecState* exec, PropertyName propertyName, JSValue& value)
-{
- auto item = wrapped().namedItem(propertyNameToAtomicString(propertyName));
- if (!item)
- return false;
-
- value = toJS(exec, globalObject(), *item);
- return true;
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSDOMStringMapCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSDOMStringMapCustom.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSDOMStringMapCustom.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSDOMStringMapCustom.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -37,26 +37,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-bool JSDOMStringMap::getOwnPropertySlotDelegate(ExecState* state, PropertyName propertyName, PropertySlot& slot)
-{
- if (propertyName.isSymbol())
- return false;
- bool nameIsValid;
- const AtomicString& item = wrapped().item(propertyNameToString(propertyName), nameIsValid);
- if (nameIsValid) {
- slot.setValue(this, 0, toJS<IDLDOMString>(*state, item));
- return true;
- }
- return false;
-}
-
-void JSDOMStringMap::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
-{
- for (auto& name : jsCast<JSDOMStringMap*>(object)->wrapped().names())
- propertyNames.add(Identifier::fromString(state, name));
- Base::getOwnPropertyNames(object, state, propertyNames, mode);
-}
-
</del><span class="cx"> bool JSDOMStringMap::deleteProperty(JSCell* cell, ExecState* state, PropertyName propertyName)
</span><span class="cx"> {
</span><span class="cx"> CustomElementReactionStack customElementReactionStack;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLCollectionCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSHTMLCollectionCustom.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -20,38 +20,15 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "JSHTMLCollection.h"
</span><span class="cx">
</span><del>-#include "HTMLAllCollection.h"
-#include "HTMLCollection.h"
-#include "HTMLFormControlsCollection.h"
-#include "HTMLOptionsCollection.h"
</del><span class="cx"> #include "JSDOMBinding.h"
</span><span class="cx"> #include "JSHTMLAllCollection.h"
</span><span class="cx"> #include "JSHTMLFormControlsCollection.h"
</span><span class="cx"> #include "JSHTMLOptionsCollection.h"
</span><del>-#include "JSNode.h"
-#include "JSNodeList.h"
-#include "JSRadioNodeList.h"
-#include "Node.h"
-#include "RadioNodeList.h"
-#include <wtf/text/AtomicString.h>
</del><span class="cx">
</span><span class="cx"> using namespace JSC;
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-bool JSHTMLCollection::nameGetter(ExecState* exec, PropertyName propertyName, JSValue& value)
-{
- ASSERT_WITH_MESSAGE(wrapped().type() != FormControls, "Should call the subclass' nameGetter");
- ASSERT_WITH_MESSAGE(wrapped().type() != SelectOptions, "Should call the subclass' nameGetter");
-
- auto item = wrapped().namedItem(propertyNameToAtomicString(propertyName));
- if (!item)
- return false;
-
- value = toJS(exec, globalObject(), *item);
- return true;
-}
-
</del><span class="cx"> JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref<HTMLCollection>&& collection)
</span><span class="cx"> {
</span><span class="cx"> switch (collection->type()) {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLFormElementCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSHTMLFormElementCustom.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -1,54 +0,0 @@
</span><del>-/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "JSHTMLFormElement.h"
-
-#include "Frame.h"
-#include "HTMLCollection.h"
-#include "HTMLFormElement.h"
-#include "JSDOMWindowCustom.h"
-#include "JSRadioNodeList.h"
-
-using namespace JSC;
-
-namespace WebCore {
-
-bool JSHTMLFormElement::nameGetter(ExecState* exec, PropertyName propertyName, JSValue& value)
-{
- Vector<Ref<Element>> namedItems = wrapped().namedElements(propertyNameToAtomicString(propertyName));
-
- if (namedItems.isEmpty())
- return false;
- if (namedItems.size() == 1) {
- value = toJS(exec, globalObject(), namedItems[0]);
- return true;
- }
-
- value = toJS(exec, globalObject(), wrapped().radioNodeList(propertyNameToAtomicString(propertyName)).get());
- return true;
-}
-
-}
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLOptionsCollectionCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -22,16 +22,9 @@
</span><span class="cx">
</span><span class="cx"> #include "CustomElementReactionQueue.h"
</span><span class="cx"> #include "ExceptionCode.h"
</span><del>-#include "HTMLNames.h"
-#include "HTMLOptionElement.h"
-#include "HTMLOptionsCollection.h"
-#include "HTMLSelectElement.h"
</del><span class="cx"> #include "JSHTMLOptionElement.h"
</span><span class="cx"> #include "JSHTMLSelectElement.h"
</span><span class="cx"> #include "JSHTMLSelectElementCustom.h"
</span><del>-#include "JSNodeList.h"
-#include "StaticNodeList.h"
-
</del><span class="cx"> #include <wtf/MathExtras.h>
</span><span class="cx">
</span><span class="cx"> using namespace JSC;
</span><span class="lines">@@ -38,16 +31,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-bool JSHTMLOptionsCollection::nameGetter(ExecState* exec, PropertyName propertyName, JSValue& value)
-{
- auto item = wrapped().namedItem(propertyNameToAtomicString(propertyName));
- if (!item)
- return false;
-
- value = toJS(exec, globalObject(), *item);
- return true;
-}
-
</del><span class="cx"> void JSHTMLOptionsCollection::setLength(ExecState& state, JSValue value)
</span><span class="cx"> {
</span><span class="cx"> CustomElementReactionStack customElementReactionStack;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLSelectElementCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSHTMLSelectElementCustom.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -39,18 +39,10 @@
</span><span class="cx"> VM& vm = state.vm();
</span><span class="cx"> auto throwScope = DECLARE_THROW_SCOPE(vm);
</span><span class="cx">
</span><del>- if (value.isUndefinedOrNull()) {
- element.remove(index);
- return;
- }
</del><ins>+ auto* option = convert<IDLNullable<IDLInterface<HTMLOptionElement>>>(state, value);
+ RETURN_IF_EXCEPTION(throwScope, void());
</ins><span class="cx">
</span><del>- auto* option = JSHTMLOptionElement::toWrapped(value);
- if (!option) {
- throwTypeMismatchError(state, throwScope);
- return;
- }
-
- propagateException(state, throwScope, element.setOption(index, *option));
</del><ins>+ propagateException(state, throwScope, element.setItem(index, option));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void JSHTMLSelectElement::indexSetter(JSC::ExecState* state, unsigned index, JSC::JSValue value)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSNamedNodeMapCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -1,46 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2008, 2009, 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "JSNamedNodeMap.h"
-
-#include "Attr.h"
-#include "JSAttr.h"
-#include "NamedNodeMap.h"
-
-using namespace JSC;
-
-namespace WebCore {
-
-bool JSNamedNodeMap::nameGetter(ExecState* exec, PropertyName propertyName, JSValue& value)
-{
- auto item = wrapped().getNamedItem(propertyNameToAtomicString(propertyName));
- if (!item)
- return false;
- value = toJS(exec, globalObject(), *item);
- return true;
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSRTCStatsResponseCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSRTCStatsResponseCustom.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -1,51 +0,0 @@
</span><del>-/*
- * Copyright (C) Research In Motion Limited 2013. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if ENABLE(WEB_RTC)
-#include "JSRTCStatsResponse.h"
-
-#include "JSDOMBinding.h"
-#include "JSRTCStatsReport.h"
-#include <wtf/text/AtomicString.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-bool JSRTCStatsResponse::nameGetter(ExecState* exec, PropertyName propertyName, JSValue& value)
-{
- auto item = wrapped().namedItem(propertyNameToAtomicString(propertyName));
- if (!item)
- return false;
-
- value = toJS(exec, globalObject(), *item);
- return true;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(WEB_RTC)
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSStorageCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -35,27 +35,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-bool JSStorage::nameGetter(ExecState* state, PropertyName propertyName, JSValue& value)
-{
- if (propertyName.isSymbol())
- return false;
-
- auto item = wrapped().getItem(propertyNameToString(propertyName));
- if (item.hasException()) {
- auto& vm = state->vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
- propagateException(*state, scope, item.releaseException());
- return false;
- }
-
- auto string = item.releaseReturnValue();
- if (string.isNull())
- return false;
-
- value = jsStringWithCache(state, string);
- return true;
-}
-
</del><span class="cx"> bool JSStorage::deleteProperty(JSCell* cell, ExecState* state, PropertyName propertyName)
</span><span class="cx"> {
</span><span class="cx"> auto& thisObject = *jsCast<JSStorage*>(cell);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSStyleSheetListCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSStyleSheetListCustom.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSStyleSheetListCustom.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/js/JSStyleSheetListCustom.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -1,51 +0,0 @@
</span><del>-/*
- * Copyright (C) 2007, 2009 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "JSStyleSheetList.h"
-
-#include "HTMLStyleElement.h"
-#include "JSStyleSheet.h"
-#include "StyleSheet.h"
-#include "StyleSheetList.h"
-
-using namespace JSC;
-
-namespace WebCore {
-
-bool JSStyleSheetList::nameGetter(ExecState* exec, PropertyName propertyName, JSValue& value)
-{
- if (propertyName.isSymbol())
- return false;
-
- auto* item = wrapped().getNamedItem(propertyNameToString(propertyName));
- if (!item)
- return false;
-
- value = toJS(exec, globalObject(), item->sheet());
- return true;
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -381,19 +381,80 @@
</span><span class="cx"> return IsDOMGlobalObject($interface);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub GenerateIndexedGetter
+{
+ my ($interface, $indexedGetterFunction) = @_;
+
+ my @output = ();
+
+ my @attributes = ();
+ push(@attributes, "ReadOnly") if !$interface->extendedAttributes->{CustomNamedSetter};
+
+ my $attributeString = ((@attributes > 0) ? join(" | ", @attributes) : "0");
+
+ my $indexedGetterFunctionName = $indexedGetterFunction->name || "item";
+ my $nativeToJSConversion = NativeToJSValueUsingPointers($indexedGetterFunction, $interface, "thisObject->wrapped().${indexedGetterFunctionName}(index)", "thisObject");
+
+ push(@output, " slot.setValue(thisObject, ${attributeString}, ${nativeToJSConversion});\n");
+ push(@output, " return true;\n");
+
+ return @output;
+}
+
+sub GenerateNamedGetter
+{
+ my ($interface, $namedGetterFunction) = @_;
+
+ my @output = ();
+
+ my @attributes = ();
+ push(@attributes, "ReadOnly") if !$interface->extendedAttributes->{CustomNamedSetter};
+ push(@attributes, "DontEnum") if $interface->extendedAttributes->{LegacyUnenumerableNamedProperties};
+
+ my $attributeString = ((@attributes > 0) ? join(" | ", @attributes) : "0");
+
+ if ($interface->extendedAttributes->{CustomNamedGetter}) {
+ push(@output, " JSValue value;\n");
+ push(@output, " if (thisObject->nameGetter(state, propertyName, value)) {\n");
+ push(@output, " slot.setValue(thisObject, ${attributeString}, value);\n");
+ } else {
+ my $namedGetterFunctionName = $namedGetterFunction->name || "namedItem";
+ my $itemVariable = "item";
+ push(@output, " auto item = thisObject->wrapped().${namedGetterFunctionName}(propertyNameToAtomicString(propertyName));\n");
+
+ if ($namedGetterFunction->extendedAttributes->{MayThrowException}) {
+ push(@output, " if (item.hasException()) {\n");
+ push(@output, " auto throwScope = DECLARE_THROW_SCOPE(state->vm());\n");
+ push(@output, " propagateException(*state, throwScope, item.releaseException());\n");
+ push(@output, " return true;\n");
+ push(@output, " }\n\n");
+ push(@output, " auto itemValue = item.releaseReturnValue();\n");
+
+ $itemVariable = "itemValue";
+ }
+
+ my $IDLType = GetIDLType($interface, $namedGetterFunction->type);
+ push(@output, " if (!${IDLType}::isNullValue(${itemVariable})) {\n");
+
+ my $nativeToJSConversion = NativeToJSValueUsingPointers($namedGetterFunction, $interface, $itemVariable, "thisObject", 1);
+ push(@output, " slot.setValue(thisObject, ${attributeString}, ${nativeToJSConversion});\n");
+ }
+
+ push(@output, " return true;\n");
+ push(@output, " }\n");
+
+ return @output;
+}
+
</ins><span class="cx"> sub GenerateGetOwnPropertySlotBody
</span><span class="cx"> {
</span><del>- my ($interface, $className, $inlined) = @_;
</del><ins>+ my ($interface, $className, $indexedGetterFunction, $namedGetterFunction) = @_;
</ins><span class="cx">
</span><del>- my $namespaceMaybe = ($inlined ? "JSC::" : "");
- my $namedGetterFunction = GetNamedGetterFunction($interface);
- my $indexedGetterFunction = GetIndexedGetterFunction($interface);
</del><ins>+ my @output = ();
</ins><span class="cx">
</span><del>- my @getOwnPropertySlotImpl = ();
-
</del><span class="cx"> my $ownPropertyCheck = sub {
</span><del>- push(@getOwnPropertySlotImpl, " if (Base::getOwnPropertySlot(thisObject, state, propertyName, slot))\n");
- push(@getOwnPropertySlotImpl, " return true;\n");
</del><ins>+ push(@output, " if (Base::getOwnPropertySlot(thisObject, state, propertyName, slot))\n");
+ push(@output, " return true;\n");
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> # FIXME: As per the Web IDL specification, the prototype check is supposed to skip "named properties objects":
</span><span class="lines">@@ -400,33 +461,23 @@
</span><span class="cx"> # https://heycam.github.io/webidl/#dfn-named-property-visibility
</span><span class="cx"> # https://heycam.github.io/webidl/#dfn-named-properties-object
</span><span class="cx"> my $prototypeCheck = sub {
</span><del>- push(@getOwnPropertySlotImpl, " ${namespaceMaybe}JSValue proto = thisObject->getPrototypeDirect();\n");
- push(@getOwnPropertySlotImpl, " if (proto.isObject() && jsCast<${namespaceMaybe}JSObject*>(proto)->hasProperty(state, propertyName))\n");
- push(@getOwnPropertySlotImpl, " return false;\n\n");
</del><ins>+ push(@output, " JSValue proto = thisObject->getPrototypeDirect();\n");
+ push(@output, " if (proto.isObject() && jsCast<JSObject*>(proto)->hasProperty(state, propertyName))\n");
+ push(@output, " return false;\n\n");
</ins><span class="cx"> };
</span><span class="cx">
</span><ins>+ push(@output, "bool ${className}::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)\n");
+ push(@output, "{\n");
+ push(@output, " auto* thisObject = jsCast<${className}*>(object);\n");
+ push(@output, " ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
+
+
</ins><span class="cx"> if ($indexedGetterFunction) {
</span><del>- push(@getOwnPropertySlotImpl, " std::optional<uint32_t> optionalIndex = parseIndex(propertyName);\n");
-
- # If the item function returns a string then we let the TreatReturnedNullStringAs handle the cases
- # where the index is out of range.
-
- # FIXME: Should this work for all string types?
- if ($indexedGetterFunction->type->name eq "DOMString") {
- push(@getOwnPropertySlotImpl, " if (optionalIndex) {\n");
- } else {
- push(@getOwnPropertySlotImpl, " if (optionalIndex && optionalIndex.value() < thisObject->wrapped().length()) {\n");
- }
- push(@getOwnPropertySlotImpl, " unsigned index = optionalIndex.value();\n");
- # Assume that if there's a setter, the index will be writable
- if ($interface->extendedAttributes->{CustomIndexedSetter}) {
- push(@getOwnPropertySlotImpl, " unsigned attributes = 0;\n");
- } else {
- push(@getOwnPropertySlotImpl, " unsigned attributes = ${namespaceMaybe}ReadOnly;\n");
- }
- push(@getOwnPropertySlotImpl, " slot.setValue(thisObject, attributes, " . GetIndexedGetterExpression($indexedGetterFunction) . ");\n");
- push(@getOwnPropertySlotImpl, " return true;\n");
- push(@getOwnPropertySlotImpl, " }\n");
</del><ins>+ push(@output, " auto optionalIndex = parseIndex(propertyName);\n");
+ push(@output, " if (optionalIndex && optionalIndex.value() < thisObject->wrapped().length()) {\n");
+ push(@output, " auto index = optionalIndex.value();\n");
+ push(@output, GenerateIndexedGetter($interface, $indexedGetterFunction));
+ push(@output, " }\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> my $hasNamedGetter = $namedGetterFunction || $interface->extendedAttributes->{CustomNamedGetter};
</span><span class="lines">@@ -435,32 +486,18 @@
</span><span class="cx"> &$ownPropertyCheck();
</span><span class="cx"> &$prototypeCheck();
</span><span class="cx"> }
</span><del>-
- # The "thisObject->classInfo() == info()" check is to make sure we use the subclass' named getter
- # instead of the base class one when possible.
</del><span class="cx"> if ($indexedGetterFunction) {
</span><del>- # Indexing an object with an integer that is not a supported property index should not call the named property getter.
- # https://heycam.github.io/webidl/#idl-indexed-properties
- push(@getOwnPropertySlotImpl, " if (!optionalIndex && thisObject->classInfo() == info()) {\n");
</del><ins>+ push(@output, " if (!optionalIndex && thisObject->classInfo() == info() && !propertyName.isSymbol()) {\n");
</ins><span class="cx"> } else {
</span><del>- push(@getOwnPropertySlotImpl, " if (thisObject->classInfo() == info()) {\n");
</del><ins>+ push(@output, " if (thisObject->classInfo() == info() && !propertyName.isSymbol()) {\n");
</ins><span class="cx"> }
</span><del>- push(@getOwnPropertySlotImpl, " JSValue value;\n");
- push(@getOwnPropertySlotImpl, " if (thisObject->nameGetter(state, propertyName, value)) {\n");
- push(@getOwnPropertySlotImpl, " slot.setValue(thisObject, ReadOnly | DontEnum, value);\n");
- push(@getOwnPropertySlotImpl, " return true;\n");
- push(@getOwnPropertySlotImpl, " }\n");
- push(@getOwnPropertySlotImpl, " }\n");
- if ($inlined) {
- $headerIncludes{"wtf/text/AtomicString.h"} = 1;
- } else {
- $implIncludes{"wtf/text/AtomicString.h"} = 1;
- }
</del><ins>+ push(@output, GenerateNamedGetter($interface, $namedGetterFunction));
+ push(@output, " }\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ($interface->extendedAttributes->{JSCustomGetOwnPropertySlotAndDescriptor}) {
</span><del>- push(@getOwnPropertySlotImpl, " if (thisObject->getOwnPropertySlotDelegate(state, propertyName, slot))\n");
- push(@getOwnPropertySlotImpl, " return true;\n");
</del><ins>+ push(@output, " if (thisObject->getOwnPropertySlotDelegate(state, propertyName, slot))\n");
+ push(@output, " return true;\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!$hasNamedGetter || $interface->extendedAttributes->{OverrideBuiltins}) {
</span><span class="lines">@@ -467,11 +504,209 @@
</span><span class="cx"> &$ownPropertyCheck();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- push(@getOwnPropertySlotImpl, " return false;\n");
</del><ins>+ push(@output, " return false;\n");
+ push(@output, "}\n\n");
</ins><span class="cx">
</span><del>- return @getOwnPropertySlotImpl;
</del><ins>+ return @output;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+sub GenerateGetOwnPropertySlotBodyByIndex
+{
+ my ($interface, $className, $indexedGetterFunction, $namedGetterFunction) = @_;
+
+ my @output = ();
+
+ push(@output, "bool ${className}::getOwnPropertySlotByIndex(JSObject* object, ExecState* state, unsigned index, PropertySlot& slot)\n");
+ push(@output, "{\n");
+ push(@output, " auto* thisObject = jsCast<${className}*>(object);\n");
+ push(@output, " ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
+
+ # Sink the int-to-string conversion that happens when we create a PropertyName
+ # to the point where we actually need it.
+ my $generatedPropertyName = 0;
+ my $propertyNameGeneration = sub {
+ if ($generatedPropertyName) {
+ return;
+ }
+ push(@output, " Identifier propertyName = Identifier::from(state, index);\n");
+ $generatedPropertyName = 1;
+ };
+
+ if ($indexedGetterFunction) {
+ push(@output, " if (LIKELY(index < thisObject->wrapped().length())) {\n");
+ push(@output, GenerateIndexedGetter($interface, $indexedGetterFunction));
+ push(@output, " }\n");
+ }
+
+ # Indexing an object with an integer that is not a supported property index should not call the named property getter.
+ # https://heycam.github.io/webidl/#idl-indexed-properties
+ if (!$indexedGetterFunction && ($namedGetterFunction || $interface->extendedAttributes->{CustomNamedGetter})) {
+ &$propertyNameGeneration();
+ push(@output, " if (thisObject->classInfo() == info()) {\n");
+ push(@output, GenerateNamedGetter($interface, $namedGetterFunction));
+ push(@output, " }\n");
+ }
+
+ if ($interface->extendedAttributes->{JSCustomGetOwnPropertySlotAndDescriptor}) {
+ &$propertyNameGeneration();
+ push(@output, " if (thisObject->getOwnPropertySlotDelegate(state, propertyName, slot))\n");
+ push(@output, " return true;\n");
+ }
+
+ push(@output, " return Base::getOwnPropertySlotByIndex(thisObject, state, index, slot);\n");
+ push(@output, "}\n\n");
+
+ return @output;
+}
+
+sub GenerateGetOwnPropertyNames
+{
+ my ($interface, $className, $indexedGetterFunction, $namedGetterFunction) = @_;
+
+ my @output = ();
+
+ # Property enumeration - https://heycam.github.io/webidl/#legacy-platform-object-property-enumeration
+
+ push(@implContent, "void ${className}::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)\n");
+ push(@implContent, "{\n");
+ push(@implContent, " auto* thisObject = jsCast<${className}*>(object);\n");
+ push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
+
+ # 1. If the object supports indexed properties, then the object’s supported
+ # property indices are enumerated first, in numerical order.
+ if ($indexedGetterFunction) {
+ push(@implContent, " for (unsigned i = 0, count = thisObject->wrapped().length(); i < count; ++i)\n");
+ push(@implContent, " propertyNames.add(Identifier::from(state, i));\n");
+ }
+
+ # 2. If the object supports named properties and doesn’t implement an interface
+ # with the [LegacyUnenumerableNamedProperties] extended attribute, then the
+ # object’s supported property names that are visible according to the named
+ # property visibility algorithm are enumerated next, in the order given in
+ # the definition of the set of supported property names.
+ if ($namedGetterFunction) {
+ if (!$interface->extendedAttributes->{LegacyUnenumerableNamedProperties}) {
+ push(@implContent, " for (auto& propertyName : thisObject->wrapped().supportedPropertyNames())\n");
+ push(@implContent, " propertyNames.add(Identifier::fromString(state, propertyName));\n");
+ } else {
+ push(@implContent, " if (mode.includeDontEnumProperties()) {\n");
+ push(@implContent, " for (auto& propertyName : thisObject->wrapped().supportedPropertyNames())\n");
+ push(@implContent, " propertyNames.add(Identifier::fromString(state, propertyName));\n");
+ push(@implContent, " }\n");
+ }
+ }
+ # 3. Finally, any enumerable own properties or properties from the object’s
+ # prototype chain are then enumerated, in no defined order.
+ push(@implContent, " Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);\n");
+ push(@implContent, "}\n\n");
+
+ return @output;
+}
+
+sub GeneratePut
+{
+ my ($interface, $className, $indexedSetterFunction, $namedSetterFunction) = @_;
+
+ assert("Named setters are not supported.") if $namedSetterFunction;
+
+ my @output = ();
+
+ push(@output, "bool ${className}::put(JSCell* cell, ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot& slot)\n");
+ push(@output, "{\n");
+ push(@output, " auto* thisObject = jsCast<${className}*>(cell);\n");
+ push(@output, " ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
+
+ if ($indexedSetterFunction || $interface->extendedAttributes->{CustomIndexedSetter}) {
+ if ($interface->extendedAttributes->{CustomIndexedSetter}) {
+ push(@output, " if (auto index = parseIndex(propertyName)) {\n");
+ push(@output, " thisObject->indexSetter(state, index.value(), value);\n");
+ push(@output, " return true;\n");
+ push(@output, " }\n");
+ } else {
+ # The second argument of the indexed setter function is the argument being converted.
+ my $argument = @{$indexedSetterFunction->arguments}[1];
+ my ($nativeValue, $mayThrowException) = JSValueToNative($interface, $argument, "value", $indexedSetterFunction->extendedAttributes->{Conditional}, "state", "*state", "thisObject", "", "");
+
+ push(@output, " if (auto index = parseIndex(propertyName)) {\n");
+ push(@output, " auto throwScope = DECLARE_THROW_SCOPE(state->vm());\n");
+ push(@output, " auto nativeValue = ${nativeValue};\n");
+ push(@output, " RETURN_IF_EXCEPTION(throwScope, true);\n") if $mayThrowException;
+
+ my $indexedSetterFunctionName = $indexedSetterFunction->name || "setItem";
+ my $functionString = "${indexedSetterFunctionName}(index, WTFMove(nativeValue))";
+ $functionString = "propagateException(*state, throwScope, ${functionString})" if NeedsExplicitPropagateExceptionCall($indexedSetterFunction);
+
+ push(@output, " ${functionString};\n");
+ push(@output, " return true;\n");
+ push(@output, " }\n");
+ }
+ }
+
+ if ($interface->extendedAttributes->{CustomNamedSetter}) {
+ push(@output, " bool putResult = false;\n");
+ push(@output, " if (thisObject->putDelegate(state, propertyName, value, slot, putResult))\n");
+ push(@output, " return putResult;\n");
+ }
+
+ push(@output, " return Base::put(thisObject, state, propertyName, value, slot);\n");
+ push(@output, "}\n\n");
+
+ return @output;
+}
+
+sub GeneratePutByIndex
+{
+ my ($interface, $className, $indexedSetterFunction, $namedSetterFunction) = @_;
+
+ assert("Named setters are not supported.") if $namedSetterFunction;
+
+ my @output = ();
+
+ push(@output, "bool ${className}::putByIndex(JSCell* cell, ExecState* state, unsigned index, JSValue value, bool shouldThrow)\n");
+ push(@output, "{\n");
+ push(@output, " auto* thisObject = jsCast<${className}*>(cell);\n");
+ push(@output, " ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
+
+ if ($indexedSetterFunction || $interface->extendedAttributes->{CustomIndexedSetter}) {
+ if ($interface->extendedAttributes->{CustomIndexedSetter}) {
+ push(@output, " if (LIKELY(index <= MAX_ARRAY_INDEX)) {\n");
+ push(@output, " thisObject->indexSetter(state, index, value);\n");
+ push(@output, " return true;\n");
+ push(@output, " }\n");
+ } else {
+ # The second argument of the indexed setter function is the argument being converted.
+ my $argument = @{$indexedSetterFunction->arguments}[1];
+ my ($nativeValue, $mayThrowException) = JSValueToNative($interface, $argument, "value", $indexedSetterFunction->extendedAttributes->{Conditional}, "state", "*state", "thisObject", "", "");
+
+ push(@output, " if (LIKELY(index <= MAX_ARRAY_INDEX)) {\n");
+ push(@output, " auto throwScope = DECLARE_THROW_SCOPE(state->vm());\n");
+ push(@output, " auto nativeValue = ${nativeValue};\n");
+ push(@output, " RETURN_IF_EXCEPTION(throwScope, true);\n") if $mayThrowException;
+
+ my $indexedSetterFunctionName = $indexedSetterFunction->name || "setItem";
+ my $functionString = "${indexedSetterFunctionName}(index, WTFMove(nativeValue))";
+ $functionString = "propagateException(*state, throwScope, ${functionString})" if NeedsExplicitPropagateExceptionCall($indexedSetterFunction);
+
+ push(@output, " ${functionString};\n");
+ push(@output, " return true;\n");
+ push(@output, " }\n");
+ }
+ }
+
+ if ($interface->extendedAttributes->{CustomNamedSetter}) {
+ push(@output, " Identifier propertyName = Identifier::from(state, index);\n");
+ push(@output, " PutPropertySlot slot(thisObject, shouldThrow);\n");
+ push(@output, " bool putResult = false;\n");
+ push(@output, " if (thisObject->putDelegate(state, propertyName, value, slot, putResult))\n");
+ push(@output, " return putResult;\n");
+ }
+
+ push(@output, " return Base::putByIndex(cell, state, index, value, shouldThrow);\n");
+ push(@output, "}\n\n");
+
+ return @output;
+}
+
</ins><span class="cx"> sub GenerateHeaderContentHeader
</span><span class="cx"> {
</span><span class="cx"> my $interface = shift;
</span><span class="lines">@@ -783,6 +1018,12 @@
</span><span class="cx"> return GetSpecialAccessorFunctionForType($interface, "getter", "unsigned long", 1);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub GetIndexedSetterFunction
+{
+ my $interface = shift;
+ return GetSpecialAccessorFunctionForType($interface, "setter", "unsigned long", 2);
+}
+
</ins><span class="cx"> sub GetNamedGetterFunction
</span><span class="cx"> {
</span><span class="cx"> my $interface = shift;
</span><span class="lines">@@ -789,6 +1030,18 @@
</span><span class="cx"> return GetSpecialAccessorFunctionForType($interface, "getter", "DOMString", 1);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub GetNamedSetterFunction
+{
+ my $interface = shift;
+ return GetSpecialAccessorFunctionForType($interface, "setter", "DOMString", 2);
+}
+
+sub GetNamedDeleterFunction
+{
+ my $interface = shift;
+ return GetSpecialAccessorFunctionForType($interface, "deleter", "DOMString", 1);
+}
+
</ins><span class="cx"> sub InstanceFunctionCount
</span><span class="cx"> {
</span><span class="cx"> my $interface = shift;
</span><span class="lines">@@ -849,6 +1102,15 @@
</span><span class="cx"> || GetNamedGetterFunction($interface);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub InstanceOverridesPut
+{
+ my $interface = shift;
+ return $interface->extendedAttributes->{CustomNamedSetter}
+ || $interface->extendedAttributes->{CustomIndexedSetter}
+ || GetIndexedSetterFunction($interface)
+ || GetNamedSetterFunction($interface);
+}
+
</ins><span class="cx"> sub PrototypeHasStaticPropertyTable
</span><span class="cx"> {
</span><span class="cx"> my $interface = shift;
</span><span class="lines">@@ -1579,7 +1841,6 @@
</span><span class="cx"> # Getters
</span><span class="cx"> if ($hasGetter) {
</span><span class="cx"> push(@headerContent, " static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);\n");
</span><del>- push(@headerContent, " bool getOwnPropertySlotDelegate(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);\n") if $interface->extendedAttributes->{JSCustomGetOwnPropertySlotAndDescriptor};
</del><span class="cx"> $structureFlags{"JSC::OverridesGetOwnPropertySlot"} = 1;
</span><span class="cx">
</span><span class="cx"> if ($hasComplexGetter) {
</span><span class="lines">@@ -1594,7 +1855,6 @@
</span><span class="cx"> if ($overridesPut) {
</span><span class="cx"> push(@headerContent, " static bool put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&);\n");
</span><span class="cx"> push(@headerContent, " static bool putByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::JSValue, bool shouldThrow);\n");
</span><del>- push(@headerContent, " bool putDelegate(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&, bool& putResult);\n") if $interface->extendedAttributes->{CustomNamedSetter};
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (!$hasParent) {
</span><span class="lines">@@ -1799,13 +2059,22 @@
</span><span class="cx"> push(@headerContent, " void finishCreation(JSC::VM&);\n");
</span><span class="cx"> }
</span><span class="cx">
</span><del>- push(@headerContent, " void indexSetter(JSC::ExecState*, unsigned index, JSC::JSValue);\n") if $interface->extendedAttributes->{CustomIndexedSetter};
</del><ins>+ if ($interface->extendedAttributes->{JSCustomGetOwnPropertySlotAndDescriptor}) {
+ push(@headerContent, " bool getOwnPropertySlotDelegate(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);\n");
+ }
</ins><span class="cx">
</span><del>- if ($namedGetterFunction || $interface->extendedAttributes->{CustomNamedGetter}) {
- push(@headerContent, "private:\n");
</del><ins>+ if ($interface->extendedAttributes->{CustomNamedGetter}) {
</ins><span class="cx"> push(@headerContent, " bool nameGetter(JSC::ExecState*, JSC::PropertyName, JSC::JSValue&);\n");
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if ($interface->extendedAttributes->{CustomNamedSetter}) {
+ push(@headerContent, " bool putDelegate(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&, bool& putResult);\n");
+ }
+
+ if ($interface->extendedAttributes->{CustomIndexedSetter}) {
+ push(@headerContent, " void indexSetter(JSC::ExecState*, unsigned index, JSC::JSValue);\n");
+ }
+
</ins><span class="cx"> push(@headerContent, "};\n\n");
</span><span class="cx">
</span><span class="cx"> if (ShouldGenerateWrapperOwnerCode($hasParent, $interface)) {
</span><span class="lines">@@ -2640,15 +2909,6 @@
</span><span class="cx"> return "jsDynamicDowncast<JS$interfaceName*>";
</span><span class="cx"> }
</span><span class="cx">
</span><del>-sub GetIndexedGetterExpression
-{
- my $indexedGetterFunction = shift;
-
- # FIXME: Should this work for all string types?
- return "jsStringOrUndefined(state, thisObject->wrapped().item(index))" if $indexedGetterFunction->type->name eq "DOMString";
- return "toJS(state, thisObject->globalObject(), thisObject->wrapped().item(index))";
-}
-
</del><span class="cx"> # http://heycam.github.io/webidl/#Unscopable
</span><span class="cx"> sub addUnscopableProperties
</span><span class="cx"> {
</span><span class="lines">@@ -3204,77 +3464,34 @@
</span><span class="cx"> # Attributes
</span><span class="cx"> if ($hasGetter) {
</span><span class="cx"> if (!$interface->extendedAttributes->{CustomGetOwnPropertySlot}) {
</span><del>- push(@implContent, "bool ${className}::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)\n");
- push(@implContent, "{\n");
- push(@implContent, " auto* thisObject = jsCast<${className}*>(object);\n");
- push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
- push(@implContent, GenerateGetOwnPropertySlotBody($interface, $className, 0));
- push(@implContent, "}\n\n");
</del><ins>+ push(@implContent, GenerateGetOwnPropertySlotBody($interface, $className, $indexedGetterFunction, $namedGetterFunction));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ($indexedGetterFunction || $namedGetterFunction
</span><span class="cx"> || $interface->extendedAttributes->{CustomNamedGetter}
</span><span class="cx"> || $interface->extendedAttributes->{JSCustomGetOwnPropertySlotAndDescriptor}) {
</span><del>- push(@implContent, "bool ${className}::getOwnPropertySlotByIndex(JSObject* object, ExecState* state, unsigned index, PropertySlot& slot)\n");
- push(@implContent, "{\n");
- push(@implContent, " auto* thisObject = jsCast<${className}*>(object);\n");
- push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
</del><ins>+ push(@implContent, GenerateGetOwnPropertySlotBodyByIndex($interface, $className, $indexedGetterFunction, $namedGetterFunction));
+ }
</ins><span class="cx">
</span><del>- # Sink the int-to-string conversion that happens when we create a PropertyName
- # to the point where we actually need it.
- my $generatedPropertyName = 0;
- my $propertyNameGeneration = sub {
- if ($generatedPropertyName) {
- return;
- }
- push(@implContent, " Identifier propertyName = Identifier::from(state, index);\n");
- $generatedPropertyName = 1;
- };
</del><ins>+ }
</ins><span class="cx">
</span><del>- if ($indexedGetterFunction) {
- # FIXME: Should this work for all string types?
- if ($indexedGetterFunction->type->name eq "DOMString") {
- push(@implContent, " if (LIKELY(index <= MAX_ARRAY_INDEX)) {\n");
- } else {
- push(@implContent, " if (LIKELY(index < thisObject->wrapped().length())) {\n");
- }
- # Assume that if there's a setter, the index will be writable
- if ($interface->extendedAttributes->{CustomIndexedSetter}) {
- push(@implContent, " unsigned attributes = DontDelete;\n");
- } else {
- push(@implContent, " unsigned attributes = DontDelete | ReadOnly;\n");
- }
- push(@implContent, " slot.setValue(thisObject, attributes, " . GetIndexedGetterExpression($indexedGetterFunction) . ");\n");
- push(@implContent, " return true;\n");
- push(@implContent, " }\n");
- }
</del><span class="cx">
</span><del>- # Indexing an object with an integer that is not a supported property index should not call the named property getter.
- # https://heycam.github.io/webidl/#idl-indexed-properties
- if (!$indexedGetterFunction && ($namedGetterFunction || $interface->extendedAttributes->{CustomNamedGetter})) {
- &$propertyNameGeneration();
</del><ins>+ if (($indexedGetterFunction || $namedGetterFunction) && !$interface->extendedAttributes->{CustomEnumerateProperty}) {
+ push(@implContent, GenerateGetOwnPropertyNames($interface, $className, $indexedGetterFunction, $namedGetterFunction));
+ }
</ins><span class="cx">
</span><del>- # This condition is to make sure we use the subclass' named getter instead of the base class one when possible.
- push(@implContent, " if (thisObject->classInfo() == info()) {\n");
- push(@implContent, " JSValue value;\n");
- push(@implContent, " if (thisObject->nameGetter(state, propertyName, value)) {\n");
- push(@implContent, " slot.setValue(thisObject, ReadOnly | DontDelete | DontEnum, value);\n");
- push(@implContent, " return true;\n");
- push(@implContent, " }\n");
- push(@implContent, " }\n");
- $implIncludes{"wtf/text/AtomicString.h"} = 1;
- }
</del><ins>+ my $namedSetterFunction = GetNamedSetterFunction($interface);
+ my $indexedSetterFunction = GetIndexedSetterFunction($interface);
</ins><span class="cx">
</span><del>- if ($interface->extendedAttributes->{JSCustomGetOwnPropertySlotAndDescriptor}) {
- &$propertyNameGeneration();
- push(@implContent, " if (thisObject->getOwnPropertySlotDelegate(state, propertyName, slot))\n");
- push(@implContent, " return true;\n");
</del><ins>+ my $hasSetter = InstanceOverridesPut($interface);
+ if ($hasSetter) {
+ if (!$interface->extendedAttributes->{CustomPutFunction}) {
+ push(@implContent, GeneratePut($interface, $className, $indexedSetterFunction, $namedSetterFunction));
+
+ if ($interface->extendedAttributes->{CustomIndexedSetter} || $interface->extendedAttributes->{CustomNamedSetter}) {
+ push(@implContent, GeneratePutByIndex($interface, $className, $indexedSetterFunction, $namedSetterFunction));
</ins><span class="cx"> }
</span><del>-
- push(@implContent, " return Base::getOwnPropertySlotByIndex(thisObject, state, index, slot);\n");
- push(@implContent, "}\n\n");
</del><span class="cx"> }
</span><del>-
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ($numAttributes > 0) {
</span><span class="lines">@@ -3421,7 +3638,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> unshift(@arguments, @callWithArgs);
</span><del>- my $jsType = NativeToJSValueUsingReferences($attribute, 0, $interface, "${functionName}(" . join(", ", @arguments) . ")", "thisObject");
</del><ins>+ my $jsType = NativeToJSValueUsingReferences($attribute, $interface, "${functionName}(" . join(", ", @arguments) . ")", "thisObject");
</ins><span class="cx"> push(@implContent, " auto& impl = thisObject.wrapped();\n") if !$attribute->isStatic;
</span><span class="cx"> push(@implContent, " JSValue result = $jsType;\n");
</span><span class="cx">
</span><span class="lines">@@ -3497,55 +3714,6 @@
</span><span class="cx"> push(@implContent, "}\n\n");
</span><span class="cx"> }
</span><span class="cx">
</span><del>- my $hasCustomSetter = $interface->extendedAttributes->{CustomNamedSetter} || $interface->extendedAttributes->{CustomIndexedSetter};
- if ($hasCustomSetter) {
- if (!$interface->extendedAttributes->{CustomPutFunction}) {
- push(@implContent, "bool ${className}::put(JSCell* cell, ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot& slot)\n");
- push(@implContent, "{\n");
- push(@implContent, " auto* thisObject = jsCast<${className}*>(cell);\n");
- push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
- if ($interface->extendedAttributes->{CustomIndexedSetter}) {
- push(@implContent, " if (std::optional<uint32_t> index = parseIndex(propertyName)) {\n");
- push(@implContent, " thisObject->indexSetter(state, index.value(), value);\n");
- push(@implContent, " return true;\n");
- push(@implContent, " }\n");
- }
- if ($interface->extendedAttributes->{CustomNamedSetter}) {
- push(@implContent, " bool putResult = false;\n");
- push(@implContent, " if (thisObject->putDelegate(state, propertyName, value, slot, putResult))\n");
- push(@implContent, " return putResult;\n");
- }
-
- push(@implContent, " return Base::put(thisObject, state, propertyName, value, slot);\n");
- push(@implContent, "}\n\n");
-
- if ($interface->extendedAttributes->{CustomIndexedSetter} || $interface->extendedAttributes->{CustomNamedSetter}) {
- push(@implContent, "bool ${className}::putByIndex(JSCell* cell, ExecState* state, unsigned index, JSValue value, bool shouldThrow)\n");
- push(@implContent, "{\n");
- push(@implContent, " auto* thisObject = jsCast<${className}*>(cell);\n");
- push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
-
- if ($interface->extendedAttributes->{CustomIndexedSetter}) {
- push(@implContent, " if (LIKELY(index <= MAX_ARRAY_INDEX)) {\n");
- push(@implContent, " thisObject->indexSetter(state, index, value);\n");
- push(@implContent, " return true;\n");
- push(@implContent, " }\n");
- }
-
- if ($interface->extendedAttributes->{CustomNamedSetter}) {
- push(@implContent, " Identifier propertyName = Identifier::from(state, index);\n");
- push(@implContent, " PutPropertySlot slot(thisObject, shouldThrow);\n");
- push(@implContent, " bool putResult = false;\n");
- push(@implContent, " if (thisObject->putDelegate(state, propertyName, value, slot, putResult))\n");
- push(@implContent, " return putResult;\n");
- }
-
- push(@implContent, " return Base::putByIndex(cell, state, index, value, shouldThrow);\n");
- push(@implContent, "}\n\n");
- }
- }
- }
-
</del><span class="cx"> foreach my $attribute (@{$interface->attributes}) {
</span><span class="cx"> if (!IsReadonly($attribute)) {
</span><span class="cx"> next if IsJSBuiltin($interface, $attribute);
</span><span class="lines">@@ -3706,26 +3874,6 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (($indexedGetterFunction || $namedGetterFunction) && !$interface->extendedAttributes->{CustomEnumerateProperty}) {
- push(@implContent, "void ${className}::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)\n");
- push(@implContent, "{\n");
- push(@implContent, " auto* thisObject = jsCast<${className}*>(object);\n");
- push(@implContent, " ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n");
- if ($indexedGetterFunction) {
- push(@implContent, " for (unsigned i = 0, count = thisObject->wrapped().length(); i < count; ++i)\n");
- push(@implContent, " propertyNames.add(Identifier::from(state, i));\n");
- }
- if ($namedGetterFunction) {
- # FIXME: We may need to add an IDL extended attribute at some point if an interface needs enumerable named properties.
- push(@implContent, " if (mode.includeDontEnumProperties()) {\n");
- push(@implContent, " for (auto& propertyName : thisObject->wrapped().supportedPropertyNames())\n");
- push(@implContent, " propertyNames.add(Identifier::fromString(state, propertyName));\n");
- push(@implContent, " }\n");
- }
- push(@implContent, " Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);\n");
- push(@implContent, "}\n\n");
- }
-
</del><span class="cx"> if (!$interface->extendedAttributes->{NoInterfaceObject}) {
</span><span class="cx"> push(@implContent, "JSValue ${className}::getConstructor(VM& vm, const JSGlobalObject* globalObject)\n{\n");
</span><span class="cx"> push(@implContent, " return getDOMConstructor<${className}Constructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));\n");
</span><span class="lines">@@ -3941,7 +4089,7 @@
</span><span class="cx"> }
</span><span class="cx"> my $functionString = "$implFunctionName(" . join(", ", @arguments) . ")";
</span><span class="cx"> $functionString = "propagateException(*state, throwScope, $functionString)" if NeedsExplicitPropagateExceptionCall($function);
</span><del>- push(@implContent, " return JSValue::encode(" . NativeToJSValueUsingPointers($function, 1, $interface, $functionString, "castedThis") . ");\n");
</del><ins>+ push(@implContent, " return JSValue::encode(" . NativeToJSValueUsingPointers($function, $interface, $functionString, "castedThis") . ");\n");
</ins><span class="cx"> push(@implContent, "}\n\n");
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4002,7 +4150,6 @@
</span><span class="cx"> # die "Can't generate binding for class with cached attribute and custom mark." if $numCachedAttributes > 0 and $interface->extendedAttributes->{JSCustomMarkFunction};
</span><span class="cx">
</span><span class="cx"> if ($indexedGetterFunction) {
</span><del>- # FIXME: Should this work for all string types.
</del><span class="cx"> $implIncludes{"URL.h"} = 1 if $indexedGetterFunction->type->name eq "DOMString";
</span><span class="cx"> if ($interfaceName =~ /^HTML\w*Collection$/ or $interfaceName eq "RadioNodeList") {
</span><span class="cx"> $implIncludes{"JSNode.h"} = 1;
</span><span class="lines">@@ -4851,7 +4998,7 @@
</span><span class="cx"> push(@$contentRef, " MarkedArgumentBuffer args;\n");
</span><span class="cx">
</span><span class="cx"> foreach my $argument (@{$function->arguments}) {
</span><del>- push(@$contentRef, " args.append(" . NativeToJSValueUsingPointers($argument, 1, $interfaceOrCallback, $argument->name, "m_data") . ");\n");
</del><ins>+ push(@$contentRef, " args.append(" . NativeToJSValueUsingPointers($argument, $interfaceOrCallback, $argument->name, "m_data") . ");\n");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> push(@$contentRef, "\n NakedPtr<JSC::Exception> returnedException;\n");
</span><span class="lines">@@ -4890,7 +5037,7 @@
</span><span class="cx"> push(@implContent, $indent . "return JSValue::encode(jsUndefined());\n");
</span><span class="cx"> } else {
</span><span class="cx"> my $thisObject = $function->isStatic ? 0 : "castedThis";
</span><del>- push(@implContent, $indent . "return JSValue::encode(" . NativeToJSValueUsingPointers($function, 1, $interface, $functionString, $thisObject) . ");\n");
</del><ins>+ push(@implContent, $indent . "return JSValue::encode(" . NativeToJSValueUsingPointers($function, $interface, $functionString, $thisObject) . ");\n");
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -5385,23 +5532,23 @@
</span><span class="cx">
</span><span class="cx"> sub NativeToJSValueUsingReferences
</span><span class="cx"> {
</span><del>- my ($context, $inFunctionCall, $interface, $value, $thisValue) = @_;
</del><ins>+ my ($context, $interface, $value, $thisValue, $suppressExceptionCheck) = @_;
</ins><span class="cx"> my $stateReference = "state";
</span><span class="cx"> my $wrapped = "$thisValue.wrapped()";
</span><span class="cx"> my $globalObjectReference = $thisValue ? "*$thisValue.globalObject()" : "*jsCast<JSDOMGlobalObject*>(state.lexicalGlobalObject())";
</span><span class="cx">
</span><del>- return NativeToJSValue($context, $inFunctionCall, $interface, $value, $stateReference, $wrapped, $globalObjectReference);
</del><ins>+ return NativeToJSValue($context, $interface, $value, $stateReference, $wrapped, $globalObjectReference, $suppressExceptionCheck);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> # FIXME: We should remove NativeToJSValueUsingPointers and combine NativeToJSValueUsingReferences and NativeToJSValue
</span><span class="cx"> sub NativeToJSValueUsingPointers
</span><span class="cx"> {
</span><del>- my ($context, $inFunctionCall, $interface, $value, $thisValue) = @_;
</del><ins>+ my ($context, $interface, $value, $thisValue, $suppressExceptionCheck) = @_;
</ins><span class="cx"> my $stateReference = "*state";
</span><span class="cx"> my $wrapped = "$thisValue->wrapped()";
</span><span class="cx"> my $globalObjectReference = $thisValue ? "*$thisValue->globalObject()" : "*jsCast<JSDOMGlobalObject*>(state->lexicalGlobalObject())";
</span><span class="cx">
</span><del>- return NativeToJSValue($context, $inFunctionCall, $interface, $value, $stateReference, $wrapped, $globalObjectReference);
</del><ins>+ return NativeToJSValue($context, $interface, $value, $stateReference, $wrapped, $globalObjectReference, $suppressExceptionCheck);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> sub IsValidContextForNativeToJSValue
</span><span class="lines">@@ -5413,13 +5560,13 @@
</span><span class="cx">
</span><span class="cx"> sub NativeToJSValue
</span><span class="cx"> {
</span><del>- my ($context, $inFunctionCall, $interface, $value, $stateReference, $wrapped, $globalObjectReference) = @_;
</del><ins>+ my ($context, $interface, $value, $stateReference, $wrapped, $globalObjectReference, $suppressExceptionCheck) = @_;
</ins><span class="cx">
</span><span class="cx"> assert("Invalid context type") if !IsValidContextForNativeToJSValue($context);
</span><span class="cx">
</span><span class="cx"> my $conditional = $context->extendedAttributes->{Conditional};
</span><span class="cx"> my $type = $context->type;
</span><del>- my $mayThrowException = $context->extendedAttributes->{GetterMayThrowException} || $context->extendedAttributes->{MayThrowException};
</del><ins>+ my $mayThrowException = $context->extendedAttributes->{GetterMayThrowException} || $context->extendedAttributes->{MayThrowException} && !$suppressExceptionCheck;
</ins><span class="cx">
</span><span class="cx"> # We could instead overload a function to work with optional as well as non-optional numbers, but this
</span><span class="cx"> # is slightly better because it guarantees we will fail to compile if the IDL file doesn't match the C++.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLAttributestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -90,6 +90,7 @@
</span><span class="cx"> JSGenerateToJSObject
</span><span class="cx"> JSGenerateToNativeObject
</span><span class="cx"> JSLegacyParent=*
</span><ins>+LegacyUnenumerableNamedProperties
</ins><span class="cx"> LenientThis
</span><span class="cx"> MasqueradesAsUndefined
</span><span class="cx"> MayThrowException
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleSheetListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleSheetList.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleSheetList.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/css/StyleSheetList.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> return index < sheets.size() ? sheets[index].get() : 0;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HTMLStyleElement* StyleSheetList::getNamedItem(const String& name) const
</del><ins>+CSSStyleSheet* StyleSheetList::namedItem(const AtomicString& name) const
</ins><span class="cx"> {
</span><span class="cx"> if (!m_document)
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> // But unicity of stylesheet ids is good practice anyway ;)
</span><span class="cx"> Element* element = m_document->getElementById(name);
</span><span class="cx"> if (is<HTMLStyleElement>(element))
</span><del>- return downcast<HTMLStyleElement>(element);
</del><ins>+ return downcast<HTMLStyleElement>(element)->sheet();
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleSheetListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleSheetList.h (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleSheetList.h        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/css/StyleSheetList.h        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> class Document;
</span><span class="cx"> class HTMLStyleElement;
</span><span class="cx"> class StyleSheet;
</span><ins>+class CSSStyleSheet;
</ins><span class="cx">
</span><span class="cx"> class StyleSheetList final : public RefCounted<StyleSheetList> {
</span><span class="cx"> public:
</span><span class="lines">@@ -38,7 +39,7 @@
</span><span class="cx"> WEBCORE_EXPORT unsigned length() const;
</span><span class="cx"> WEBCORE_EXPORT StyleSheet* item(unsigned index);
</span><span class="cx">
</span><del>- HTMLStyleElement* getNamedItem(const String&) const;
</del><ins>+ CSSStyleSheet* namedItem(const AtomicString&) const;
</ins><span class="cx"> Vector<AtomicString> supportedPropertyNames();
</span><span class="cx">
</span><span class="cx"> Document* document() { return m_document; }
</span></span></pre></div>
<a id="trunkSourceWebCorecssStyleSheetListidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleSheetList.idl (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleSheetList.idl        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/css/StyleSheetList.idl        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -24,6 +24,9 @@
</span><span class="cx"> ImplementationLacksVTable,
</span><span class="cx"> ] interface StyleSheetList {
</span><span class="cx"> readonly attribute unsigned long length;
</span><del>- getter StyleSheet item(unsigned long index);
</del><ins>+ getter StyleSheet? item(unsigned long index);
+
+ // FIXME: https://drafts.csswg.org/cssom/#the-stylesheetlist-interface does not
+ // specify a named getter for StyleSheetList. We should investigate removing this.
</ins><span class="cx"> getter CSSStyleSheet (DOMString name);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoredomDOMNamedFlowCollectionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DOMNamedFlowCollection.idl (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMNamedFlowCollection.idl        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/dom/DOMNamedFlowCollection.idl        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -28,11 +28,12 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> [
</span><del>- NoInterfaceObject,
</del><span class="cx"> Conditional=CSS_REGIONS,
</span><ins>+ ImplementationLacksVTable,
</ins><span class="cx"> InterfaceName=WebKitNamedFlowCollection,
</span><span class="cx"> JSGenerateToJSObject,
</span><del>- ImplementationLacksVTable,
</del><ins>+ LegacyUnenumerableNamedProperties,
+ NoInterfaceObject
</ins><span class="cx"> ] interface DOMNamedFlowCollection {
</span><span class="cx"> readonly attribute unsigned long length;
</span><span class="cx"> getter WebKitNamedFlow? item(unsigned long index);
</span></span></pre></div>
<a id="trunkSourceWebCoredomDOMStringMaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DOMStringMap.h (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMStringMap.h        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/dom/DOMStringMap.h        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -29,6 +29,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-typedef DatasetDOMStringMap DOMStringMap;
</del><ins>+using DOMStringMap = DatasetDOMStringMap;
</ins><span class="cx">
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoredomDOMStringMapidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DOMStringMap.idl (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMStringMap.idl        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/dom/DOMStringMap.idl        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -26,11 +26,14 @@
</span><span class="cx"> [
</span><span class="cx"> GenerateIsReachable=ImplElementRoot,
</span><span class="cx"> CustomDeleteProperty,
</span><del>- CustomEnumerateProperty,
</del><span class="cx"> CustomNamedSetter,
</span><del>- JSCustomGetOwnPropertySlotAndDescriptor,
</del><span class="cx"> OverrideBuiltins,
</span><span class="cx"> SkipVTableValidation,
</span><span class="cx"> ] interface DOMStringMap {
</span><ins>+ getter DOMString (DOMString name);
+
+ // FIXME: Add support for the setter and deleter specials.
+ // [CEReactions] setter void (DOMString name, DOMString value);
+ // [CEReactions] deleter void (DOMString name);
</ins><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomDatasetDOMStringMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DatasetDOMStringMap.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DatasetDOMStringMap.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/dom/DatasetDOMStringMap.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -151,7 +151,7 @@
</span><span class="cx"> m_element.deref();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-Vector<String> DatasetDOMStringMap::names() const
</del><ins>+Vector<String> DatasetDOMStringMap::supportedPropertyNames() const
</ins><span class="cx"> {
</span><span class="cx"> Vector<String> names;
</span><span class="cx">
</span><span class="lines">@@ -165,9 +165,8 @@
</span><span class="cx"> return names;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-const AtomicString& DatasetDOMStringMap::item(const String& propertyName, bool& isValid) const
</del><ins>+std::optional<const AtomicString&> DatasetDOMStringMap::item(const String& propertyName) const
</ins><span class="cx"> {
</span><del>- isValid = false;
</del><span class="cx"> if (m_element.hasAttributes()) {
</span><span class="cx"> AttributeIteratorAccessor attributeIteratorAccessor = m_element.attributesIterator();
</span><span class="cx">
</span><span class="lines">@@ -175,24 +174,25 @@
</span><span class="cx"> // If the node has a single attribute, it is the dataset member accessed in most cases.
</span><span class="cx"> // Building a new AtomicString in that case is overkill so we do a direct character comparison.
</span><span class="cx"> const Attribute& attribute = *attributeIteratorAccessor.begin();
</span><del>- if (propertyNameMatchesAttributeName(propertyName, attribute.localName())) {
- isValid = true;
</del><ins>+ if (propertyNameMatchesAttributeName(propertyName, attribute.localName()))
</ins><span class="cx"> return attribute.value();
</span><del>- }
</del><span class="cx"> } else {
</span><span class="cx"> AtomicString attributeName = convertPropertyNameToAttributeName(propertyName);
</span><span class="cx"> for (const Attribute& attribute : attributeIteratorAccessor) {
</span><del>- if (attribute.localName() == attributeName) {
- isValid = true;
</del><ins>+ if (attribute.localName() == attributeName)
</ins><span class="cx"> return attribute.value();
</span><del>- }
</del><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- return nullAtom;
</del><ins>+ return std::nullopt;
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+String DatasetDOMStringMap::namedItem(const AtomicString& name) const
+{
+ return item(name).value_or(String { });
+}
+
</ins><span class="cx"> ExceptionOr<void> DatasetDOMStringMap::setItem(const String& name, const String& value)
</span><span class="cx"> {
</span><span class="cx"> if (!isValidPropertyName(name))
</span></span></pre></div>
<a id="trunkSourceWebCoredomDatasetDOMStringMaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DatasetDOMStringMap.h (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DatasetDOMStringMap.h        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/dom/DatasetDOMStringMap.h        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -43,8 +43,9 @@
</span><span class="cx"> void ref();
</span><span class="cx"> void deref();
</span><span class="cx">
</span><del>- Vector<String> names() const;
- const AtomicString& item(const String& name, bool& isValid) const;
</del><ins>+ Vector<String> supportedPropertyNames() const;
+
+ String namedItem(const AtomicString& name) const;
</ins><span class="cx"> ExceptionOr<void> setItem(const String& name, const String& value);
</span><span class="cx"> bool deleteItem(const String& name);
</span><span class="cx">
</span><span class="lines">@@ -51,6 +52,8 @@
</span><span class="cx"> Element& element() { return m_element; }
</span><span class="cx">
</span><span class="cx"> private:
</span><ins>+ std::optional<const AtomicString&> item(const String& name) const;
+
</ins><span class="cx"> Element& m_element;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomNamedNodeMapidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/NamedNodeMap.idl (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/NamedNodeMap.idl        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/dom/NamedNodeMap.idl        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -22,6 +22,7 @@
</span><span class="cx"> ExportToWrappedFunction,
</span><span class="cx"> GenerateIsReachable=ImplElementRoot,
</span><span class="cx"> ImplementationLacksVTable,
</span><ins>+ LegacyUnenumerableNamedProperties
</ins><span class="cx"> ] interface NamedNodeMap {
</span><span class="cx"> readonly attribute unsigned long length;
</span><span class="cx"> getter Attr? item(unsigned long index);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAllCollectionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAllCollection.idl (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAllCollection.idl        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/html/HTMLAllCollection.idl        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -25,13 +25,18 @@
</span><span class="cx">
</span><span class="cx"> [
</span><span class="cx"> CustomCall,
</span><ins>+ CustomNamedGetter,
+ LegacyUnenumerableNamedProperties,
</ins><span class="cx"> MasqueradesAsUndefined,
</span><span class="cx"> GenerateIsReachable=ImplOwnerNodeRoot,
</span><span class="cx"> ] interface HTMLAllCollection {
</span><span class="cx"> readonly attribute unsigned long length;
</span><del>- [Custom] getter Element item(unsigned long index);
- [Custom] getter Element namedItem(DOMString name);
- // FIXME: This should return an HTMLAllCollection.
</del><ins>+
+ [Custom] getter Element? item(unsigned long index);
+ [Custom] getter (HTMLCollection or Element)? namedItem(DOMString name);
+ // [Custom] legacycaller (HTMLCollection or Element)? item(optional DOMString nameOrIndex);
+
+ // FIXME: This is not in the standard. Can we remove it?
</ins><span class="cx"> NodeList tags(DOMString name);
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLCollectionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLCollection.idl (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLCollection.idl        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/html/HTMLCollection.idl        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -22,10 +22,10 @@
</span><span class="cx"> CustomToJSObject,
</span><span class="cx"> ExportToWrappedFunction,
</span><span class="cx"> GenerateIsReachable=ImplOwnerNodeRoot,
</span><ins>+ LegacyUnenumerableNamedProperties,
</ins><span class="cx"> ReportExtraMemoryCost,
</span><span class="cx"> ] interface HTMLCollection {
</span><span class="cx"> readonly attribute unsigned long length;
</span><del>-
</del><span class="cx"> getter Element? item(unsigned long index);
</span><span class="cx"> getter Element? namedItem(DOMString name);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormControlsCollectionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormControlsCollection.idl (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormControlsCollection.idl        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/html/HTMLFormControlsCollection.idl        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -19,8 +19,9 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> [
</span><ins>+ CustomNamedGetter,
</ins><span class="cx"> GenerateIsReachable=ImplOwnerNodeRoot,
</span><span class="cx"> ] interface HTMLFormControlsCollection : HTMLCollection {
</span><span class="cx"> getter HTMLElement? (unsigned long index);
</span><del>- [Custom] getter HTMLElement? namedItem(DOMString name);
</del><ins>+ [Custom] getter (RadioNodeList or Element)? namedItem(DOMString name); // shadows inherited namedItem()
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormElement.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormElement.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/html/HTMLFormElement.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> #include "HTMLTableElement.h"
</span><span class="cx"> #include "NodeRareData.h"
</span><span class="cx"> #include "Page.h"
</span><ins>+#include "RadioNodeList.h"
</ins><span class="cx"> #include "RenderTextControl.h"
</span><span class="cx"> #include "ScriptController.h"
</span><span class="cx"> #include "Settings.h"
</span><span class="lines">@@ -174,6 +175,25 @@
</span><span class="cx"> return elements()->item(index);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+std::optional<Variant<RefPtr<RadioNodeList>, RefPtr<Element>>> HTMLFormElement::namedItem(const AtomicString& name)
+{
+ auto namedItems = namedElements(name);
+
+ if (namedItems.isEmpty())
+ return std::nullopt;
+ if (namedItems.size() == 1)
+ return Variant<RefPtr<RadioNodeList>, RefPtr<Element>> { RefPtr<Element> { WTFMove(namedItems[0]) } };
+
+ return Variant<RefPtr<RadioNodeList>, RefPtr<Element>> { RefPtr<RadioNodeList> { radioNodeList(name) } };
+}
+
+Vector<AtomicString> HTMLFormElement::supportedPropertyNames() const
+{
+ // FIXME: Should be implemented (only needed for enumeration with includeDontEnumProperties mode
+ // since this class is annotated with LegacyUnenumerableNamedProperties).
+ return { };
+}
+
</ins><span class="cx"> void HTMLFormElement::submitImplicitly(Event& event, bool fromImplicitSubmissionTrigger)
</span><span class="cx"> {
</span><span class="cx"> unsigned submissionTriggerCount = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormElement.h (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormElement.h        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/html/HTMLFormElement.h        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -53,6 +53,8 @@
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT unsigned length() const;
</span><span class="cx"> HTMLElement* item(unsigned index);
</span><ins>+ std::optional<Variant<RefPtr<RadioNodeList>, RefPtr<Element>>> namedItem(const AtomicString&);
+ Vector<AtomicString> supportedPropertyNames() const;
</ins><span class="cx">
</span><span class="cx"> String enctype() const { return m_attributes.encodingType(); }
</span><span class="cx"> WEBCORE_EXPORT void setEnctype(const String&);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFormElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFormElement.idl (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFormElement.idl        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/html/HTMLFormElement.idl        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> [
</span><del>- CustomNamedGetter,
</del><ins>+ LegacyUnenumerableNamedProperties,
</ins><span class="cx"> OverrideBuiltins,
</span><span class="cx"> JSGenerateToNativeObject,
</span><span class="cx"> ] interface HTMLFormElement : HTMLElement {
</span><span class="lines">@@ -26,20 +26,18 @@
</span><span class="cx"> [Reflect=accept_charset] attribute DOMString acceptCharset;
</span><span class="cx"> [Reflect, URL] attribute USVString action;
</span><span class="cx"> attribute DOMString autocomplete;
</span><del>-
</del><span class="cx"> attribute DOMString enctype;
</span><span class="cx"> [ImplementedAs=enctype] attribute DOMString encoding;
</span><span class="cx"> attribute DOMString method;
</span><del>-
</del><span class="cx"> [Reflect] attribute DOMString name;
</span><span class="cx"> [Reflect] attribute boolean noValidate;
</span><span class="cx"> [Reflect] attribute DOMString target;
</span><span class="cx">
</span><span class="cx"> readonly attribute HTMLFormControlsCollection elements;
</span><del>- readonly attribute long length;
</del><ins>+ readonly attribute unsigned long length;
+ getter Element? (unsigned long index);
+ getter (RadioNodeList or Element)? (DOMString name);
</ins><span class="cx">
</span><del>- getter Element (unsigned long index);
-
</del><span class="cx"> [ImplementedAs=submitFromJavaScript] void submit();
</span><span class="cx"> void reset();
</span><span class="cx"> boolean checkValidity();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLSelectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLSelectElement.cpp (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLSelectElement.cpp        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/html/HTMLSelectElement.cpp        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -425,11 +425,18 @@
</span><span class="cx"> return options()->item(index);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-ExceptionOr<void> HTMLSelectElement::setOption(unsigned index, HTMLOptionElement& option)
</del><ins>+ExceptionOr<void> HTMLSelectElement::setItem(unsigned index, HTMLOptionElement* option)
</ins><span class="cx"> {
</span><ins>+ if (!option) {
+ remove(index);
+ return { };
+ }
+
</ins><span class="cx"> if (index > maxSelectItems - 1)
</span><span class="cx"> index = maxSelectItems - 1;
</span><ins>+
</ins><span class="cx"> int diff = index - length();
</span><ins>+
</ins><span class="cx"> RefPtr<HTMLOptionElement> before;
</span><span class="cx"> // Out of array bounds? First insert empty dummies.
</span><span class="cx"> if (diff > 0) {
</span><span class="lines">@@ -441,12 +448,15 @@
</span><span class="cx"> before = item(index + 1);
</span><span class="cx"> remove(index);
</span><span class="cx"> }
</span><ins>+
</ins><span class="cx"> // Finally add the new element.
</span><del>- auto result = add(&option, HTMLElementOrInt { before.get() });
</del><ins>+ auto result = add(option, HTMLElementOrInt { before.get() });
</ins><span class="cx"> if (result.hasException())
</span><span class="cx"> return result;
</span><del>- if (diff >= 0 && option.selected())
- optionSelectionStateChanged(option, true);
</del><ins>+
+ if (diff >= 0 && option->selected())
+ optionSelectionStateChanged(*option, true);
+
</ins><span class="cx"> return { };
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -454,6 +464,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (newLength > maxSelectItems)
</span><span class="cx"> newLength = maxSelectItems;
</span><ins>+
</ins><span class="cx"> int diff = length() - newLength;
</span><span class="cx">
</span><span class="cx"> if (diff < 0) { // Add dummy elements.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLSelectElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLSelectElement.h (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLSelectElement.h        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/html/HTMLSelectElement.h        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -80,7 +80,8 @@
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT void setSize(unsigned);
</span><span class="cx">
</span><del>- ExceptionOr<void> setOption(unsigned index, HTMLOptionElement&);
</del><ins>+ // Called by the bindings for the unnamed index-setter.
+ ExceptionOr<void> setItem(unsigned index, HTMLOptionElement*);
</ins><span class="cx"> ExceptionOr<void> setLength(unsigned);
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT HTMLOptionElement* namedItem(const AtomicString& name);
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.idl (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.idl        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/page/DOMWindow.idl        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> JSCustomMarkFunction,
</span><span class="cx"> JSCustomToNativeObject,
</span><span class="cx"> JSLegacyParent=JSDOMWindowBase,
</span><ins>+ LegacyUnenumerableNamedProperties,
</ins><span class="cx"> PrimaryGlobal,
</span><span class="cx"> ] interface DOMWindow : EventTarget {
</span><span class="cx"> [Replaceable] readonly attribute Screen screen;
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsDOMMimeTypeArrayidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/DOMMimeTypeArray.idl (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/DOMMimeTypeArray.idl        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/plugins/DOMMimeTypeArray.idl        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -20,10 +20,10 @@
</span><span class="cx">
</span><span class="cx"> [
</span><span class="cx"> GenerateIsReachable=ImplFrame,
</span><ins>+ LegacyUnenumerableNamedProperties,
</ins><span class="cx"> InterfaceName=MimeTypeArray,
</span><span class="cx"> ] interface DOMMimeTypeArray {
</span><span class="cx"> readonly attribute unsigned long length;
</span><del>- getter DOMMimeType item(unsigned long index);
- getter DOMMimeType namedItem(DOMString name);
</del><ins>+ getter DOMMimeType? item(unsigned long index);
+ getter DOMMimeType? namedItem(DOMString name);
</ins><span class="cx"> };
</span><del>-
</del></span></pre></div>
<a id="trunkSourceWebCorepluginsDOMPluginidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/DOMPlugin.idl (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/DOMPlugin.idl        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/plugins/DOMPlugin.idl        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -20,12 +20,13 @@
</span><span class="cx">
</span><span class="cx"> [
</span><span class="cx"> InterfaceName=Plugin,
</span><ins>+ LegacyUnenumerableNamedProperties
</ins><span class="cx"> ] interface DOMPlugin {
</span><span class="cx"> readonly attribute DOMString name;
</span><span class="cx"> readonly attribute DOMString filename;
</span><span class="cx"> readonly attribute DOMString description;
</span><span class="cx"> readonly attribute unsigned long length;
</span><del>- getter DOMMimeType item(unsigned long index);
- getter DOMMimeType namedItem(DOMString name);
</del><ins>+ getter DOMMimeType? item(unsigned long index);
+ getter DOMMimeType? namedItem(DOMString name);
</ins><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepluginsDOMPluginArrayidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/plugins/DOMPluginArray.idl (210666 => 210667)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/plugins/DOMPluginArray.idl        2017-01-12 17:52:59 UTC (rev 210666)
+++ trunk/Source/WebCore/plugins/DOMPluginArray.idl        2017-01-12 18:30:53 UTC (rev 210667)
</span><span class="lines">@@ -20,11 +20,12 @@
</span><span class="cx">
</span><span class="cx"> [
</span><span class="cx"> GenerateIsReachable=ImplFrame,
</span><ins>+ LegacyUnenumerableNamedProperties,
</ins><span class="cx"> InterfaceName=PluginArray,
</span><span class="cx"> ] interface DOMPluginArray {
</span><span class="cx"> readonly attribute unsigned long length;
</span><del>- getter DOMPlugin item(unsigned long index);
- getter DOMPlugin namedItem(DOMString name);
</del><ins>+ getter DOMPlugin? item(unsigned long index);
+ getter DOMPlugin? namedItem(DOMString name);
</ins><span class="cx">
</span><span class="cx"> void refresh(optional boolean reload = false);
</span><span class="cx"> };
</span></span></pre>
</div>
</div>
</body>
</html>