<!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>[210780] 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/210780">210780</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-01-15 12:05:20 -0800 (Sun, 15 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>[WebIDL] Remove custom bindings for HTMLInputElement, HTMLFrameElement, HTMLMediaElement and HTMLOptionsCollection
https://bugs.webkit.org/show_bug.cgi?id=167039
Patch by Sam Weinig <sam@webkit.org> on 2017-01-15
Reviewed by Darin Adler.
Source/WebCore:
* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSHTMLFrameElementCustom.cpp: Removed.
* bindings/js/JSHTMLInputElementCustom.cpp: Removed.
* bindings/js/JSHTMLMediaElementCustom.cpp: Removed.
Remove files.
* html/HTMLOptionsCollection.idl:
* bindings/js/JSHTMLOptionsCollectionCustom.cpp:
(WebCore::JSHTMLOptionsCollection::setLength): Deleted.
Remove custom setLength. The bindings generator can handle this now.
* html/HTMLFrameElement.idl:
Resort to match spec. Replace custom annotation for location with SetterCallWith=ScriptState.
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::setLocation):
* html/HTMLFrameElementBase.h:
Add implementation of setLocation.
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::selectionStartForBindings):
(WebCore::HTMLInputElement::setSelectionStartForBindings):
(WebCore::HTMLInputElement::selectionEndForBindings):
(WebCore::HTMLInputElement::setSelectionEndForBindings):
(WebCore::HTMLInputElement::selectionDirectionForBindings):
(WebCore::HTMLInputElement::setSelectionDirectionForBindings):
(WebCore::HTMLInputElement::setSelectionRangeForBindings):
* html/HTMLInputElement.h:
* html/HTMLInputElement.idl:
Add variants of the selection properties that throw using the 'forBindings' suffix to differentiate.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setControllerForBindings):
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::controllerForBindings):
* html/HTMLMediaElement.idl:
Add a variant of the controller property that unsets the media group, using the 'forBindings' suffix to differentiate.
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::setLength):
Match other implementations by ignoring attempts to set large lengths (> 10000) rather than clamping.
LayoutTests:
* fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
* fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
* fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html:
* fast/dom/HTMLSelectElement/select-selectedIndex.html:
Update tests / results now that negative lengths don't throw, but do log due to be converted
to a large number.
* fast/forms/select-max-length-expected.txt:
Update result now that a large length is not clamped, but rather, ignored.</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="#trunkLayoutTestsfastdomHTMLSelectElementselectselectedIndexmultiplehtml">trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLSelectElementselectselectedIndexhtml">trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex.html</a></li>
<li><a href="#trunkLayoutTestsfastformsselectmaxlengthexpectedtxt">trunk/LayoutTests/fast/forms/select-max-length-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectormodelremoteobjectgetpropertiesexpectedtxt">trunk/LayoutTests/inspector/model/remote-object-get-properties-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="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSBindingsAllInOnecpp">trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLOptionsCollectionCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFrameElementidl">trunk/Source/WebCore/html/HTMLFrameElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFrameElementBasecpp">trunk/Source/WebCore/html/HTMLFrameElementBase.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLFrameElementBaseh">trunk/Source/WebCore/html/HTMLFrameElementBase.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementcpp">trunk/Source/WebCore/html/HTMLInputElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementh">trunk/Source/WebCore/html/HTMLInputElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLInputElementidl">trunk/Source/WebCore/html/HTMLInputElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementcpp">trunk/Source/WebCore/html/HTMLMediaElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementh">trunk/Source/WebCore/html/HTMLMediaElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMediaElementidl">trunk/Source/WebCore/html/HTMLMediaElement.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLOptionsCollectionidl">trunk/Source/WebCore/html/HTMLOptionsCollection.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLSelectElementcpp">trunk/Source/WebCore/html/HTMLSelectElement.cpp</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLFrameElementCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLFrameElementCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLInputElementCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLInputElementCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsjsJSHTMLMediaElementCustomcpp">trunk/Source/WebCore/bindings/js/JSHTMLMediaElementCustom.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/LayoutTests/ChangeLog        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2017-01-15 Sam Weinig <sam@webkit.org>
+
+ [WebIDL] Remove custom bindings for HTMLInputElement, HTMLFrameElement, HTMLMediaElement and HTMLOptionsCollection
+ https://bugs.webkit.org/show_bug.cgi?id=167039
+
+ Reviewed by Darin Adler.
+
+ * fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt:
+ * fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt:
+ * fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html:
+ * fast/dom/HTMLSelectElement/select-selectedIndex.html:
+ Update tests / results now that negative lengths don't throw, but do log due to be converted
+ to a large number.
+
+ * fast/forms/select-max-length-expected.txt:
+ Update result now that a large length is not clamped, but rather, ignored.
+
</ins><span class="cx"> 2017-01-14 Yusuke Suzuki <utatane.tea@gmail.com>
</span><span class="cx">
</span><span class="cx"> Annotate large string tests with largeHeap
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLSelectElementselectselectedIndexexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-expected.txt        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><ins>+CONSOLE MESSAGE: line 17: Blocked attempt to expand the option list to 4294967295 items. The maximum number of items allowed is 10000.
</ins><span class="cx">
</span><span class="cx"> 1) setting length to a negative length
</span><del>-PASS mySelect.options.length = -1; threw exception IndexSizeError (DOM Exception 1): The index is not in the allowed range..
</del><span class="cx"> PASS mySelect.options.length is 2
</span><span class="cx"> PASS mySelect.selectedIndex is 1
</span><span class="cx"> 2) setting length to a larger length
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLSelectElementselectselectedIndexmultipleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple-expected.txt        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><ins>+CONSOLE MESSAGE: line 17: Blocked attempt to expand the option list to 4294967295 items. The maximum number of items allowed is 10000.
</ins><span class="cx">
</span><span class="cx"> 1) setting length to a negative length
</span><del>-PASS mySelect.options.length = -1; threw exception IndexSizeError (DOM Exception 1): The index is not in the allowed range..
</del><span class="cx"> PASS mySelect.options.length is 2
</span><span class="cx"> PASS mySelect.selectedIndex is 0
</span><span class="cx"> 2) setting length to a larger length
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLSelectElementselectselectedIndexmultiplehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex-multiple.html        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> var i = 0;
</span><span class="cx">
</span><span class="cx"> debug((++i) + ") setting length to a negative length");
</span><del>-shouldThrow("mySelect.options.length = -1;");
</del><ins>+mySelect.options.length = -1;
</ins><span class="cx"> shouldBe("mySelect.options.length", "2");
</span><span class="cx"> shouldBe("mySelect.selectedIndex", "0");
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLSelectElementselectselectedIndexhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex.html (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex.html        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/LayoutTests/fast/dom/HTMLSelectElement/select-selectedIndex.html        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -14,7 +14,7 @@
</span><span class="cx"> var i = 0;
</span><span class="cx">
</span><span class="cx"> debug((++i) + ") setting length to a negative length");
</span><del>-shouldThrow("mySelect.options.length = -1;");
</del><ins>+mySelect.options.length = -1;
</ins><span class="cx"> shouldBe("mySelect.options.length", "2");
</span><span class="cx"> shouldBe("mySelect.selectedIndex", "1");
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsfastformsselectmaxlengthexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/forms/select-max-length-expected.txt (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/select-max-length-expected.txt        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/LayoutTests/fast/forms/select-max-length-expected.txt        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -1,10 +1,11 @@
</span><ins>+CONSOLE MESSAGE: line 18: Blocked attempt to expand the option list to 20000 items. The maximum number of items allowed is 10000.
</ins><span class="cx"> This test that setting HTMLSelectElement.length is capped to 10,000, but that you can add additional Option elements by calling add.
</span><span class="cx">
</span><span class="cx"> Select length is 0
</span><span class="cx"> Trying: - sel.length = 20000;
</span><del>-Select length is 10000
</del><ins>+Select length is 0
</ins><span class="cx"> Trying: - sel.add(new Option, 0);
</span><del>-Select length is 10001
</del><ins>+Select length is 1
</ins><span class="cx"> Trying: - sel.length = 0;
</span><span class="cx"> Select length is 0
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsinspectormodelremoteobjectgetpropertiesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/model/remote-object-get-properties-expected.txt (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/model/remote-object-get-properties-expected.txt        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/LayoutTests/inspector/model/remote-object-get-properties-expected.txt        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -516,19 +516,19 @@
</span><span class="cx">
</span><span class="cx"> DISPLAYABLE PROPERTIES:
</span><span class="cx"> 0
</span><ins>+ length
</ins><span class="cx"> selectedIndex
</span><del>- length
</del><span class="cx"> __proto__
</span><span class="cx">
</span><span class="cx"> ALL PROPERTIES:
</span><span class="cx"> 0
</span><span class="cx"> constructor
</span><ins>+ length
</ins><span class="cx"> selectedIndex
</span><del>- length
</del><ins>+ add
+ remove
</ins><span class="cx"> item
</span><span class="cx"> namedItem
</span><del>- add
- remove
</del><span class="cx"> toString
</span><span class="cx"> toLocaleString
</span><span class="cx"> valueOf
</span></span></pre></div>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/CMakeLists.txt        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -1124,10 +1124,7 @@
</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/JSHTMLFrameElementCustom.cpp
</del><span class="cx"> bindings/js/JSHTMLFrameSetElementCustom.cpp
</span><del>- bindings/js/JSHTMLInputElementCustom.cpp
- bindings/js/JSHTMLMediaElementCustom.cpp
</del><span class="cx"> bindings/js/JSHTMLObjectElementCustom.cpp
</span><span class="cx"> bindings/js/JSHTMLOptionsCollectionCustom.cpp
</span><span class="cx"> bindings/js/JSHTMLSelectElementCustom.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/ChangeLog        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -1,3 +1,54 @@
</span><ins>+2017-01-15 Sam Weinig <sam@webkit.org>
+
+ [WebIDL] Remove custom bindings for HTMLInputElement, HTMLFrameElement, HTMLMediaElement and HTMLOptionsCollection
+ https://bugs.webkit.org/show_bug.cgi?id=167039
+
+ Reviewed by Darin Adler.
+
+ * CMakeLists.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSBindingsAllInOne.cpp:
+ * bindings/js/JSHTMLFrameElementCustom.cpp: Removed.
+ * bindings/js/JSHTMLInputElementCustom.cpp: Removed.
+ * bindings/js/JSHTMLMediaElementCustom.cpp: Removed.
+ Remove files.
+
+ * html/HTMLOptionsCollection.idl:
+ * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
+ (WebCore::JSHTMLOptionsCollection::setLength): Deleted.
+ Remove custom setLength. The bindings generator can handle this now.
+
+ * html/HTMLFrameElement.idl:
+ Resort to match spec. Replace custom annotation for location with SetterCallWith=ScriptState.
+
+ * html/HTMLFrameElementBase.cpp:
+ (WebCore::HTMLFrameElementBase::setLocation):
+ * html/HTMLFrameElementBase.h:
+ Add implementation of setLocation.
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::selectionStartForBindings):
+ (WebCore::HTMLInputElement::setSelectionStartForBindings):
+ (WebCore::HTMLInputElement::selectionEndForBindings):
+ (WebCore::HTMLInputElement::setSelectionEndForBindings):
+ (WebCore::HTMLInputElement::selectionDirectionForBindings):
+ (WebCore::HTMLInputElement::setSelectionDirectionForBindings):
+ (WebCore::HTMLInputElement::setSelectionRangeForBindings):
+ * html/HTMLInputElement.h:
+ * html/HTMLInputElement.idl:
+ Add variants of the selection properties that throw using the 'forBindings' suffix to differentiate.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::setControllerForBindings):
+ * html/HTMLMediaElement.h:
+ (WebCore::HTMLMediaElement::controllerForBindings):
+ * html/HTMLMediaElement.idl:
+ Add a variant of the controller property that unsets the media group, using the 'forBindings' suffix to differentiate.
+
+ * html/HTMLSelectElement.cpp:
+ (WebCore::HTMLSelectElement::setLength):
+ Match other implementations by ignoring attempts to set large lengths (> 10000) rather than clamping.
+
</ins><span class="cx"> 2017-01-15 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> De-duplicate more (nearly) identical code in Editor(Mac|IOS).mm
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -5211,7 +5211,6 @@
</span><span class="cx">                 BC2CBF7B140F1D58003879BE /* JSWebGLContextEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2CBF7A140F1D58003879BE /* JSWebGLContextEvent.cpp */; };
</span><span class="cx">                 BC2ED5550C6B9BD300920BFF /* JSElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2ED5540C6B9BD300920BFF /* JSElementCustom.cpp */; };
</span><span class="cx">                 BC2ED6BC0C6BD2F000920BFF /* JSAttrCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2ED6BB0C6BD2F000920BFF /* JSAttrCustom.cpp */; };
</span><del>-                BC2ED7A50C6C0F3600920BFF /* JSHTMLFrameElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2ED7A40C6C0F3600920BFF /* JSHTMLFrameElementCustom.cpp */; };
</del><span class="cx">                 BC305C790C076BB300CD20F0 /* JSHTMLObjectElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC305C770C076BB300CD20F0 /* JSHTMLObjectElement.cpp */; };
</span><span class="cx">                 BC305C7A0C076BB300CD20F0 /* JSHTMLObjectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC305C780C076BB300CD20F0 /* JSHTMLObjectElement.h */; };
</span><span class="cx">                 BC305CA40C0781BB00CD20F0 /* JSHTMLObjectElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC305CA30C0781BB00CD20F0 /* JSHTMLObjectElementCustom.cpp */; };
</span><span class="lines">@@ -5445,7 +5444,6 @@
</span><span class="cx">                 BCC0658A0F3CE2A700CD2D87 /* JSClientRectList.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC065860F3CE2A700CD2D87 /* JSClientRectList.h */; };
</span><span class="cx">                 BCC0E8751BFE70E9008F7F50 /* HTMLPictureElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC0E8731BFE70E9008F7F50 /* HTMLPictureElement.cpp */; };
</span><span class="cx">                 BCC0E8761BFE70E9008F7F50 /* HTMLPictureElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC0E8741BFE70E9008F7F50 /* HTMLPictureElement.h */; };
</span><del>-                BCC438780E886CC700533DD5 /* JSHTMLInputElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC438770E886CC700533DD5 /* JSHTMLInputElementCustom.cpp */; };
</del><span class="cx">                 BCC5BE000C0E93110011C2DB /* JSCSSStyleSheet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC5BDFE0C0E93110011C2DB /* JSCSSStyleSheet.cpp */; };
</span><span class="cx">                 BCC5BE010C0E93110011C2DB /* JSCSSStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = BCC5BDFF0C0E93110011C2DB /* JSCSSStyleSheet.h */; };
</span><span class="cx">                 BCCBAD3B0C18BFF800CE890F /* JSHTMLCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCCBAD3A0C18BFF800CE890F /* JSHTMLCollectionCustom.cpp */; };
</span><span class="lines">@@ -5864,7 +5862,6 @@
</span><span class="cx">                 CDCD41E81C3DDB0A00965D99 /* ParsedContentRange.h in Headers */ = {isa = PBXBuildFile; fileRef = CDCD41E61C3DDB0900965D99 /* ParsedContentRange.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 CDCFABBD18C0AF78006F8450 /* SelectionSubtreeRoot.h in Headers */ = {isa = PBXBuildFile; fileRef = CDCFABBB18C0AE31006F8450 /* SelectionSubtreeRoot.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 CDCFABBE18C0AF84006F8450 /* SelectionSubtreeRoot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDCFABBC18C0AF19006F8450 /* SelectionSubtreeRoot.cpp */; };
</span><del>-                CDD525D7145B6DD0008D204D /* JSHTMLMediaElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDF65CCC145B6AFE00C4C7AA /* JSHTMLMediaElementCustom.cpp */; };
</del><span class="cx">                 CDD7089618359F6F002B3DC6 /* SampleMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDD7089418359F6E002B3DC6 /* SampleMap.cpp */; };
</span><span class="cx">                 CDD7089718359F6F002B3DC6 /* SampleMap.h in Headers */ = {isa = PBXBuildFile; fileRef = CDD7089518359F6F002B3DC6 /* SampleMap.h */; };
</span><span class="cx">                 CDDC1E7A18A952F30027A9D4 /* MediaSourcePrivateClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CDDC1E7918A952F30027A9D4 /* MediaSourcePrivateClient.h */; };
</span><span class="lines">@@ -13089,7 +13086,6 @@
</span><span class="cx">                 BC2CBF7A140F1D58003879BE /* JSWebGLContextEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLContextEvent.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BC2ED5540C6B9BD300920BFF /* JSElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSElementCustom.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BC2ED6BB0C6BD2F000920BFF /* JSAttrCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAttrCustom.cpp; sourceTree = "<group>"; };
</span><del>-                BC2ED7A40C6C0F3600920BFF /* JSHTMLFrameElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLFrameElementCustom.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 BC305C770C076BB300CD20F0 /* JSHTMLObjectElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLObjectElement.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BC305C780C076BB300CD20F0 /* JSHTMLObjectElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLObjectElement.h; sourceTree = "<group>"; };
</span><span class="cx">                 BC305CA30C0781BB00CD20F0 /* JSHTMLObjectElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLObjectElementCustom.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -13347,7 +13343,6 @@
</span><span class="cx">                 BCC065860F3CE2A700CD2D87 /* JSClientRectList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSClientRectList.h; sourceTree = "<group>"; };
</span><span class="cx">                 BCC0E8731BFE70E9008F7F50 /* HTMLPictureElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLPictureElement.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BCC0E8741BFE70E9008F7F50 /* HTMLPictureElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLPictureElement.h; sourceTree = "<group>"; };
</span><del>-                BCC438770E886CC700533DD5 /* JSHTMLInputElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLInputElementCustom.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 BCC5BDFE0C0E93110011C2DB /* JSCSSStyleSheet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSStyleSheet.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 BCC5BDFF0C0E93110011C2DB /* JSCSSStyleSheet.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSCSSStyleSheet.h; sourceTree = "<group>"; };
</span><span class="cx">                 BCC8CFCA0986CD2400140BF2 /* ColorData.gperf */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = ColorData.gperf; sourceTree = "<group>"; };
</span><span class="lines">@@ -13895,7 +13890,6 @@
</span><span class="cx">                 CDF4B72D1E03CA4A00E235A2 /* JSMockCDMFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMockCDMFactory.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 CDF4B72E1E03CA4A00E235A2 /* JSMockCDMFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMockCDMFactory.h; sourceTree = "<group>"; };
</span><span class="cx">                 CDF65CC9145B43A700C4C7AA /* MediaControllerInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaControllerInterface.h; sourceTree = "<group>"; };
</span><del>-                CDF65CCC145B6AFE00C4C7AA /* JSHTMLMediaElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLMediaElementCustom.cpp; sourceTree = "<group>"; };
</del><span class="cx">                 CDF7483C18FEBCEC0006ECC0 /* GridPositionsResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GridPositionsResolver.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 CDF7483D18FEBCEC0006ECC0 /* GridPositionsResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GridPositionsResolver.h; sourceTree = "<group>"; };
</span><span class="cx">                 CDFC360118CA61630026E56F /* RemoteCommandListenerIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteCommandListenerIOS.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -22129,10 +22123,7 @@
</span><span class="cx">                                 BC5823F40C0A98DF0053F1B5 /* JSHTMLElementCustom.cpp */,
</span><span class="cx">                                 BC6D44BD0C07EFB60072D2C9 /* JSHTMLEmbedElementCustom.cpp */,
</span><span class="cx">                                 9B1AB07B1648C7C40051F3F2 /* JSHTMLFormControlsCollectionCustom.cpp */,
</span><del>-                                BC2ED7A40C6C0F3600920BFF /* JSHTMLFrameElementCustom.cpp */,
</del><span class="cx">                                 BCD41ABA0C060DE800C0E446 /* JSHTMLFrameSetElementCustom.cpp */,
</span><del>-                                BCC438770E886CC700533DD5 /* JSHTMLInputElementCustom.cpp */,
-                                CDF65CCC145B6AFE00C4C7AA /* JSHTMLMediaElementCustom.cpp */,
</del><span class="cx">                                 BC305CA30C0781BB00CD20F0 /* JSHTMLObjectElementCustom.cpp */,
</span><span class="cx">                                 448AD27A0A4813790023D179 /* JSHTMLOptionsCollectionCustom.cpp */,
</span><span class="cx">                                 BC17F9650B64EBB8004A65CB /* JSHTMLSelectElementCustom.cpp */,
</span><span class="lines">@@ -30023,7 +30014,6 @@
</span><span class="cx">                                 9B1AB07C1648C7C40051F3F2 /* JSHTMLFormControlsCollectionCustom.cpp in Sources */,
</span><span class="cx">                                 A8D064FB0A23C0CC005E7203 /* JSHTMLFormElement.cpp in Sources */,
</span><span class="cx">                                 BC4918C60BFEA050009D6316 /* JSHTMLFrameElement.cpp in Sources */,
</span><del>-                                BC2ED7A50C6C0F3600920BFF /* JSHTMLFrameElementCustom.cpp in Sources */,
</del><span class="cx">                                 BC926F800C0552470082776B /* JSHTMLFrameSetElement.cpp in Sources */,
</span><span class="cx">                                 BCD41ABB0C060DE800C0E446 /* JSHTMLFrameSetElementCustom.cpp in Sources */,
</span><span class="cx">                                 A80E7B140A19D606007FB8C5 /* JSHTMLHeadElement.cpp in Sources */,
</span><span class="lines">@@ -30034,7 +30024,6 @@
</span><span class="cx">                                 BC4918C80BFEA050009D6316 /* JSHTMLIFrameElement.cpp in Sources */,
</span><span class="cx">                                 1AE2AA970A1CDD2D00B42B25 /* JSHTMLImageElement.cpp in Sources */,
</span><span class="cx">                                 A80E7E980A1A83E3007FB8C5 /* JSHTMLInputElement.cpp in Sources */,
</span><del>-                                BCC438780E886CC700533DD5 /* JSHTMLInputElementCustom.cpp in Sources */,
</del><span class="cx">                                 A6148A7812E41E3B0044A784 /* JSHTMLKeygenElement.cpp in Sources */,
</span><span class="cx">                                 1AE2AB210A1CE63B00B42B25 /* JSHTMLLabelElement.cpp in Sources */,
</span><span class="cx">                                 1AE2AB230A1CE63B00B42B25 /* JSHTMLLegendElement.cpp in Sources */,
</span><span class="lines">@@ -30043,7 +30032,6 @@
</span><span class="cx">                                 1AE2AB270A1CE63B00B42B25 /* JSHTMLMapElement.cpp in Sources */,
</span><span class="cx">                                 BC491B780C023EFD009D6316 /* JSHTMLMarqueeElement.cpp in Sources */,
</span><span class="cx">                                 E44614390CD689C700FADA75 /* JSHTMLMediaElement.cpp in Sources */,
</span><del>-                                CDD525D7145B6DD0008D204D /* JSHTMLMediaElementCustom.cpp in Sources */,
</del><span class="cx">                                 1AE2AE5B0A1D26F200B42B25 /* JSHTMLMenuElement.cpp in Sources */,
</span><span class="cx">                                 A80E7A170A19C3D6007FB8C5 /* JSHTMLMetaElement.cpp in Sources */,
</span><span class="cx">                                 A7BBE26611AFB3F20005EA03 /* JSHTMLMeterElement.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSBindingsAllInOnecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -72,10 +72,7 @@
</span><span class="cx"> #include "JSHTMLElementCustom.cpp"
</span><span class="cx"> #include "JSHTMLEmbedElementCustom.cpp"
</span><span class="cx"> #include "JSHTMLFormControlsCollectionCustom.cpp"
</span><del>-#include "JSHTMLFrameElementCustom.cpp"
</del><span class="cx"> #include "JSHTMLFrameSetElementCustom.cpp"
</span><del>-#include "JSHTMLInputElementCustom.cpp"
-#include "JSHTMLMediaElementCustom.cpp"
</del><span class="cx"> #include "JSHTMLObjectElementCustom.cpp"
</span><span class="cx"> #include "JSHTMLOptionsCollectionCustom.cpp"
</span><span class="cx"> #include "JSHTMLSelectElementCustom.cpp"
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLFrameElementCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSHTMLFrameElementCustom.cpp (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLFrameElementCustom.cpp        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/bindings/js/JSHTMLFrameElementCustom.cpp        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -1,52 +0,0 @@
</span><del>-/*
- * Copyright (C) 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.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE 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 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 "JSHTMLFrameElement.h"
-
-#include "Document.h"
-#include "HTMLFrameElement.h"
-#include "HTMLParserIdioms.h"
-#include "JSDOMBinding.h"
-
-using namespace JSC;
-
-namespace WebCore {
-
-void JSHTMLFrameElement::setLocation(ExecState& state, JSValue value)
-{
- HTMLFrameElement& element = wrapped();
- String locationValue = value.isNull() ? String() : value.toWTFString(&state);
- if (protocolIsJavaScript(stripLeadingAndTrailingHTMLSpaces(locationValue))) {
- if (!BindingSecurity::shouldAllowAccessToNode(state, element.contentDocument()))
- return;
- }
- element.setLocation(locationValue);
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLInputElementCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSHTMLInputElementCustom.cpp (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLInputElementCustom.cpp        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/bindings/js/JSHTMLInputElementCustom.cpp        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -1,130 +0,0 @@
</span><del>-/*
- * Copyright (C) 2008, 2016 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 "JSHTMLInputElement.h"
-
-#include "HTMLInputElement.h"
-#include <runtime/Error.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-JSValue JSHTMLInputElement::selectionStart(ExecState& state) const
-{
- VM& vm = state.vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
-
- HTMLInputElement& input = wrapped();
- if (!input.canHaveSelection())
- return throwTypeError(&state, scope);
-
- return jsNumber(input.selectionStart());
-}
-
-void JSHTMLInputElement::setSelectionStart(ExecState& state, JSValue value)
-{
- VM& vm = state.vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
-
- HTMLInputElement& input = wrapped();
- if (!input.canHaveSelection())
- throwTypeError(&state, scope);
-
- input.setSelectionStart(value.toInt32(&state));
-}
-
-JSValue JSHTMLInputElement::selectionEnd(ExecState& state) const
-{
- VM& vm = state.vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
-
- HTMLInputElement& input = wrapped();
- if (!input.canHaveSelection())
- return throwTypeError(&state, scope);
-
- return jsNumber(input.selectionEnd());
-}
-
-void JSHTMLInputElement::setSelectionEnd(ExecState& state, JSValue value)
-{
- VM& vm = state.vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
-
- HTMLInputElement& input = wrapped();
- if (!input.canHaveSelection())
- throwTypeError(&state, scope);
-
- input.setSelectionEnd(value.toInt32(&state));
-}
-
-JSValue JSHTMLInputElement::selectionDirection(ExecState& state) const
-{
- VM& vm = state.vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
-
- HTMLInputElement& input = wrapped();
- if (!input.canHaveSelection())
- return throwTypeError(&state, scope);
-
- return jsStringWithCache(&state, input.selectionDirection());
-}
-
-void JSHTMLInputElement::setSelectionDirection(ExecState& state, JSValue value)
-{
- VM& vm = state.vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
-
- HTMLInputElement& input = wrapped();
- if (!input.canHaveSelection()) {
- throwTypeError(&state, scope);
- return;
- }
-
- input.setSelectionDirection(value.toWTFString(&state));
-}
-
-JSValue JSHTMLInputElement::setSelectionRange(ExecState& state)
-{
- VM& vm = state.vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
-
- if (UNLIKELY(state.argumentCount() < 2))
- return throwException(&state, scope, createNotEnoughArgumentsError(&state));
-
- HTMLInputElement& input = wrapped();
- if (!input.canHaveSelection())
- return throwTypeError(&state, scope);
-
- int start = state.uncheckedArgument(0).toInt32(&state);
- int end = state.uncheckedArgument(1).toInt32(&state);
- String direction = state.argument(2).toWTFString(&state);
-
- input.setSelectionRange(start, end, direction);
- return jsUndefined();
-}
-
-} // namespace WebCore
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLMediaElementCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/bindings/js/JSHTMLMediaElementCustom.cpp (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLMediaElementCustom.cpp        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/bindings/js/JSHTMLMediaElementCustom.cpp        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -1,47 +0,0 @@
</span><del>-/*
- * Copyright (C) 2011 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"
-#if ENABLE(VIDEO)
-
-#include "JSHTMLMediaElement.h"
-
-#include "JSMediaController.h"
-
-namespace WebCore {
-
-using namespace JSC;
-
-void JSHTMLMediaElement::setController(ExecState&, JSValue value)
-{
- // 4.8.10.11.2 Media controllers: controller attribute.
- // On setting, it must first remove the element's mediagroup attribute, if any,
- wrapped().setMediaGroup(String());
- // and then set the current media controller to the given value.
- wrapped().setController(JSMediaController::toWrapped(value));
-}
-
-}
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSHTMLOptionsCollectionCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/bindings/js/JSHTMLOptionsCollectionCustom.cpp        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -31,23 +31,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-void JSHTMLOptionsCollection::setLength(ExecState& state, JSValue value)
-{
- CustomElementReactionStack customElementReactionStack;
- VM& vm = state.vm();
- auto throwScope = DECLARE_THROW_SCOPE(vm);
- double number = value.toNumber(&state);
- RETURN_IF_EXCEPTION(throwScope, void());
- unsigned length;
- if (!std::isfinite(number))
- length = 0;
- else if (number < 0)
- return throwIndexSizeError(state, throwScope);
- else
- length = static_cast<unsigned>(std::min<double>(number, UINT_MAX));
- propagateException(state, throwScope, wrapped().setLength(length));
-}
-
</del><span class="cx"> void JSHTMLOptionsCollection::indexSetter(ExecState* state, unsigned index, JSValue value)
</span><span class="cx"> {
</span><span class="cx"> CustomElementReactionStack customElementReactionStack;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFrameElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFrameElement.idl (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFrameElement.idl        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/html/HTMLFrameElement.idl        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -19,26 +19,23 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> interface HTMLFrameElement : HTMLElement {
</span><ins>+ [Reflect] attribute DOMString name;
+ [Reflect] attribute DOMString scrolling;
+ [Reflect, URL] attribute USVString src;
</ins><span class="cx"> [Reflect] attribute DOMString frameBorder;
</span><span class="cx"> [Reflect, URL] attribute USVString longDesc;
</span><ins>+ [Reflect] attribute boolean noResize;
+ [CheckSecurityForNode] readonly attribute Document contentDocument;
+ readonly attribute DOMWindow contentWindow;
</ins><span class="cx">
</span><span class="cx"> [Reflect, TreatNullAs=EmptyString] attribute DOMString marginHeight;
</span><span class="cx"> [Reflect, TreatNullAs=EmptyString] attribute DOMString marginWidth;
</span><span class="cx">
</span><del>- [Reflect] attribute DOMString name;
- [Reflect] attribute boolean noResize;
- [Reflect] attribute DOMString scrolling;
- [Reflect, URL] attribute USVString src;
-
- [CheckSecurityForNode] readonly attribute Document contentDocument;
-
- readonly attribute DOMWindow contentWindow;
-
</del><span class="cx"> [CheckSecurityForNode, MayThrowException] Document getSVGDocument();
</span><span class="cx">
</span><del>- // FIXME: No other browser has this attribute.
- [CustomSetter] attribute DOMString location;
-
</del><span class="cx"> readonly attribute long width;
</span><span class="cx"> readonly attribute long height;
</span><ins>+
+ // FIXME: No other browser has this attribute.
+ [SetterCallWith=ScriptState] attribute DOMString? location;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFrameElementBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.cpp (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFrameElementBase.cpp        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.cpp        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -32,12 +32,13 @@
</span><span class="cx"> #include "FrameView.h"
</span><span class="cx"> #include "HTMLNames.h"
</span><span class="cx"> #include "HTMLParserIdioms.h"
</span><del>-#include "URL.h"
</del><ins>+#include "JSDOMBinding.h"
</ins><span class="cx"> #include "Page.h"
</span><span class="cx"> #include "RenderWidget.h"
</span><span class="cx"> #include "ScriptController.h"
</span><span class="cx"> #include "Settings.h"
</span><span class="cx"> #include "SubframeLoader.h"
</span><ins>+#include "URL.h"
</ins><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -184,6 +185,16 @@
</span><span class="cx"> openURL(LockHistory::No, LockBackForwardList::No);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void HTMLFrameElementBase::setLocation(JSC::ExecState& state, const String& newLocation)
+{
+ if (protocolIsJavaScript(stripLeadingAndTrailingHTMLSpaces(newLocation))) {
+ if (!BindingSecurity::shouldAllowAccessToNode(state, contentDocument()))
+ return;
+ }
+
+ setLocation(newLocation);
+}
+
</ins><span class="cx"> bool HTMLFrameElementBase::supportsFocus() const
</span><span class="cx"> {
</span><span class="cx"> return true;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLFrameElementBaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLFrameElementBase.h (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLFrameElementBase.h        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/html/HTMLFrameElementBase.h        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -26,6 +26,10 @@
</span><span class="cx"> #include "FrameLoaderTypes.h"
</span><span class="cx"> #include "HTMLFrameOwnerElement.h"
</span><span class="cx">
</span><ins>+namespace JSC {
+class ExecState;
+}
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class HTMLFrameElementBase : public HTMLFrameOwnerElement {
</span><span class="lines">@@ -32,6 +36,7 @@
</span><span class="cx"> public:
</span><span class="cx"> WEBCORE_EXPORT URL location() const;
</span><span class="cx"> WEBCORE_EXPORT void setLocation(const String&);
</span><ins>+ void setLocation(JSC::ExecState&, const String&);
</ins><span class="cx">
</span><span class="cx"> ScrollbarMode scrollingMode() const final { return m_scrolling; }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.cpp        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -1943,6 +1943,66 @@
</span><span class="cx"> return document().focusedElement() != this && style.textOverflow() == TextOverflowEllipsis;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ExceptionOr<int> HTMLInputElement::selectionStartForBindings() const
+{
+ if (!canHaveSelection())
+ return Exception { TypeError };
+
+ return selectionStart();
+}
+
+ExceptionOr<void> HTMLInputElement::setSelectionStartForBindings(int start)
+{
+ if (!canHaveSelection())
+ return Exception { TypeError };
+
+ setSelectionStart(start);
+ return { };
+}
+
+ExceptionOr<int> HTMLInputElement::selectionEndForBindings() const
+{
+ if (!canHaveSelection())
+ return Exception { TypeError };
+
+ return selectionEnd();
+}
+
+ExceptionOr<void> HTMLInputElement::setSelectionEndForBindings(int end)
+{
+ if (!canHaveSelection())
+ return Exception { TypeError };
+
+ setSelectionEnd(end);
+ return { };
+}
+
+ExceptionOr<String> HTMLInputElement::selectionDirectionForBindings() const
+{
+ if (!canHaveSelection())
+ return Exception { TypeError };
+
+ return String { selectionDirection() };
+}
+
+ExceptionOr<void> HTMLInputElement::setSelectionDirectionForBindings(const String& direction)
+{
+ if (!canHaveSelection())
+ return Exception { TypeError };
+
+ setSelectionDirection(direction);
+ return { };
+}
+
+ExceptionOr<void> HTMLInputElement::setSelectionRangeForBindings(int start, int end, const String& direction)
+{
+ if (!canHaveSelection())
+ return Exception { TypeError };
+
+ setSelectionRange(start, end, direction);
+ return { };
+}
+
</ins><span class="cx"> RenderStyle HTMLInputElement::createInnerTextStyle(const RenderStyle& style) const
</span><span class="cx"> {
</span><span class="cx"> auto textBlockStyle = RenderStyle::create();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.h (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.h        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/html/HTMLInputElement.h        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -323,6 +323,17 @@
</span><span class="cx">
</span><span class="cx"> bool shouldTruncateText(const RenderStyle&) const;
</span><span class="cx">
</span><ins>+ ExceptionOr<int> selectionStartForBindings() const;
+ ExceptionOr<void> setSelectionStartForBindings(int);
+
+ ExceptionOr<int> selectionEndForBindings() const;
+ ExceptionOr<void> setSelectionEndForBindings(int);
+
+ ExceptionOr<String> selectionDirectionForBindings() const;
+ ExceptionOr<void> setSelectionDirectionForBindings(const String&);
+
+ ExceptionOr<void> setSelectionRangeForBindings(int start, int end, const String& direction);
+
</ins><span class="cx"> protected:
</span><span class="cx"> HTMLInputElement(const QualifiedName&, Document&, HTMLFormElement*, bool createdByParser);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLInputElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLInputElement.idl (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLInputElement.idl        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/html/HTMLInputElement.idl        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -77,14 +77,14 @@
</span><span class="cx"> readonly attribute NodeList labels;
</span><span class="cx">
</span><span class="cx"> void select();
</span><del>- [Custom] attribute long selectionStart;
- [Custom] attribute long selectionEnd;
- [Custom] attribute DOMString selectionDirection;
</del><ins>+ [ImplementedAs=selectionStartForBindings, GetterMayThrowException, SetterMayThrowException] attribute long selectionStart;
+ [ImplementedAs=selectionEndForBindings, GetterMayThrowException, SetterMayThrowException] attribute long selectionEnd;
+ [ImplementedAs=selectionDirectionForBindings, GetterMayThrowException, SetterMayThrowException] attribute DOMString selectionDirection;
</ins><span class="cx">
</span><span class="cx"> [MayThrowException] void setRangeText(DOMString replacement);
</span><span class="cx"> [MayThrowException] void setRangeText(DOMString replacement, unsigned long start, unsigned long end, optional DOMString selectionMode);
</span><span class="cx">
</span><del>- [Custom] void setSelectionRange(long start, long end, optional DOMString direction);
</del><ins>+ [ImplementedAs=setSelectionRangeForBindings, MayThrowException] void setSelectionRange(long start, long end, optional DOMString direction);
</ins><span class="cx">
</span><span class="cx"> [Reflect] attribute DOMString align;
</span><span class="cx"> [Reflect] attribute DOMString useMap;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.cpp        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -6100,6 +6100,15 @@
</span><span class="cx"> mediaControls()->setMediaController(m_mediaController ? m_mediaController.get() : static_cast<MediaControllerInterface*>(this));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void HTMLMediaElement::setControllerForBindings(MediaController* controller)
+{
+ // 4.8.10.11.2 Media controllers: controller attribute.
+ // On setting, it must first remove the element's mediagroup attribute, if any,
+ setMediaGroup({ });
+ // and then set the current media controller to the given value.
+ setController(controller);
+}
+
</ins><span class="cx"> void HTMLMediaElement::updateMediaController()
</span><span class="cx"> {
</span><span class="cx"> if (m_mediaController)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.h        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -421,6 +421,9 @@
</span><span class="cx"> MediaController* controller() const;
</span><span class="cx"> void setController(RefPtr<MediaController>&&);
</span><span class="cx">
</span><ins>+ MediaController* controllerForBindings() const { return controller(); }
+ void setControllerForBindings(MediaController*);
+
</ins><span class="cx"> void enteredOrExitedFullscreen() { configureMediaControls(); }
</span><span class="cx">
</span><span class="cx"> unsigned long long fileSize() const;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMediaElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMediaElement.idl (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMediaElement.idl        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/html/HTMLMediaElement.idl        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx">
</span><span class="cx"> [Reflect] attribute DOMString mediaGroup;
</span><span class="cx">
</span><del>- [CustomSetter] attribute MediaController controller;
</del><ins>+ [ImplementedAs=controllerForBindings] attribute MediaController? controller;
</ins><span class="cx">
</span><span class="cx"> [Conditional=MEDIA_SOURCE] VideoPlaybackQuality getVideoPlaybackQuality();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLOptionsCollectionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLOptionsCollection.idl (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLOptionsCollection.idl        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/html/HTMLOptionsCollection.idl        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -24,16 +24,15 @@
</span><span class="cx"> GenerateIsReachable=ImplOwnerNodeRoot,
</span><span class="cx"> JSGenerateToNativeObject,
</span><span class="cx"> ] interface HTMLOptionsCollection : HTMLCollection {
</span><ins>+ [CEReactions, SetterMayThrowException] attribute unsigned long length;
+ // [CEReactions] setter void (unsigned long index, HTMLOptionElement? option);
+ [CEReactions, MayThrowException] void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
+ [CEReactions] void remove(long index);
+ [CEReactions] void remove(HTMLOptionElement option); // FIXME: This overload is not in the specification and has been dropped from Blink.
+
</ins><span class="cx"> attribute long selectedIndex;
</span><del>- [CEReactions, CustomSetter, SetterMayThrowException] attribute unsigned long length;
</del><span class="cx">
</span><ins>+ // FIXME: Can these just be inherited from HTMLCollection like in the spec?
</ins><span class="cx"> getter HTMLOptionElement? item(unsigned long index);
</span><span class="cx"> getter HTMLOptionElement? namedItem(DOMString name);
</span><del>-
- [CEReactions, MayThrowException] void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
-
- [CEReactions] void remove(long index);
-
- // FIXME: This overload is not in the specification and has been dropped from Blink.
- [CEReactions] void remove(HTMLOptionElement option);
</del><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLSelectElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLSelectElement.cpp (210779 => 210780)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLSelectElement.cpp        2017-01-15 19:39:39 UTC (rev 210779)
+++ trunk/Source/WebCore/html/HTMLSelectElement.cpp        2017-01-15 20:05:20 UTC (rev 210780)
</span><span class="lines">@@ -462,8 +462,10 @@
</span><span class="cx">
</span><span class="cx"> ExceptionOr<void> HTMLSelectElement::setLength(unsigned newLength)
</span><span class="cx"> {
</span><del>- if (newLength > maxSelectItems)
- newLength = maxSelectItems;
</del><ins>+ if (newLength > length() && newLength > maxSelectItems) {
+ document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, String::format("Blocked attempt to expand the option list to %u items. The maximum number of items allowed is %u.", newLength, maxSelectItems));
+ return { };
+ }
</ins><span class="cx">
</span><span class="cx"> int diff = length() - newLength;
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>