<!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>[186448] releases/WebKitGTK/webkit-2.8</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/186448">186448</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2015-07-07 04:52:49 -0700 (Tue, 07 Jul 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/186265">r186265</a> - REGRESSION (<a href="http://trac.webkit.org/projects/webkit/changeset/178097">r178097</a>): JavaScript TypeError after clicking on compose button in Yahoo Mail
https://bugs.webkit.org/show_bug.cgi?id=146515
&lt;rdar://problem/21348421&gt;

Reviewed by Chris Dumez.

Source/WebCore:

Fixes an issue where extra arguments passed to a Web IDL overloaded function, whose implementation
is generated by the bindings generator script, are not ignored as per the note in section &quot;Interface object [[Call]] method&quot;
of the Web IDL spec, &lt;http://www.w3.org/TR/2012/CR-WebIDL-20120419/&gt; (19 April 2012).

Currently for an overloaded function the JavaScript bindings generator script emits code to
throw a TypeError when it cannot find a candidate function that takes the same number of
arguments as passed by a caller. Prior to the change made in bug #139179 (<a href="http://trac.webkit.org/projects/webkit/changeset/178097">r178097</a>), the
bindings code for HTMLSelectElement.add() was written by hand and ignored extra arguments
that were passed to it. Following this change, the bindings code for HTMLSelectElement.add()
is generated by the bindings generator script. Therefore, we throw a TypeError when Yahoo Mail
calls HTMLSelectElement.add() with extra arguments because the code emitted by the bindings
generator script does not ignore them.

* bindings/scripts/CodeGeneratorJS.pm:
(LengthOfLongestFunctionParameterList): Added. Computes the length of longest overload parameter list.
(GenerateOverloadedFunction): Emit code that ignores more arguments than LengthOfLongestFunctionParameterList().
(GenerateOverloadedConstructorDefinition): Ditto.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod12): Added; expected result for an overloaded
function that takes a variadic number of Blob elements.
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod): Update expected result. The added
if-conditional expression for the IDL declaration overloadedMethod(Blob... blobArgs) is empty
because we do not support overloading of functions with variadic arguments.
(WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors5): Added; expected
result for an overloaded constructors that takes a variadic number of long arguments.
(WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors): Update expected
result. The added if-conditional expression for the IDL declaration Constructor(long... longArgs) is empty
because we do not support overloading of constructors with variadic arguments.
* bindings/scripts/test/TestObj.idl: Added declaration overloadedMethod(Blob...). Also fixed
typo in license block text.
* bindings/scripts/test/TestOverloadedConstructors.idl: Added declaration Constructor(long... longArgs).
Also fixed typo in license block text.

LayoutTests:

Add new sub-tests to LayoutTests/fast/dom/HTMLSelectElement/{add, options-collection-add}.html,
simplify existing test code, share common code, and update expected results.

Additionally, update results for tests in LayoutTests/fast/canvas now that we ignore extra
arguments passed to a Web IDL overloaded function whose implementation is generated by the
bindings generator script.

* fast/canvas/canvas-overloads-drawImage-expected.txt:
* fast/canvas/canvas-overloads-setFillColor-expected.txt:
* fast/canvas/canvas-overloads-setShadow-expected.txt:
* fast/canvas/canvas-overloads-setStrokeColor-expected.txt:
* fast/canvas/script-tests/canvas-overloads-drawImage.js:
* fast/canvas/script-tests/canvas-overloads-setFillColor.js:
* fast/canvas/script-tests/canvas-overloads-setShadow.js:
* fast/canvas/script-tests/canvas-overloads-setStrokeColor.js:
* fast/dom/HTMLSelectElement/add-expected.txt:
* fast/dom/HTMLSelectElement/add.html:
* fast/dom/HTMLSelectElement/options-collection-add-expected.txt:
* fast/dom/HTMLSelectElement/options-collection-add.html:
* fast/dom/HTMLSelectElement/resources/html-select-and-options-collection-utilities.js: Added.
(createSelectElementWithTestData):
(deepCopy):
(createOption):
(createGroup):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsChangeLog">releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasoverloadsdrawImageexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-drawImage-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasoverloadssetFillColorexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-setFillColor-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasoverloadssetShadowexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-setShadow-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasoverloadssetStrokeColorexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-setStrokeColor-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastcanvasscripttestscanvasoverloadsdrawImagejs">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-drawImage.js</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastcanvasscripttestscanvasoverloadssetFillColorjs">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-setFillColor.js</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastcanvasscripttestscanvasoverloadssetShadowjs">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-setShadow.js</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastcanvasscripttestscanvasoverloadssetStrokeColorjs">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-setStrokeColor.js</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastdomHTMLSelectElementaddexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/add-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastdomHTMLSelectElementaddhtml">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/add.html</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastdomHTMLSelectElementoptionscollectionaddexpectedtxt">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/options-collection-add-expected.txt</a></li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastdomHTMLSelectElementoptionscollectionaddhtml">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/options-collection-add.html</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCoreChangeLog">releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCorebindingsscriptsCodeGeneratorJSpm">releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCorebindingsscriptstestJSJSTestObjcpp">releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorscpp">releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCorebindingsscriptstestTestObjidl">releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/TestObj.idl</a></li>
<li><a href="#releasesWebKitGTKwebkit28SourceWebCorebindingsscriptstestTestOverloadedConstructorsidl">releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/TestOverloadedConstructors.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/resources/</li>
<li><a href="#releasesWebKitGTKwebkit28LayoutTestsfastdomHTMLSelectElementresourceshtmlselectandoptionscollectionutilitiesjs">releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/resources/html-select-and-options-collection-utilities.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit28LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/ChangeLog        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2015-07-03  Daniel Bates  &lt;dabates@apple.com&gt;
+
+        REGRESSION (r178097): JavaScript TypeError after clicking on compose button in Yahoo Mail
+        https://bugs.webkit.org/show_bug.cgi?id=146515
+        &lt;rdar://problem/21348421&gt;
+
+        Reviewed by Chris Dumez.
+
+        Add new sub-tests to LayoutTests/fast/dom/HTMLSelectElement/{add, options-collection-add}.html,
+        simplify existing test code, share common code, and update expected results.
+
+        Additionally, update results for tests in LayoutTests/fast/canvas now that we ignore extra
+        arguments passed to a Web IDL overloaded function whose implementation is generated by the
+        bindings generator script.
+
+        * fast/canvas/canvas-overloads-drawImage-expected.txt:
+        * fast/canvas/canvas-overloads-setFillColor-expected.txt:
+        * fast/canvas/canvas-overloads-setShadow-expected.txt:
+        * fast/canvas/canvas-overloads-setStrokeColor-expected.txt:
+        * fast/canvas/script-tests/canvas-overloads-drawImage.js:
+        * fast/canvas/script-tests/canvas-overloads-setFillColor.js:
+        * fast/canvas/script-tests/canvas-overloads-setShadow.js:
+        * fast/canvas/script-tests/canvas-overloads-setStrokeColor.js:
+        * fast/dom/HTMLSelectElement/add-expected.txt:
+        * fast/dom/HTMLSelectElement/add.html:
+        * fast/dom/HTMLSelectElement/options-collection-add-expected.txt:
+        * fast/dom/HTMLSelectElement/options-collection-add.html:
+        * fast/dom/HTMLSelectElement/resources/html-select-and-options-collection-utilities.js: Added.
+        (createSelectElementWithTestData):
+        (deepCopy):
+        (createOption):
+        (createGroup):
+
</ins><span class="cx"> 2015-06-30  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r179168): Characters overlap after resizing the font on the copy-pasted Japanese text
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasoverloadsdrawImageexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-drawImage-expected.txt (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-drawImage-expected.txt        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-drawImage-expected.txt        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -13,8 +13,8 @@
</span><span class="cx"> PASS ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
</span><span class="cx"> PASS ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
</span><span class="cx"> PASS ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0) is undefined
</span><del>-PASS ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
-PASS ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
</del><ins>+PASS ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0) is undefined
+PASS ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) is undefined
</ins><span class="cx"> PASS ctx.drawImage(canvasElement) threw exception TypeError: Not enough arguments.
</span><span class="cx"> PASS ctx.drawImage(canvasElement, 0) threw exception TypeError: Not enough arguments.
</span><span class="cx"> PASS ctx.drawImage(canvasElement, 0, 0) is undefined
</span><span class="lines">@@ -24,8 +24,8 @@
</span><span class="cx"> PASS ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
</span><span class="cx"> PASS ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
</span><span class="cx"> PASS ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0) threw exception Error: IndexSizeError: DOM Exception 1.
</span><del>-PASS ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
-PASS ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
</del><ins>+PASS ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0) threw exception Error: IndexSizeError: DOM Exception 1.
+PASS ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) threw exception Error: IndexSizeError: DOM Exception 1.
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasoverloadssetFillColorexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-setFillColor-expected.txt (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-setFillColor-expected.txt        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-setFillColor-expected.txt        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx"> PASS ctx.setFillColor(0, 0, 0) threw exception TypeError: Type error.
</span><span class="cx"> PASS ctx.setFillColor(0, 0, 0, 0) is undefined
</span><span class="cx"> PASS ctx.setFillColor(0, 0, 0, 0, 0) is undefined
</span><del>-PASS ctx.setFillColor(0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
</del><ins>+PASS ctx.setFillColor(0, 0, 0, 0, 0, 0) is undefined
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasoverloadssetShadowexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-setShadow-expected.txt (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-setShadow-expected.txt        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-setShadow-expected.txt        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx"> PASS ctx.setShadow(0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
</span><span class="cx"> PASS ctx.setShadow(0, 0, 0, 0, 0, 0, 0) is undefined
</span><span class="cx"> PASS ctx.setShadow(0, 0, 0, 0, 0, 0, 0, 0) is undefined
</span><del>-PASS ctx.setShadow(0, 0, 0, 0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
</del><ins>+PASS ctx.setShadow(0, 0, 0, 0, 0, 0, 0, 0, 0) is undefined
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastcanvascanvasoverloadssetStrokeColorexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-setStrokeColor-expected.txt (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-setStrokeColor-expected.txt        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/canvas-overloads-setStrokeColor-expected.txt        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx"> PASS ctx.setStrokeColor(0, 0, 0) threw exception TypeError: Type error.
</span><span class="cx"> PASS ctx.setStrokeColor(0, 0, 0, 0) is undefined
</span><span class="cx"> PASS ctx.setStrokeColor(0, 0, 0, 0, 0) is undefined
</span><del>-PASS ctx.setStrokeColor(0, 0, 0, 0, 0, 0) threw exception TypeError: Type error.
</del><ins>+PASS ctx.setStrokeColor(0, 0, 0, 0, 0, 0) is undefined
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastcanvasscripttestscanvasoverloadsdrawImagejs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-drawImage.js (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-drawImage.js        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-drawImage.js        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -16,8 +16,8 @@
</span><span class="cx"> shouldThrow(&quot;ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0)&quot;, &quot;TypeError&quot;);
</span><span class="cx"> shouldThrow(&quot;ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;TypeError&quot;);
</span><span class="cx"> shouldBe(&quot;ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;undefined&quot;);
</span><del>-shouldThrow(&quot;ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;TypeError&quot;);
-shouldThrow(&quot;ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;TypeError&quot;);
</del><ins>+shouldBe(&quot;ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;undefined&quot;);
+shouldBe(&quot;ctx.drawImage(imageElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;undefined&quot;);
</ins><span class="cx"> 
</span><span class="cx"> var canvasElement = document.createElement(&quot;canvas&quot;);
</span><span class="cx"> shouldThrow(&quot;ctx.drawImage(canvasElement)&quot;, &quot;TypeErrorNotEnoughArguments&quot;);
</span><span class="lines">@@ -29,5 +29,5 @@
</span><span class="cx"> shouldThrow(&quot;ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0)&quot;, &quot;TypeError&quot;);
</span><span class="cx"> shouldThrow(&quot;ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;TypeError&quot;);
</span><span class="cx"> shouldThrow(&quot;ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;'Error: IndexSizeError: DOM Exception 1'&quot;);
</span><del>-shouldThrow(&quot;ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;TypeError&quot;);
-shouldThrow(&quot;ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;TypeError&quot;);
</del><ins>+shouldThrow(&quot;ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;'Error: IndexSizeError: DOM Exception 1'&quot;);
+shouldThrow(&quot;ctx.drawImage(canvasElement, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;'Error: IndexSizeError: DOM Exception 1'&quot;);
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastcanvasscripttestscanvasoverloadssetFillColorjs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-setFillColor.js (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-setFillColor.js        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-setFillColor.js        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -12,4 +12,4 @@
</span><span class="cx"> shouldThrow(&quot;ctx.setFillColor(0, 0, 0)&quot;, &quot;TypeError&quot;);
</span><span class="cx"> shouldBe(&quot;ctx.setFillColor(0, 0, 0, 0)&quot;, &quot;undefined&quot;);
</span><span class="cx"> shouldBe(&quot;ctx.setFillColor(0, 0, 0, 0, 0)&quot;, &quot;undefined&quot;);
</span><del>-shouldThrow(&quot;ctx.setFillColor(0, 0, 0, 0, 0, 0)&quot;, &quot;TypeError&quot;);
</del><ins>+shouldBe(&quot;ctx.setFillColor(0, 0, 0, 0, 0, 0)&quot;, &quot;undefined&quot;);
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastcanvasscripttestscanvasoverloadssetShadowjs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-setShadow.js (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-setShadow.js        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-setShadow.js        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -18,4 +18,4 @@
</span><span class="cx"> shouldThrow(&quot;ctx.setShadow(0, 0, 0, 0, 0, 0)&quot;, &quot;TypeError&quot;);
</span><span class="cx"> shouldBe(&quot;ctx.setShadow(0, 0, 0, 0, 0, 0, 0)&quot;, &quot;undefined&quot;);
</span><span class="cx"> shouldBe(&quot;ctx.setShadow(0, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;undefined&quot;);
</span><del>-shouldThrow(&quot;ctx.setShadow(0, 0, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;TypeError&quot;);
</del><ins>+shouldBe(&quot;ctx.setShadow(0, 0, 0, 0, 0, 0, 0, 0, 0)&quot;, &quot;undefined&quot;);
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastcanvasscripttestscanvasoverloadssetStrokeColorjs"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-setStrokeColor.js (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-setStrokeColor.js        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/canvas/script-tests/canvas-overloads-setStrokeColor.js        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -12,4 +12,4 @@
</span><span class="cx"> shouldThrow(&quot;ctx.setStrokeColor(0, 0, 0)&quot;, &quot;TypeError&quot;);
</span><span class="cx"> shouldBe(&quot;ctx.setStrokeColor(0, 0, 0, 0)&quot;, &quot;undefined&quot;);
</span><span class="cx"> shouldBe(&quot;ctx.setStrokeColor(0, 0, 0, 0, 0)&quot;, &quot;undefined&quot;);
</span><del>-shouldThrow(&quot;ctx.setStrokeColor(0, 0, 0, 0, 0, 0)&quot;, &quot;TypeError&quot;);
</del><ins>+shouldBe(&quot;ctx.setStrokeColor(0, 0, 0, 0, 0, 0)&quot;, &quot;undefined&quot;);
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastdomHTMLSelectElementaddexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/add-expected.txt (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/add-expected.txt        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/add-expected.txt        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -1,43 +1,52 @@
</span><del>-Test select.add() with index parameter
</del><ins>+Test that HTMLSelectElement.add() works when passing an index or an HTML option element as its second argument.
</ins><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-list elements are = 0,1,2
-PASS testAdd1(createOption(&quot;Y1&quot;)) is &quot;0,1,2,Y1&quot;
-PASS testAdd3(createOption(&quot;Y2&quot;), null) is &quot;0,1,2,Y2&quot;
-PASS testAdd3(createOption(&quot;Y3&quot;), 0) is &quot;Y3,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y4&quot;), 1) is &quot;0,Y4,1,2&quot;
-PASS testAdd3(createOption(&quot;Y5&quot;), 2) is &quot;0,1,Y5,2&quot;
-PASS testAdd3(createOption(&quot;Y6&quot;), 3) is &quot;0,1,2,Y6&quot;
-PASS testAdd3(createOption(&quot;Y7&quot;), 100) is &quot;0,1,2,Y7&quot;
-PASS testAdd3(createOption(&quot;Y8&quot;), -100) is &quot;0,1,2,Y8&quot;
-PASS testAdd3(createOption(&quot;Y9&quot;), &quot;0&quot;) is &quot;Y9,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y10&quot;), &quot;1&quot;) is &quot;0,Y10,1,2&quot;
-PASS testAdd3(createOption(&quot;Y11&quot;), &quot;2&quot;) is &quot;0,1,Y11,2&quot;
-PASS testAdd3(createOption(&quot;Y12&quot;), true) is &quot;0,Y12,1,2&quot;
-PASS testAdd3(createOption(&quot;Y13&quot;), false) is &quot;Y13,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y14&quot;), 2147483647) is &quot;0,1,2,Y14&quot;
-PASS testAdd3(createOption(&quot;Y15&quot;), 2147483648) is &quot;0,1,2,Y15&quot;
-PASS testAdd3(createOption(&quot;Y16&quot;), -2147483647) is &quot;0,1,2,Y16&quot;
-PASS testAdd3(createOption(&quot;Y17&quot;), -2147483648) is &quot;0,1,2,Y17&quot;
-PASS testAdd3(createOption(&quot;Y18&quot;), -2147483649) is &quot;0,1,2,Y18&quot;
-PASS testAdd3(createOption(&quot;Y19&quot;), Infinity) is &quot;Y19,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y20&quot;), -Infinity) is &quot;Y20,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y21&quot;), &quot;foo&quot;) is &quot;Y21,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y22&quot;), NaN) is &quot;Y22,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y23&quot;), undefined) is &quot;Y23,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y24&quot;), -2) is &quot;0,1,2,Y24&quot;
-PASS testAdd4(createOption(&quot;Y25&quot;), 0, 1) threw exception TypeError: Type error.
-PASS testAdd4(createOption(&quot;Y25&quot;), mySelect.options[0], 1) threw exception TypeError: Type error.
-list elements are = 0,1,2
-PASS mySelect.add(&quot;foo&quot;) threw exception TypeError: Type error.
-PASS mySelect.add(&quot;foo&quot;, 0) threw exception TypeError: Type error.
-PASS mySelect.add(undefined) threw exception TypeError: Type error.
-PASS mySelect.add(undefined, 0) threw exception TypeError: Type error.
-PASS mySelect.add(null, 0) threw exception TypeError: Type error.
-PASS mySelect.add(null) threw exception TypeError: Type error.
-PASS mySelect.add() threw exception TypeError: Not enough arguments.
</del><ins>+
+Call HTMLSelectElement.add() with zero arguments:
+PASS testAdd() threw exception TypeError: Not enough arguments.
+
+Call HTMLSelectElement.add() with one argument:
+PASS testAdd(createOption(&quot;Y1&quot;)) is &quot;0,1,2,Y1&quot;
+PASS testAdd(&quot;foo&quot;) threw exception TypeError: Type error.
+PASS testAdd(undefined) threw exception TypeError: Type error.
+PASS testAdd(null) threw exception TypeError: Type error.
+
+Call HTMLSelectElement.add() with two arguments:
+PASS testAdd(createOption(&quot;Y2&quot;), null) is &quot;0,1,2,Y2&quot;
+PASS testAdd(createOption(&quot;Y3&quot;), 0) is &quot;Y3,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y4&quot;), 1) is &quot;0,Y4,1,2&quot;
+PASS testAdd(createOption(&quot;Y5&quot;), 2) is &quot;0,1,Y5,2&quot;
+PASS testAdd(createOption(&quot;Y6&quot;), 3) is &quot;0,1,2,Y6&quot;
+PASS testAdd(createOption(&quot;Y7&quot;), 100) is &quot;0,1,2,Y7&quot;
+PASS testAdd(createOption(&quot;Y8&quot;), -100) is &quot;0,1,2,Y8&quot;
+PASS testAdd(createOption(&quot;Y9&quot;), &quot;0&quot;) is &quot;Y9,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y10&quot;), &quot;1&quot;) is &quot;0,Y10,1,2&quot;
+PASS testAdd(createOption(&quot;Y11&quot;), &quot;2&quot;) is &quot;0,1,Y11,2&quot;
+PASS testAdd(createOption(&quot;Y12&quot;), true) is &quot;0,Y12,1,2&quot;
+PASS testAdd(createOption(&quot;Y13&quot;), false) is &quot;Y13,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y14&quot;), 2147483647) is &quot;0,1,2,Y14&quot;
+PASS testAdd(createOption(&quot;Y15&quot;), 2147483648) is &quot;0,1,2,Y15&quot;
+PASS testAdd(createOption(&quot;Y16&quot;), -2147483647) is &quot;0,1,2,Y16&quot;
+PASS testAdd(createOption(&quot;Y17&quot;), -2147483648) is &quot;0,1,2,Y17&quot;
+PASS testAdd(createOption(&quot;Y18&quot;), -2147483649) is &quot;0,1,2,Y18&quot;
+PASS testAdd(createOption(&quot;Y19&quot;), Infinity) is &quot;Y19,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y20&quot;), -Infinity) is &quot;Y20,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y21&quot;), &quot;foo&quot;) is &quot;Y21,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y22&quot;), NaN) is &quot;Y22,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y23&quot;), undefined) is &quot;Y23,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y24&quot;), -2) is &quot;0,1,2,Y24&quot;
+PASS testAdd(createOption(&quot;X&quot;), mySelect.options[0]) is &quot;X,0,1,2&quot;
+PASS testAdd(createOption(&quot;X&quot;), mySelect.options[1]) is &quot;0,X,1,2&quot;
+PASS testAdd(createOption(&quot;X&quot;), mySelect.options[2]) is &quot;0,1,X,2&quot;
+PASS testAdd(&quot;foo&quot;, 0) threw exception TypeError: Type error.
+PASS testAdd(undefined, 0) threw exception TypeError: Type error.
+PASS testAdd(null, 0) threw exception TypeError: Type error.
+
+Call HTMLSelectElement.add() with three arguments (when it only takes two arguments):
+PASS testAdd(createOption(&quot;X&quot;), 0, &quot;unnecessary extra argument - should be ignored&quot;) is &quot;X,0,1,2&quot;
+PASS testAdd(createOption(&quot;X&quot;), mySelect.options[1], &quot;unnecessary extra argument - should be ignored&quot;) is &quot;0,X,1,2&quot;
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastdomHTMLSelectElementaddhtml"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/add.html (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/add.html        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/add.html        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -2,87 +2,65 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
</span><ins>+&lt;script src=&quot;resources/html-select-and-options-collection-utilities.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-description('Test select.add() with index parameter');
-        
-var mySelect;
</del><ins>+description(&quot;Test that HTMLSelectElement.add() works when passing an index or an HTML option element as its second argument.&quot;);
</ins><span class="cx"> 
</span><del>-function resetSelection() {
-    mySelect = document.createElement('select');
-    mySelect.appendChild(new Option(&quot;0&quot;, &quot;0&quot;, false, false));
-    mySelect.appendChild(new Option(&quot;1&quot;, &quot;1&quot;, false, false));
-    mySelect.appendChild(new Option(&quot;2&quot;, &quot;2&quot;, false, false));
-}
</del><ins>+var mySelect = createSelectElementWithTestData();
</ins><span class="cx"> 
</span><del>-function deepCopy() {
-    var copy = [];
-    for(var i = 0; i &lt; mySelect.options.length; ++i)
-        copy.push(mySelect.options[i].value);
-    return copy.join(&quot;,&quot;);
</del><ins>+function testAdd()
+{
+    HTMLSelectElement.prototype.add.apply(mySelect, arguments);
+    var result = deepCopy(mySelect);
+    mySelect = createSelectElementWithTestData(); // Reset
+    return result;
</ins><span class="cx"> }
</span><del>-        
-function createOption(value) {
-    return new Option(value + &quot;X&quot;, value, false, false);
-}
</del><span class="cx"> 
</span><del>-function testAdd1(element) {
-    resetSelection();
-    mySelect.add(element);
-    return deepCopy();
-}
</del><ins>+debug(&quot;&lt;br&gt;Call HTMLSelectElement.add() with zero arguments:&quot;);
+shouldThrow(&quot;testAdd()&quot;);
</ins><span class="cx"> 
</span><del>-function testAdd3(newelement, index) {
-    resetSelection();
-    mySelect.add(newelement, index);
-    return deepCopy();
-}
</del><ins>+debug(&quot;&lt;br&gt;Call HTMLSelectElement.add() with one argument:&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y1&quot;))', &quot;0,1,2,Y1&quot;);
+shouldThrow('testAdd(&quot;foo&quot;)');
+shouldThrow(&quot;testAdd(undefined)&quot;);
+shouldThrow(&quot;testAdd(null)&quot;);
</ins><span class="cx"> 
</span><del>-function testAdd4(newelement, element, index) {
-    resetSelection();
-    mySelect.add(newelement, element, index);
-    return deepCopy();
-}
</del><ins>+debug(&quot;&lt;br&gt;Call HTMLSelectElement.add() with two arguments:&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y2&quot;), null)', &quot;0,1,2,Y2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y3&quot;), 0)', &quot;Y3,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y4&quot;), 1)', &quot;0,Y4,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y5&quot;), 2)', &quot;0,1,Y5,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y6&quot;), 3)', &quot;0,1,2,Y6&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y7&quot;), 100)', &quot;0,1,2,Y7&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y8&quot;), -100)', &quot;0,1,2,Y8&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y9&quot;), &quot;0&quot;)', &quot;Y9,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y10&quot;), &quot;1&quot;)', &quot;0,Y10,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y11&quot;), &quot;2&quot;)', &quot;0,1,Y11,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y12&quot;), true)', &quot;0,Y12,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y13&quot;), false)', &quot;Y13,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y14&quot;), 2147483647)', &quot;0,1,2,Y14&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y15&quot;), 2147483648)', &quot;0,1,2,Y15&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y16&quot;), -2147483647)', &quot;0,1,2,Y16&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y17&quot;), -2147483648)', &quot;0,1,2,Y17&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y18&quot;), -2147483649)', &quot;0,1,2,Y18&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y19&quot;), Infinity)', &quot;Y19,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y20&quot;), -Infinity)', &quot;Y20,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y21&quot;), &quot;foo&quot;)', &quot;Y21,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y22&quot;), NaN)', &quot;Y22,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y23&quot;), undefined)', &quot;Y23,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y24&quot;), -2)', &quot;0,1,2,Y24&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;X&quot;), mySelect.options[0])', &quot;X,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;X&quot;), mySelect.options[1])', &quot;0,X,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;X&quot;), mySelect.options[2])', &quot;0,1,X,2&quot;);
+shouldThrow('testAdd(&quot;foo&quot;, 0)', &quot;'TypeError: Type error'&quot;);
+shouldThrow('testAdd(undefined, 0)', &quot;'TypeError: Type error'&quot;);
+shouldThrow('testAdd(null, 0)', &quot;'TypeError: Type error'&quot;);
</ins><span class="cx"> 
</span><del>-resetSelection();
-debug('list elements are = ' + deepCopy());
-shouldBeEqualToString('testAdd1(createOption(&quot;Y1&quot;))', '0,1,2,Y1');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y2&quot;), null)', '0,1,2,Y2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y3&quot;), 0)', 'Y3,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y4&quot;), 1)', '0,Y4,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y5&quot;), 2)', '0,1,Y5,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y6&quot;), 3)', '0,1,2,Y6');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y7&quot;), 100)', '0,1,2,Y7');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y8&quot;), -100)', '0,1,2,Y8');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y9&quot;), &quot;0&quot;)', 'Y9,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y10&quot;), &quot;1&quot;)', '0,Y10,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y11&quot;), &quot;2&quot;)', '0,1,Y11,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y12&quot;), true)', '0,Y12,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y13&quot;), false)', 'Y13,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y14&quot;), 2147483647)', '0,1,2,Y14');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y15&quot;), 2147483648)', '0,1,2,Y15');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y16&quot;), -2147483647)', '0,1,2,Y16');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y17&quot;), -2147483648)', '0,1,2,Y17');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y18&quot;), -2147483649)', '0,1,2,Y18');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y19&quot;), Infinity)', 'Y19,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y20&quot;), -Infinity)', 'Y20,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y21&quot;), &quot;foo&quot;)', 'Y21,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y22&quot;), NaN)', 'Y22,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y23&quot;), undefined)', 'Y23,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y24&quot;), -2)','0,1,2,Y24');
-shouldThrow('testAdd4(createOption(&quot;Y25&quot;), 0, 1)');
-shouldThrow('testAdd4(createOption(&quot;Y25&quot;), mySelect.options[0], 1)');
-resetSelection();
-debug('list elements are = ' + deepCopy());
-shouldThrow('mySelect.add(&quot;foo&quot;)');
-shouldThrow('mySelect.add(&quot;foo&quot;, 0)');
-shouldThrow('mySelect.add(undefined)');
-shouldThrow('mySelect.add(undefined, 0)');
-shouldThrow('mySelect.add(null, 0)');
-shouldThrow('mySelect.add(null)');
-shouldThrow('mySelect.add()');
-        
</del><ins>+debug(&quot;&lt;br&gt;Call HTMLSelectElement.add() with three arguments (when it only takes two arguments):&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;X&quot;), 0, &quot;unnecessary extra argument - should be ignored&quot;)', &quot;X,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;X&quot;), mySelect.options[1], &quot;unnecessary extra argument - should be ignored&quot;)', &quot;0,X,1,2&quot;);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastdomHTMLSelectElementoptionscollectionaddexpectedtxt"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/options-collection-add-expected.txt (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/options-collection-add-expected.txt        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/options-collection-add-expected.txt        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -3,55 +3,63 @@
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-list elements are = 0,1,2
-PASS testAdd3(createGroup(&quot;Y1&quot;, &quot;Y2&quot;), null) is &quot;0,1,2,Y1,Y2&quot;
-PASS testAdd3(createGroup(&quot;Y3&quot;, &quot;Y4&quot;), 0) is &quot;Y3,Y4,0,1,2&quot;
-PASS testAdd3(createGroup(&quot;Y5&quot;, &quot;Y6&quot;), 2) is &quot;0,1,Y5,Y6,2&quot;
-PASS testAdd1(createGroup(&quot;Y7&quot;, &quot;Y8&quot;)) is &quot;0,1,2,Y7,Y8&quot;
-PASS testAdd1(createOption(&quot;Y9&quot;)) is &quot;0,1,2,Y9&quot;
-list elements are = 0,1,2
-PASS testAdd2(createOption(&quot;Y10&quot;), mySelect.options[2]) is &quot;0,1,Y10,2&quot;
-PASS testAdd2(createOption(&quot;Y11&quot;), mySelect.options[1]) is &quot;0,Y11,1,Y10,2&quot;
-list elements are = 0,1,2
-PASS testAdd2(createGroup(&quot;Y12&quot;, &quot;Y13&quot;), mySelect.options[1]) is &quot;0,Y12,Y13,1,2&quot;
-PASS testAdd2(createGroup(&quot;Y14&quot;, &quot;Y15&quot;), mySelect.options[3]) is &quot;0,Y12,Y13,Y14,Y15,1,2&quot;
-list elements are = 0,1,2
-PASS testAdd2(createOption(&quot;Y16&quot;), createOption(&quot;Y17&quot;)) threw exception Error: NotFoundError: DOM Exception 8.
-list elements are = 0,1,2
-PASS testAdd1(createOption(&quot;Y1&quot;)) is &quot;0,1,2,Y1&quot;
-PASS testAdd3(createOption(&quot;Y2&quot;), null) is &quot;0,1,2,Y2&quot;
-PASS testAdd3(createOption(&quot;Y3&quot;), 0) is &quot;Y3,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y4&quot;), 1) is &quot;0,Y4,1,2&quot;
-PASS testAdd3(createOption(&quot;Y5&quot;), 2) is &quot;0,1,Y5,2&quot;
-PASS testAdd3(createOption(&quot;Y6&quot;), 3) is &quot;0,1,2,Y6&quot;
-PASS testAdd3(createOption(&quot;Y7&quot;), 100) is &quot;0,1,2,Y7&quot;
-PASS testAdd3(createOption(&quot;Y8&quot;), -100) is &quot;0,1,2,Y8&quot;
-PASS testAdd3(createOption(&quot;Y9&quot;), &quot;0&quot;) is &quot;Y9,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y10&quot;), &quot;1&quot;) is &quot;0,Y10,1,2&quot;
-PASS testAdd3(createOption(&quot;Y11&quot;), &quot;2&quot;) is &quot;0,1,Y11,2&quot;
-PASS testAdd3(createOption(&quot;Y12&quot;), true) is &quot;0,Y12,1,2&quot;
-PASS testAdd3(createOption(&quot;Y13&quot;), false) is &quot;Y13,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y14&quot;), 2147483647) is &quot;0,1,2,Y14&quot;
-PASS testAdd3(createOption(&quot;Y15&quot;), 2147483648) is &quot;0,1,2,Y15&quot;
-PASS testAdd3(createOption(&quot;Y16&quot;), -2147483647) is &quot;0,1,2,Y16&quot;
-PASS testAdd3(createOption(&quot;Y17&quot;), -2147483648) is &quot;0,1,2,Y17&quot;
-PASS testAdd3(createOption(&quot;Y18&quot;), -2147483649) is &quot;0,1,2,Y18&quot;
-PASS testAdd3(createOption(&quot;Y19&quot;), Infinity) is &quot;Y19,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y20&quot;), -Infinity) is &quot;Y20,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y21&quot;), &quot;foo&quot;) is &quot;Y21,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y22&quot;), NaN) is &quot;Y22,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y23&quot;), undefined) is &quot;Y23,0,1,2&quot;
-PASS testAdd3(createOption(&quot;Y24&quot;), -2) is &quot;0,1,2,Y24&quot;
-PASS testAdd4(createOption(&quot;Y25&quot;), 0, 1) threw exception TypeError: Type error.
-PASS testAdd4(createOption(&quot;Y25&quot;), mySelect.options[0], 1) threw exception TypeError: Type error.
-list elements are = 0,1,2
-PASS mySelect.options.add(&quot;foo&quot;) threw exception TypeError: Type error.
-PASS mySelect.options.add(&quot;foo&quot;, 0) threw exception TypeError: Type error.
-PASS mySelect.options.add(undefined) threw exception TypeError: Type error.
-PASS mySelect.options.add(undefined, 0) threw exception TypeError: Type error.
-PASS mySelect.options.add(null, 0) threw exception TypeError: Type error.
-PASS mySelect.options.add(null) threw exception TypeError: Type error.
-PASS mySelect.options.add() threw exception TypeError: Not enough arguments.
</del><ins>+
+Call HTMLOptionsCollection.add() with zero arguments:
+PASS testAdd() threw exception TypeError: Not enough arguments.
+
+Call HTMLOptionsCollection.add() with only one argument:
+PASS testAdd(createOption(&quot;Y9&quot;)) is &quot;0,1,2,Y9&quot;
+PASS testAdd(&quot;foo&quot;) threw exception TypeError: Type error.
+PASS testAdd(undefined) threw exception TypeError: Type error.
+PASS testAdd(null) threw exception TypeError: Type error.
+
+Call HTMLOptionsCollection.add() with two arguments:
+PASS testAdd(createGroup(&quot;Y1&quot;, &quot;Y2&quot;), null) is &quot;0,1,2,Y1,Y2&quot;
+PASS testAdd(createGroup(&quot;Y3&quot;, &quot;Y4&quot;), 0) is &quot;Y3,Y4,0,1,2&quot;
+PASS testAdd(createGroup(&quot;Y5&quot;, &quot;Y6&quot;), 2) is &quot;0,1,Y5,Y6,2&quot;
+PASS testAdd(createGroup(&quot;Y7&quot;, &quot;Y8&quot;)) is &quot;0,1,2,Y7,Y8&quot;
+PASS testAddWithoutResettingListOptions(createOption(&quot;Y10&quot;), mySelect.options[2]) is &quot;0,1,Y10,2&quot;
+PASS testAdd(createOption(&quot;Y11&quot;), mySelect.options[1]) is &quot;0,Y11,1,Y10,2&quot;
+PASS testAddWithoutResettingListOptions(createGroup(&quot;Y12&quot;, &quot;Y13&quot;), mySelect.options[1]) is &quot;0,Y12,Y13,1,2&quot;
+PASS testAdd(createGroup(&quot;Y14&quot;, &quot;Y15&quot;), mySelect.options[3]) is &quot;0,Y12,Y13,Y14,Y15,1,2&quot;
+PASS testAdd(createOption(&quot;Y16&quot;), createOption(&quot;Y17&quot;)) threw exception Error: NotFoundError: DOM Exception 8.
+PASS testAdd(createOption(&quot;Y1&quot;)) is &quot;0,1,2,Y1&quot;
+PASS testAdd(createOption(&quot;Y2&quot;), null) is &quot;0,1,2,Y2&quot;
+PASS testAdd(createOption(&quot;Y3&quot;), 0) is &quot;Y3,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y4&quot;), 1) is &quot;0,Y4,1,2&quot;
+PASS testAdd(createOption(&quot;Y5&quot;), 2) is &quot;0,1,Y5,2&quot;
+PASS testAdd(createOption(&quot;Y6&quot;), 3) is &quot;0,1,2,Y6&quot;
+PASS testAdd(createOption(&quot;Y7&quot;), 100) is &quot;0,1,2,Y7&quot;
+PASS testAdd(createOption(&quot;Y8&quot;), -100) is &quot;0,1,2,Y8&quot;
+PASS testAdd(createOption(&quot;Y9&quot;), &quot;0&quot;) is &quot;Y9,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y10&quot;), &quot;1&quot;) is &quot;0,Y10,1,2&quot;
+PASS testAdd(createOption(&quot;Y11&quot;), &quot;2&quot;) is &quot;0,1,Y11,2&quot;
+PASS testAdd(createOption(&quot;Y12&quot;), true) is &quot;0,Y12,1,2&quot;
+PASS testAdd(createOption(&quot;Y13&quot;), false) is &quot;Y13,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y14&quot;), 2147483647) is &quot;0,1,2,Y14&quot;
+PASS testAdd(createOption(&quot;Y15&quot;), 2147483648) is &quot;0,1,2,Y15&quot;
+PASS testAdd(createOption(&quot;Y16&quot;), -2147483647) is &quot;0,1,2,Y16&quot;
+PASS testAdd(createOption(&quot;Y17&quot;), -2147483648) is &quot;0,1,2,Y17&quot;
+PASS testAdd(createOption(&quot;Y18&quot;), -2147483649) is &quot;0,1,2,Y18&quot;
+PASS testAdd(createOption(&quot;Y19&quot;), Infinity) is &quot;Y19,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y20&quot;), -Infinity) is &quot;Y20,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y21&quot;), &quot;foo&quot;) is &quot;Y21,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y22&quot;), NaN) is &quot;Y22,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y23&quot;), undefined) is &quot;Y23,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y24&quot;), -2) is &quot;0,1,2,Y24&quot;
+PASS testAdd(createOption(&quot;X&quot;), mySelect.options[0]) is &quot;X,0,1,2&quot;
+PASS testAdd(createOption(&quot;X&quot;), mySelect.options[1]) is &quot;0,X,1,2&quot;
+PASS testAdd(createOption(&quot;X&quot;), mySelect.options[2]) is &quot;0,1,X,2&quot;
+PASS testAdd(createOption(&quot;Y25&quot;), 0, 1) is &quot;Y25,0,1,2&quot;
+PASS testAdd(createOption(&quot;Y25&quot;), mySelect.options[0], 1) is &quot;Y25,0,1,2&quot;
+PASS testAdd(&quot;foo&quot;, 0) threw exception TypeError: Type error.
+PASS testAdd(undefined, 0) threw exception TypeError: Type error.
+PASS testAdd(null, 0) threw exception TypeError: Type error.
+
+Call HTMLOptionsCollection.add() with three arguments (when it only takes two arguments):
+PASS testAdd(createOption(&quot;X&quot;), 0, &quot;unnecessary extra argument - should be ignored&quot;) is &quot;X,0,1,2&quot;
+PASS testAdd(createOption(&quot;X&quot;), mySelect.options[1], &quot;unnecessary extra argument - should be ignored&quot;) is &quot;0,X,1,2&quot;
+PASS testAdd(createGroup(&quot;G1&quot;, &quot;G2&quot;), 1, &quot;unnecessary extra argument - should be ignored&quot;) is &quot;0,G1,G2,1,2&quot;
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastdomHTMLSelectElementoptionscollectionaddhtml"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/options-collection-add.html (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/options-collection-add.html        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/options-collection-add.html        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -2,117 +2,88 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test.js&quot;&gt;&lt;/script&gt;
</span><ins>+&lt;script src=&quot;resources/html-select-and-options-collection-utilities.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> description('Test select.options.add() with optgroup and with index parameter');
</span><del>-        
-var mySelect;
</del><span class="cx"> 
</span><del>-function resetSelection() {
-    mySelect = document.createElement('select');
-    mySelect.appendChild(new Option(&quot;0&quot;, &quot;0&quot;, false, false));
-    mySelect.appendChild(new Option(&quot;1&quot;, &quot;1&quot;, false, false));
-    mySelect.appendChild(new Option(&quot;2&quot;, &quot;2&quot;, false, false));
-}
</del><ins>+var mySelect = createSelectElementWithTestData();
</ins><span class="cx"> 
</span><del>-function deepCopy() {
-    var copy = [];
-    for(var i = 0; i &lt; mySelect.options.length; ++i)
-        copy.push(mySelect.options[i].value);
-    return copy.join(&quot;,&quot;);
</del><ins>+function testAdd()
+{
+    HTMLOptionsCollection.prototype.add.apply(mySelect.options, arguments);
+    var result = deepCopy(mySelect);
+    mySelect = createSelectElementWithTestData(); // Reset
+    return result;
</ins><span class="cx"> }
</span><del>-        
-function createOption(value) {
-    return new Option(value + &quot;X&quot;, value, false, false);
-}
</del><span class="cx"> 
</span><del>-function createGroup(value1, value2) {
-    var group = document.createElement('optgroup');
-    group.appendChild(new Option(value1 + &quot;X&quot;, value1, false, false));
-    group.appendChild(new Option(value2 + &quot;Y&quot;, value2, false, false));
-    return group;
</del><ins>+function testAddWithoutResettingListOptions()
+{
+    HTMLOptionsCollection.prototype.add.apply(mySelect.options, arguments);
+    return deepCopy(mySelect);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function testAdd1(element) {
-    resetSelection();
-    mySelect.options.add(element);
-    return deepCopy();
-}
</del><ins>+debug(&quot;&lt;br&gt;Call HTMLOptionsCollection.add() with zero arguments:&quot;);
+shouldThrow(&quot;testAdd()&quot;);
</ins><span class="cx"> 
</span><del>-function testAdd2(newelement, element) {
-    mySelect.options.add(newelement, element);
-    return deepCopy();
-}
</del><ins>+debug(&quot;&lt;br&gt;Call HTMLOptionsCollection.add() with only one argument:&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y9&quot;))', &quot;0,1,2,Y9&quot;);
+shouldThrow('testAdd(&quot;foo&quot;)');
+shouldThrow(&quot;testAdd(undefined)&quot;);
+shouldThrow(&quot;testAdd(null)&quot;);
</ins><span class="cx"> 
</span><del>-function testAdd3(newelement, index) {
-    resetSelection();
-    mySelect.options.add(newelement, index);
-    return deepCopy();
-}
</del><ins>+debug(&quot;&lt;br&gt;Call HTMLOptionsCollection.add() with two arguments:&quot;);
+shouldBeEqualToString('testAdd(createGroup(&quot;Y1&quot;, &quot;Y2&quot;), null)', &quot;0,1,2,Y1,Y2&quot;);
+shouldBeEqualToString('testAdd(createGroup(&quot;Y3&quot;, &quot;Y4&quot;), 0)', &quot;Y3,Y4,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createGroup(&quot;Y5&quot;, &quot;Y6&quot;), 2)', &quot;0,1,Y5,Y6,2&quot;);
+shouldBeEqualToString('testAdd(createGroup(&quot;Y7&quot;, &quot;Y8&quot;))', &quot;0,1,2,Y7,Y8&quot;);
</ins><span class="cx"> 
</span><del>-function testAdd4(newelement, element, index) {
-    resetSelection();
-    mySelect.options.add(newelement, element, index);
-    return deepCopy();
-}
</del><ins>+shouldBeEqualToString('testAddWithoutResettingListOptions(createOption(&quot;Y10&quot;), mySelect.options[2])', &quot;0,1,Y10,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y11&quot;), mySelect.options[1])', &quot;0,Y11,1,Y10,2&quot;);
</ins><span class="cx"> 
</span><del>-resetSelection();
-debug('list elements are = ' + deepCopy());
-shouldBeEqualToString('testAdd3(createGroup(&quot;Y1&quot;, &quot;Y2&quot;), null)', '0,1,2,Y1,Y2');
-shouldBeEqualToString('testAdd3(createGroup(&quot;Y3&quot;, &quot;Y4&quot;), 0)', 'Y3,Y4,0,1,2');
-shouldBeEqualToString('testAdd3(createGroup(&quot;Y5&quot;, &quot;Y6&quot;), 2)', '0,1,Y5,Y6,2');
-shouldBeEqualToString('testAdd1(createGroup(&quot;Y7&quot;, &quot;Y8&quot;))', '0,1,2,Y7,Y8');
-shouldBeEqualToString('testAdd1(createOption(&quot;Y9&quot;))', '0,1,2,Y9');
-resetSelection();
-debug('list elements are = ' + deepCopy());
-shouldBeEqualToString('testAdd2(createOption(&quot;Y10&quot;), mySelect.options[2])', '0,1,Y10,2');
-shouldBeEqualToString('testAdd2(createOption(&quot;Y11&quot;), mySelect.options[1])', '0,Y11,1,Y10,2');
-resetSelection();
-debug('list elements are = ' + deepCopy());
-shouldBeEqualToString('testAdd2(createGroup(&quot;Y12&quot;, &quot;Y13&quot;), mySelect.options[1])', '0,Y12,Y13,1,2');
-shouldBeEqualToString('testAdd2(createGroup(&quot;Y14&quot;, &quot;Y15&quot;), mySelect.options[3])', '0,Y12,Y13,Y14,Y15,1,2');
-resetSelection();
-debug('list elements are = ' + deepCopy());
-shouldThrow('testAdd2(createOption(&quot;Y16&quot;), createOption(&quot;Y17&quot;))');
-resetSelection();
-debug('list elements are = ' + deepCopy());
-shouldBeEqualToString('testAdd1(createOption(&quot;Y1&quot;))', '0,1,2,Y1');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y2&quot;), null)', '0,1,2,Y2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y3&quot;), 0)', 'Y3,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y4&quot;), 1)', '0,Y4,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y5&quot;), 2)', '0,1,Y5,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y6&quot;), 3)', '0,1,2,Y6');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y7&quot;), 100)', '0,1,2,Y7');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y8&quot;), -100)', '0,1,2,Y8');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y9&quot;), &quot;0&quot;)', 'Y9,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y10&quot;), &quot;1&quot;)', '0,Y10,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y11&quot;), &quot;2&quot;)', '0,1,Y11,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y12&quot;), true)', '0,Y12,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y13&quot;), false)', 'Y13,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y14&quot;), 2147483647)', '0,1,2,Y14');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y15&quot;), 2147483648)', '0,1,2,Y15');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y16&quot;), -2147483647)', '0,1,2,Y16');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y17&quot;), -2147483648)', '0,1,2,Y17');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y18&quot;), -2147483649)', '0,1,2,Y18');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y19&quot;), Infinity)', 'Y19,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y20&quot;), -Infinity)', 'Y20,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y21&quot;), &quot;foo&quot;)', 'Y21,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y22&quot;), NaN)', 'Y22,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y23&quot;), undefined)', 'Y23,0,1,2');
-shouldBeEqualToString('testAdd3(createOption(&quot;Y24&quot;), -2)','0,1,2,Y24');
-shouldThrow('testAdd4(createOption(&quot;Y25&quot;), 0, 1)');
-shouldThrow('testAdd4(createOption(&quot;Y25&quot;), mySelect.options[0], 1)');
-resetSelection();
-debug('list elements are = ' + deepCopy());
-shouldThrow('mySelect.options.add(&quot;foo&quot;)');
-shouldThrow('mySelect.options.add(&quot;foo&quot;, 0)');
-shouldThrow('mySelect.options.add(undefined)');
-shouldThrow('mySelect.options.add(undefined, 0)');
-shouldThrow('mySelect.options.add(null, 0)');
-shouldThrow('mySelect.options.add(null)');
-shouldThrow('mySelect.options.add()');
-        
</del><ins>+shouldBeEqualToString('testAddWithoutResettingListOptions(createGroup(&quot;Y12&quot;, &quot;Y13&quot;), mySelect.options[1])', &quot;0,Y12,Y13,1,2&quot;);
+shouldBeEqualToString('testAdd(createGroup(&quot;Y14&quot;, &quot;Y15&quot;), mySelect.options[3])', &quot;0,Y12,Y13,Y14,Y15,1,2&quot;);
+
+shouldThrow('testAdd(createOption(&quot;Y16&quot;), createOption(&quot;Y17&quot;))');
+
+shouldBeEqualToString('testAdd(createOption(&quot;Y1&quot;))', &quot;0,1,2,Y1&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y2&quot;), null)', &quot;0,1,2,Y2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y3&quot;), 0)', &quot;Y3,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y4&quot;), 1)', &quot;0,Y4,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y5&quot;), 2)', &quot;0,1,Y5,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y6&quot;), 3)', &quot;0,1,2,Y6&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y7&quot;), 100)', &quot;0,1,2,Y7&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y8&quot;), -100)', &quot;0,1,2,Y8&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y9&quot;), &quot;0&quot;)', &quot;Y9,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y10&quot;), &quot;1&quot;)', &quot;0,Y10,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y11&quot;), &quot;2&quot;)', &quot;0,1,Y11,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y12&quot;), true)', &quot;0,Y12,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y13&quot;), false)', &quot;Y13,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y14&quot;), 2147483647)', &quot;0,1,2,Y14&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y15&quot;), 2147483648)', &quot;0,1,2,Y15&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y16&quot;), -2147483647)', &quot;0,1,2,Y16&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y17&quot;), -2147483648)', &quot;0,1,2,Y17&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y18&quot;), -2147483649)', &quot;0,1,2,Y18&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y19&quot;), Infinity)', &quot;Y19,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y20&quot;), -Infinity)', &quot;Y20,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y21&quot;), &quot;foo&quot;)', &quot;Y21,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y22&quot;), NaN)', &quot;Y22,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y23&quot;), undefined)', &quot;Y23,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y24&quot;), -2)', &quot;0,1,2,Y24&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;X&quot;), mySelect.options[0])', &quot;X,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;X&quot;), mySelect.options[1])', &quot;0,X,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;X&quot;), mySelect.options[2])', &quot;0,1,X,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y25&quot;), 0, 1)', &quot;Y25,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;Y25&quot;), mySelect.options[0], 1)', &quot;Y25,0,1,2&quot;);
+shouldThrow('testAdd(&quot;foo&quot;, 0)', &quot;'TypeError: Type error'&quot;);
+shouldThrow('testAdd(undefined, 0)', &quot;'TypeError: Type error'&quot;);
+shouldThrow('testAdd(null, 0)', &quot;'TypeError: Type error'&quot;);
+
+debug(&quot;&lt;br&gt;Call HTMLOptionsCollection.add() with three arguments (when it only takes two arguments):&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;X&quot;), 0, &quot;unnecessary extra argument - should be ignored&quot;)', &quot;X,0,1,2&quot;);
+shouldBeEqualToString('testAdd(createOption(&quot;X&quot;), mySelect.options[1], &quot;unnecessary extra argument - should be ignored&quot;)', &quot;0,X,1,2&quot;);
+shouldBeEqualToString('testAdd(createGroup(&quot;G1&quot;, &quot;G2&quot;), 1, &quot;unnecessary extra argument - should be ignored&quot;)', &quot;0,G1,G2,1,2&quot;);
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28LayoutTestsfastdomHTMLSelectElementresourceshtmlselectandoptionscollectionutilitiesjs"></a>
<div class="addfile"><h4>Added: releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/resources/html-select-and-options-collection-utilities.js (0 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/resources/html-select-and-options-collection-utilities.js                                (rev 0)
+++ releases/WebKitGTK/webkit-2.8/LayoutTests/fast/dom/HTMLSelectElement/resources/html-select-and-options-collection-utilities.js        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+function createSelectElementWithTestData() {
+    var example = document.createElement(&quot;select&quot;);
+    example.appendChild(new Option(&quot;0&quot;, &quot;0&quot;, false, false));
+    example.appendChild(new Option(&quot;1&quot;, &quot;1&quot;, false, false));
+    example.appendChild(new Option(&quot;2&quot;, &quot;2&quot;, false, false));
+    return example;
+}
+
+function deepCopy(selectElement) {
+    var copy = [];
+    for(var i = 0; i &lt; selectElement.options.length; ++i)
+        copy.push(selectElement.options[i].value);
+    return copy.join(&quot;,&quot;);
+}
+
+function createOption(value) {
+    return new Option(value + &quot;X&quot;, value, false, false);
+}
+
+function createGroup(value1, value2) {
+    var group = document.createElement(&quot;optgroup&quot;);
+    group.appendChild(new Option(value1 + &quot;X&quot;, value1, false, false));
+    group.appendChild(new Option(value2 + &quot;Y&quot;, value2, false, false));
+    return group;
+}
</ins></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/ChangeLog        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2015-07-03  Daniel Bates  &lt;dabates@apple.com&gt;
+
+        REGRESSION (r178097): JavaScript TypeError after clicking on compose button in Yahoo Mail
+        https://bugs.webkit.org/show_bug.cgi?id=146515
+        &lt;rdar://problem/21348421&gt;
+
+        Reviewed by Chris Dumez.
+
+        Fixes an issue where extra arguments passed to a Web IDL overloaded function, whose implementation
+        is generated by the bindings generator script, are not ignored as per the note in section &quot;Interface object [[Call]] method&quot;
+        of the Web IDL spec, &lt;http://www.w3.org/TR/2012/CR-WebIDL-20120419/&gt; (19 April 2012).
+
+        Currently for an overloaded function the JavaScript bindings generator script emits code to
+        throw a TypeError when it cannot find a candidate function that takes the same number of
+        arguments as passed by a caller. Prior to the change made in bug #139179 (r178097), the
+        bindings code for HTMLSelectElement.add() was written by hand and ignored extra arguments
+        that were passed to it. Following this change, the bindings code for HTMLSelectElement.add()
+        is generated by the bindings generator script. Therefore, we throw a TypeError when Yahoo Mail
+        calls HTMLSelectElement.add() with extra arguments because the code emitted by the bindings
+        generator script does not ignore them.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (LengthOfLongestFunctionParameterList): Added. Computes the length of longest overload parameter list.
+        (GenerateOverloadedFunction): Emit code that ignores more arguments than LengthOfLongestFunctionParameterList().
+        (GenerateOverloadedConstructorDefinition): Ditto.
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12): Added; expected result for an overloaded
+        function that takes a variadic number of Blob elements.
+        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): Update expected result. The added
+        if-conditional expression for the IDL declaration overloadedMethod(Blob... blobArgs) is empty
+        because we do not support overloading of functions with variadic arguments.
+        (WebCore::jsTestObjConstructorFunctionOverloadedMethod1):
+        * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
+        (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors5): Added; expected
+        result for an overloaded constructors that takes a variadic number of long arguments.
+        (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors): Update expected
+        result. The added if-conditional expression for the IDL declaration Constructor(long... longArgs) is empty
+        because we do not support overloading of constructors with variadic arguments.
+        * bindings/scripts/test/TestObj.idl: Added declaration overloadedMethod(Blob...). Also fixed
+        typo in license block text.
+        * bindings/scripts/test/TestOverloadedConstructors.idl: Added declaration Constructor(long... longArgs).
+        Also fixed typo in license block text.
+
</ins><span class="cx"> 2015-07-03  Mario Sanchez Prada  &lt;mario@endlessm.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Crash on xLarge memory allocation using bmalloc on 32bit systems
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -1404,6 +1404,17 @@
</span><span class="cx">     return ($numMandatoryParams, join(&quot; || &quot;, @orExpression), @neededArguments);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub LengthOfLongestFunctionParameterList
+{
+    my ($overloads) = @_;
+    my $result = 0;
+    foreach my $overload (@{$overloads}) {
+        my @parameters = @{$overload-&gt;parameters};
+        $result = @parameters if $result &lt; @parameters;
+    }
+    return $result;
+}
+
</ins><span class="cx"> sub GenerateOverloadedFunction
</span><span class="cx"> {
</span><span class="cx">     my $function = shift;
</span><span class="lines">@@ -1419,10 +1430,13 @@
</span><span class="cx">     my $kind = $function-&gt;isStatic ? &quot;Constructor&quot; : &quot;Prototype&quot;;
</span><span class="cx">     my $functionName = &quot;js${interfaceName}${kind}Function&quot; . $codeGenerator-&gt;WK_ucfirst($function-&gt;signature-&gt;name);
</span><span class="cx"> 
</span><ins>+    # FIXME: Implement support for overloaded functions with variadic arguments.
+    my $lengthOfLongestOverloadedFunctionParameterList = LengthOfLongestFunctionParameterList($function-&gt;{overloads});
+
</ins><span class="cx">     push(@implContent, &quot;EncodedJSValue JSC_HOST_CALL ${functionName}(ExecState* exec)\n&quot;);
</span><span class="cx">     push(@implContent, &lt;&lt;END);
</span><span class="cx"> {
</span><del>-    size_t argsCount = exec-&gt;argumentCount();
</del><ins>+    size_t argsCount = std::min&lt;size_t&gt;($lengthOfLongestOverloadedFunctionParameterList, exec-&gt;argumentCount());
</ins><span class="cx"> END
</span><span class="cx"> 
</span><span class="cx">     my %fetchedArguments = ();
</span><span class="lines">@@ -4434,10 +4448,14 @@
</span><span class="cx">     my $interface = shift;
</span><span class="cx"> 
</span><span class="cx">     my $functionName = &quot;${className}Constructor::construct${className}&quot;;
</span><ins>+
+    # FIXME: Implement support for overloaded constructors with variadic arguments.
+    my $lengthOfLongestOverloadedConstructorParameterList = LengthOfLongestFunctionParameterList($interface-&gt;constructors);
+
</ins><span class="cx">     push(@$outputArray, &lt;&lt;END);
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL ${functionName}(ExecState* exec)
</span><span class="cx"> {
</span><del>-    size_t argsCount = exec-&gt;argumentCount();
</del><ins>+    size_t argsCount = std::min&lt;size_t&gt;($lengthOfLongestOverloadedConstructorParameterList, exec-&gt;argumentCount());
</ins><span class="cx"> END
</span><span class="cx"> 
</span><span class="cx">     my %fetchedArguments = ();
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -3859,9 +3859,27 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod12(ExecState* exec)
+{
+    JSValue thisValue = exec-&gt;thisValue();
+    JSTestObj* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*exec, &quot;TestObj&quot;, &quot;overloadedMethod&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;impl();
+    Vector&lt;Blob*&gt; blobArgs;
+    for (unsigned i = 0, count = exec-&gt;argumentCount(); i &lt; count; ++i) {
+        if (!exec-&gt;uncheckedArgument(i).inherits(JSBlob::info()))
+            return throwArgumentTypeError(*exec, i, &quot;blobArgs&quot;, &quot;TestObj&quot;, &quot;overloadedMethod&quot;, &quot;Blob&quot;);
+        blobArgs.append(JSBlob::toWrapped(exec-&gt;uncheckedArgument(i)));
+    }
+    impl.overloadedMethod(blobArgs);
+    return JSValue::encode(jsUndefined());
+}
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(ExecState* exec)
</span><span class="cx"> {
</span><del>-    size_t argsCount = exec-&gt;argumentCount();
</del><ins>+    size_t argsCount = std::min&lt;size_t&gt;(2, exec-&gt;argumentCount());
</ins><span class="cx">     JSValue arg0(exec-&gt;argument(0));
</span><span class="cx">     JSValue arg1(exec-&gt;argument(1));
</span><span class="cx">     if ((argsCount == 2 &amp;&amp; (arg0.isNull() || (arg0.isObject() &amp;&amp; asObject(arg0)-&gt;inherits(JSTestObj::info()))) &amp;&amp; (arg1.isUndefinedOrNull() || arg1.isString() || arg1.isObject())))
</span><span class="lines">@@ -3886,6 +3904,8 @@
</span><span class="cx">         return jsTestObjPrototypeFunctionOverloadedMethod10(exec);
</span><span class="cx">     if (argsCount == 1)
</span><span class="cx">         return jsTestObjPrototypeFunctionOverloadedMethod11(exec);
</span><ins>+    if ()
+        return jsTestObjPrototypeFunctionOverloadedMethod12(exec);
</ins><span class="cx">     if (argsCount &lt; 1)
</span><span class="cx">         return throwVMError(exec, createNotEnoughArgumentsError(exec));
</span><span class="cx">     return throwVMTypeError(exec);
</span><span class="lines">@@ -3950,7 +3970,7 @@
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod1(ExecState* exec)
</span><span class="cx"> {
</span><del>-    size_t argsCount = exec-&gt;argumentCount();
</del><ins>+    size_t argsCount = std::min&lt;size_t&gt;(1, exec-&gt;argumentCount());
</ins><span class="cx"> #if ENABLE(Condition1)
</span><span class="cx">     if (argsCount == 1)
</span><span class="cx">         return jsTestObjConstructorFunctionOverloadedMethod11(exec);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCorebindingsscriptstestJSJSTestOverloadedConstructorscpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -86,6 +86,7 @@
</span><span class="cx">     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors2(JSC::ExecState*);
</span><span class="cx">     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors3(JSC::ExecState*);
</span><span class="cx">     static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors4(JSC::ExecState*);
</span><ins>+    static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestOverloadedConstructors5(JSC::ExecState*);
</ins><span class="cx">     static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&amp;);
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="lines">@@ -137,9 +138,19 @@
</span><span class="cx">     return JSValue::encode(asObject(toJS(exec, castedThis-&gt;globalObject(), object.get())));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors5(ExecState* exec)
+{
+    auto* castedThis = jsCast&lt;JSTestOverloadedConstructorsConstructor*&gt;(exec-&gt;callee());
+    Vector&lt;int&gt; longArgs = toNativeArguments&lt;int&gt;(exec, 0);
+    if (UNLIKELY(exec-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    RefPtr&lt;TestOverloadedConstructors&gt; object = TestOverloadedConstructors::create(longArgs);
+    return JSValue::encode(asObject(toJS(exec, castedThis-&gt;globalObject(), object.get())));
+}
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors(ExecState* exec)
</span><span class="cx"> {
</span><del>-    size_t argsCount = exec-&gt;argumentCount();
</del><ins>+    size_t argsCount = std::min&lt;size_t&gt;(1, exec-&gt;argumentCount());
</ins><span class="cx">     JSValue arg0(exec-&gt;argument(0));
</span><span class="cx">     if ((argsCount == 1 &amp;&amp; (arg0.isObject() &amp;&amp; asObject(arg0)-&gt;inherits(JSArrayBuffer::info()))))
</span><span class="cx">         return JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1(exec);
</span><span class="lines">@@ -149,6 +160,8 @@
</span><span class="cx">         return JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3(exec);
</span><span class="cx">     if (argsCount == 1)
</span><span class="cx">         return JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4(exec);
</span><ins>+    if ()
+        return JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors5(exec);
</ins><span class="cx">     if (argsCount &lt; 1)
</span><span class="cx">         return throwVMError(exec, createNotEnoughArgumentsError(exec));
</span><span class="cx">     return throwVMTypeError(exec);
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCorebindingsscriptstestTestObjidl"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/TestObj.idl (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/TestObj.idl        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/TestObj.idl        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx">  *     from this software without specific prior written permission.
</span><span class="cx">  *
</span><span class="cx">  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
</span><del>- * EXPRESS OR IMPLIED WARRANTIEstrArg, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
</del><ins>+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
</ins><span class="cx">  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
</span><span class="cx">  * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
</span><span class="cx">  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
</span><span class="lines">@@ -190,6 +190,9 @@
</span><span class="cx">     void    overloadedMethod(DOMString[] arrayArg);
</span><span class="cx">     void    overloadedMethod(sequence&lt;unsigned long&gt; arrayArg);
</span><span class="cx">     void    overloadedMethod(DOMString strArg);
</span><ins>+
+    // FIXME: Implement support for overloaded functions with variadic arguments.
+    void    overloadedMethod(Blob... blobArgs);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // Class methods within JavaScript (like what's used for IDBKeyRange).
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit28SourceWebCorebindingsscriptstestTestOverloadedConstructorsidl"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/TestOverloadedConstructors.idl (186447 => 186448)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/TestOverloadedConstructors.idl        2015-07-07 11:27:15 UTC (rev 186447)
+++ releases/WebKitGTK/webkit-2.8/Source/WebCore/bindings/scripts/test/TestOverloadedConstructors.idl        2015-07-07 11:52:49 UTC (rev 186448)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx">  *     from this software without specific prior written permission.
</span><span class="cx">  *
</span><span class="cx">  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
</span><del>- * EXPRESS OR IMPLIED WARRANTIEstrArg, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
</del><ins>+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
</ins><span class="cx">  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
</span><span class="cx">  * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
</span><span class="cx">  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
</span><span class="lines">@@ -30,5 +30,6 @@
</span><span class="cx">     Constructor(ArrayBufferView arrayBufferView),
</span><span class="cx">     Constructor(Blob blob),
</span><span class="cx">     Constructor(DOMString string),
</span><ins>+    Constructor(long... longArgs) // FIXME: Implement support for overloaded constructors with variadic arguments.
</ins><span class="cx"> ] interface TestOverloadedConstructors {
</span><span class="cx"> };
</span></span></pre>
</div>
</div>

</body>
</html>