<!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>[189770] 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/189770">189770</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2015-09-14 18:48:38 -0700 (Mon, 14 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Drop non-standard [IsIndex] WebKit IDL extended attribute
https://bugs.webkit.org/show_bug.cgi?id=149122
&lt;rdar://problem/22547139&gt;

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline several W3C DOM tests now that more checks are passing.

* web-platform-tests/dom/nodes/CharacterData-deleteData-expected.txt:
* web-platform-tests/dom/nodes/CharacterData-replaceData-expected.txt:
* web-platform-tests/dom/nodes/CharacterData-substringData-expected.txt:

Source/WebCore:

Drop non-standard [IsIndex] WebKit IDL extended attribute. This attribute
causes us to throw an IndexSizeError if the input value is negative. Web
IDL supports no such thing. Instead Web IDL supports:
1. Default behavior: the input value wraps around if it does not fit.
2. [EnforceRange]: A TypeError is thrown if the input value does not fit [1].
3. [Clamp]: The input value will be clamped if it does not fit [2].

Our bindings generator supports all three. We don't need the non-standard
[IsIndex].

We previously used [IsIndex] in places where we're supposed to wrap around
as per Web IDL. Therefore, we threw for negative values but other browsers
don't. For e.g., CharacterData.substringData(offset, -1) is supposed to
return the substring from offset to the end of the string. It does so in
Firefox and Chrome. However, WebKit was throwing an Exception.

This change impacts the CharacterData and the SVGTextContentElement
API. The compatibility risk is low because we were throwing an exception
for negative values and we now wrap the value around instead, as other
browsers do.

No new tests, already covered by existing tests.

[1] https://heycam.github.io/webidl/#EnforceRange
[2] https://heycam.github.io/webidl/#Clamp

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateParametersCheck): Deleted.
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::jsTestEventTargetPrototypeFunctionItem):
* bindings/scripts/test/TestEventTarget.idl:
* dom/CharacterData.cpp:
(WebCore::CharacterData::deleteData):
(WebCore::CharacterData::replaceData):
* dom/CharacterData.idl:
* dom/ClientRectList.idl:
* svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::getSubStringLength):
(WebCore::SVGTextContentElement::selectSubString):
* svg/SVGTextContentElement.idl:

LayoutTests:

* dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt:
* dom/html/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt:
* dom/html/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt:
* dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt:
* dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt:
* dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt:
Rebaseline outdated DOM tests that are now failing.

* svg/custom/getSubStringLength-expected.txt:
* svg/custom/script-tests/getSubStringLength.js:
* svg/custom/script-tests/selectSubString.js:
* svg/custom/selectSubString-expected.txt:
Update existing SVG tests that were expecting an exception if the nchars
parameter in the SVGTextContentElement API is negative. I have verified
that Chrome and Firefox do not throw for these either.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsdomhtmllevel1corehc_characterdataindexsizeerrdeletedatacountnegativeexpectedtxt">trunk/LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsdomhtmllevel1corehc_characterdataindexsizeerrreplacedatacountnegativeexpectedtxt">trunk/LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsdomhtmllevel1corehc_characterdataindexsizeerrsubstringcountnegativeexpectedtxt">trunk/LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsdomxhtmllevel1corehc_characterdataindexsizeerrdeletedatacountnegativeexpectedtxt">trunk/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsdomxhtmllevel1corehc_characterdataindexsizeerrreplacedatacountnegativeexpectedtxt">trunk/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsdomxhtmllevel1corehc_characterdataindexsizeerrsubstringcountnegativeexpectedtxt">trunk/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesCharacterDatadeleteDataexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/CharacterData-deleteData-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesCharacterDatareplaceDataexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/CharacterData-replaceData-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesCharacterDatasubstringDataexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/CharacterData-substringData-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomgetSubStringLengthexpectedtxt">trunk/LayoutTests/svg/custom/getSubStringLength-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvgcustomscripttestsgetSubStringLengthjs">trunk/LayoutTests/svg/custom/script-tests/getSubStringLength.js</a></li>
<li><a href="#trunkLayoutTestssvgcustomscripttestsselectSubStringjs">trunk/LayoutTests/svg/custom/script-tests/selectSubString.js</a></li>
<li><a href="#trunkLayoutTestssvgcustomselectSubStringexpectedtxt">trunk/LayoutTests/svg/custom/selectSubString-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsIDLAttributestxt">trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestEventTargetidl">trunk/Source/WebCore/bindings/scripts/test/TestEventTarget.idl</a></li>
<li><a href="#trunkSourceWebCoredomCharacterDatacpp">trunk/Source/WebCore/dom/CharacterData.cpp</a></li>
<li><a href="#trunkSourceWebCoredomCharacterDataidl">trunk/Source/WebCore/dom/CharacterData.idl</a></li>
<li><a href="#trunkSourceWebCoredomClientRectListidl">trunk/Source/WebCore/dom/ClientRectList.idl</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTextContentElementcpp">trunk/Source/WebCore/svg/SVGTextContentElement.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTextContentElementidl">trunk/Source/WebCore/svg/SVGTextContentElement.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/ChangeLog        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2015-09-14  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Drop non-standard [IsIndex] WebKit IDL extended attribute
+        https://bugs.webkit.org/show_bug.cgi?id=149122
+        &lt;rdar://problem/22547139&gt;
+
+        Reviewed by Darin Adler.
+
+        * dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt:
+        * dom/html/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt:
+        * dom/html/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt:
+        * dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt:
+        * dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt:
+        * dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt:
+        Rebaseline outdated DOM tests that are now failing.
+
+        * svg/custom/getSubStringLength-expected.txt:
+        * svg/custom/script-tests/getSubStringLength.js:
+        * svg/custom/script-tests/selectSubString.js:
+        * svg/custom/selectSubString-expected.txt:
+        Update existing SVG tests that were expecting an exception if the nchars
+        parameter in the SVGTextContentElement API is negative. I have verified
+        that Chrome and Firefox do not throw for these either.
+
</ins><span class="cx"> 2015-09-14  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add tests for control characters being rendered visibly
</span></span></pre></div>
<a id="trunkLayoutTestsdomhtmllevel1corehc_characterdataindexsizeerrdeletedatacountnegativeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -1,2 +1,3 @@
</span><del>-Test:        http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative
-Status:        Success
</del><ins>+Test:        http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative        
+Status:        failure
+Detail:        throws_INDEX_SIZE_ERR: assertTrue failed
</ins></span></pre></div>
<a id="trunkLayoutTestsdomhtmllevel1corehc_characterdataindexsizeerrreplacedatacountnegativeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -1,2 +1,3 @@
</span><del>-Test:        http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative
-Status:        Success
</del><ins>+Test:        http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative        
+Status:        failure
+Detail:        throws_INDEX_SIZE_ERR: assertTrue failed
</ins></span></pre></div>
<a id="trunkLayoutTestsdomhtmllevel1corehc_characterdataindexsizeerrsubstringcountnegativeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/dom/html/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -1,2 +1,3 @@
</span><del>-Test:        http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrsubstringcountnegative
-Status:        Success
</del><ins>+Test:        http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrsubstringcountnegative        
+Status:        failure
+Detail:        throws_INDEX_SIZE_ERR: assertTrue failed
</ins></span></pre></div>
<a id="trunkLayoutTestsdomxhtmllevel1corehc_characterdataindexsizeerrdeletedatacountnegativeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative-expected.txt        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -1,2 +1,3 @@
</span><span class="cx"> Test        http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrdeletedatacountnegative
</span><del>-Status        Success
</del><ins>+Status        failure
+Message        throws_INDEX_SIZE_ERR: assertTrue failed
</ins></span></pre></div>
<a id="trunkLayoutTestsdomxhtmllevel1corehc_characterdataindexsizeerrreplacedatacountnegativeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative-expected.txt        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -1,2 +1,3 @@
</span><span class="cx"> Test        http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrreplacedatacountnegative
</span><del>-Status        Success
</del><ins>+Status        failure
+Message        throws_INDEX_SIZE_ERR: assertTrue failed
</ins></span></pre></div>
<a id="trunkLayoutTestsdomxhtmllevel1corehc_characterdataindexsizeerrsubstringcountnegativeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/dom/xhtml/level1/core/hc_characterdataindexsizeerrsubstringcountnegative-expected.txt        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -1,2 +1,3 @@
</span><span class="cx"> Test        http://www.w3.org/2001/DOM-Test-Suite/level1/core/hc_characterdataindexsizeerrsubstringcountnegative
</span><del>-Status        Success
</del><ins>+Status        failure
+Message        throws_INDEX_SIZE_ERR: assertTrue failed
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -1,5 +1,19 @@
</span><span class="cx"> 2015-09-14  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Drop non-standard [IsIndex] WebKit IDL extended attribute
+        https://bugs.webkit.org/show_bug.cgi?id=149122
+        &lt;rdar://problem/22547139&gt;
+
+        Reviewed by Darin Adler.
+
+        Rebaseline several W3C DOM tests now that more checks are passing.
+
+        * web-platform-tests/dom/nodes/CharacterData-deleteData-expected.txt:
+        * web-platform-tests/dom/nodes/CharacterData-replaceData-expected.txt:
+        * web-platform-tests/dom/nodes/CharacterData-substringData-expected.txt:
+
+2015-09-14  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         Document.createNodeIterator(null) / Document.createTreeWalker(null) should throw a TypeError
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=149126
</span><span class="cx">         &lt;rdar://problem/22564891&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesCharacterDatadeleteDataexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/CharacterData-deleteData-expected.txt (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/CharacterData-deleteData-expected.txt        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/CharacterData-deleteData-expected.txt        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> PASS Text.deleteData() at the end 
</span><span class="cx"> PASS Text.deleteData() in the middle 
</span><span class="cx"> PASS Text.deleteData() with zero count 
</span><del>-FAIL Text.deleteData() with small negative count IndexSizeError: DOM Exception 1
</del><ins>+PASS Text.deleteData() with small negative count 
</ins><span class="cx"> PASS Text.deleteData() with large negative count 
</span><span class="cx"> PASS Text.deleteData() with non-ascii data 
</span><span class="cx"> PASS Text.deleteData() with non-BMP data 
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> PASS Comment.deleteData() at the end 
</span><span class="cx"> PASS Comment.deleteData() in the middle 
</span><span class="cx"> PASS Comment.deleteData() with zero count 
</span><del>-FAIL Comment.deleteData() with small negative count IndexSizeError: DOM Exception 1
</del><ins>+PASS Comment.deleteData() with small negative count 
</ins><span class="cx"> PASS Comment.deleteData() with large negative count 
</span><span class="cx"> PASS Comment.deleteData() with non-ascii data 
</span><span class="cx"> PASS Comment.deleteData() with non-BMP data 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesCharacterDatareplaceDataexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/CharacterData-replaceData-expected.txt (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/CharacterData-replaceData-expected.txt        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/CharacterData-replaceData-expected.txt        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> 
</span><span class="cx"> PASS Text.replaceData() with invalid offset 
</span><span class="cx"> PASS Text.replaceData() with clamped count 
</span><del>-FAIL Text.replaceData() with negative clamped count IndexSizeError: DOM Exception 1
</del><ins>+PASS Text.replaceData() with negative clamped count 
</ins><span class="cx"> PASS Text.replaceData() before the start 
</span><span class="cx"> PASS Text.replaceData() at the start (shorter) 
</span><span class="cx"> PASS Text.replaceData() at the start (equal length) 
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> PASS Text.replaceData() with non-BMP data 
</span><span class="cx"> PASS Comment.replaceData() with invalid offset 
</span><span class="cx"> PASS Comment.replaceData() with clamped count 
</span><del>-FAIL Comment.replaceData() with negative clamped count IndexSizeError: DOM Exception 1
</del><ins>+PASS Comment.replaceData() with negative clamped count 
</ins><span class="cx"> PASS Comment.replaceData() before the start 
</span><span class="cx"> PASS Comment.replaceData() at the start (shorter) 
</span><span class="cx"> PASS Comment.replaceData() at the start (equal length) 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesCharacterDatasubstringDataexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/CharacterData-substringData-expected.txt (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/CharacterData-substringData-expected.txt        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/CharacterData-substringData-expected.txt        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx"> PASS Text.substringData() with in-bounds count 
</span><span class="cx"> PASS Text.substringData() with large count 
</span><span class="cx"> PASS Text.substringData() with very large count 
</span><del>-FAIL Text.substringData() with negative count IndexSizeError: DOM Exception 1
</del><ins>+PASS Text.substringData() with negative count 
</ins><span class="cx"> PASS Text.substringData() with non-ASCII data 
</span><span class="cx"> PASS Text.substringData() with non-BMP data 
</span><span class="cx"> PASS Comment.substringData() with too few arguments 
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx"> PASS Comment.substringData() with in-bounds count 
</span><span class="cx"> PASS Comment.substringData() with large count 
</span><span class="cx"> PASS Comment.substringData() with very large count 
</span><del>-FAIL Comment.substringData() with negative count IndexSizeError: DOM Exception 1
</del><ins>+PASS Comment.substringData() with negative count 
</ins><span class="cx"> PASS Comment.substringData() with non-ASCII data 
</span><span class="cx"> PASS Comment.substringData() with non-BMP data 
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestssvgcustomgetSubStringLengthexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/custom/getSubStringLength-expected.txt (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/getSubStringLength-expected.txt        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/svg/custom/getSubStringLength-expected.txt        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -9,8 +9,8 @@
</span><span class="cx"> PASS svgText.getSubStringLength(1, 1) is 20
</span><span class="cx"> PASS svgText.getSubStringLength(2, 1) is 20
</span><span class="cx"> PASS svgText.getSubStringLength(0, 3) is 60
</span><del>-PASS svgText.getSubStringLength(1, -1) threw exception Error: IndexSizeError: DOM Exception 1.
-PASS svgText.getSubStringLength(2, -1) threw exception Error: IndexSizeError: DOM Exception 1.
</del><ins>+PASS svgText.getSubStringLength(1, -1) is 40
+PASS svgText.getSubStringLength(2, -1) is 20
</ins><span class="cx"> PASS svgText.getSubStringLength(3, -1) threw exception Error: IndexSizeError: DOM Exception 1.
</span><span class="cx"> PASS svgText.getSubStringLength(3, -3) threw exception Error: IndexSizeError: DOM Exception 1.
</span><span class="cx"> PASS successfullyParsed is true
</span></span></pre></div>
<a id="trunkLayoutTestssvgcustomscripttestsgetSubStringLengthjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/custom/script-tests/getSubStringLength.js (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/script-tests/getSubStringLength.js        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/svg/custom/script-tests/getSubStringLength.js        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -23,8 +23,9 @@
</span><span class="cx"> shouldBe(&quot;svgText.getSubStringLength(2, 1)&quot;, &quot;20&quot;);
</span><span class="cx"> shouldBe(&quot;svgText.getSubStringLength(0, 3)&quot;, &quot;60&quot;);
</span><span class="cx"> 
</span><del>-shouldThrow(&quot;svgText.getSubStringLength(1, -1)&quot;);
-shouldThrow(&quot;svgText.getSubStringLength(2, -1)&quot;);
</del><ins>+shouldBe(&quot;svgText.getSubStringLength(1, -1)&quot;, &quot;40&quot;);
+shouldBe(&quot;svgText.getSubStringLength(2, -1)&quot;, &quot;20&quot;);
+
</ins><span class="cx"> shouldThrow(&quot;svgText.getSubStringLength(3, -1)&quot;);
</span><span class="cx"> shouldThrow(&quot;svgText.getSubStringLength(3, -3)&quot;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestssvgcustomscripttestsselectSubStringjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/custom/script-tests/selectSubString.js (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/script-tests/selectSubString.js        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/svg/custom/script-tests/selectSubString.js        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -10,7 +10,7 @@
</span><span class="cx"> svgRoot.appendChild(svgText);
</span><span class="cx"> 
</span><span class="cx"> shouldThrow(&quot;svgText.selectSubString(-1, 0)&quot;);
</span><del>-shouldThrow(&quot;svgText.getSubStringLength(0, -1)&quot;);
</del><ins>+shouldBe(&quot;svgText.getSubStringLength(0, -1)&quot;, &quot;60&quot;);
</ins><span class="cx"> shouldThrow(&quot;svgText.getSubStringLength(3, 0)&quot;);
</span><span class="cx"> 
</span><span class="cx"> // cleanup
</span></span></pre></div>
<a id="trunkLayoutTestssvgcustomselectSubStringexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/custom/selectSubString-expected.txt (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/custom/selectSubString-expected.txt        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/LayoutTests/svg/custom/selectSubString-expected.txt        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> PASS svgText.selectSubString(-1, 0) threw exception Error: IndexSizeError: DOM Exception 1.
</span><del>-PASS svgText.getSubStringLength(0, -1) threw exception Error: IndexSizeError: DOM Exception 1.
</del><ins>+PASS svgText.getSubStringLength(0, -1) is 60
</ins><span class="cx"> PASS svgText.getSubStringLength(3, 0) threw exception Error: IndexSizeError: DOM Exception 1.
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/Source/WebCore/ChangeLog        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -1,5 +1,55 @@
</span><span class="cx"> 2015-09-14  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Drop non-standard [IsIndex] WebKit IDL extended attribute
+        https://bugs.webkit.org/show_bug.cgi?id=149122
+        &lt;rdar://problem/22547139&gt;
+
+        Reviewed by Darin Adler.
+
+        Drop non-standard [IsIndex] WebKit IDL extended attribute. This attribute
+        causes us to throw an IndexSizeError if the input value is negative. Web
+        IDL supports no such thing. Instead Web IDL supports:
+        1. Default behavior: the input value wraps around if it does not fit.
+        2. [EnforceRange]: A TypeError is thrown if the input value does not fit [1].
+        3. [Clamp]: The input value will be clamped if it does not fit [2].
+
+        Our bindings generator supports all three. We don't need the non-standard
+        [IsIndex].
+
+        We previously used [IsIndex] in places where we're supposed to wrap around
+        as per Web IDL. Therefore, we threw for negative values but other browsers
+        don't. For e.g., CharacterData.substringData(offset, -1) is supposed to
+        return the substring from offset to the end of the string. It does so in
+        Firefox and Chrome. However, WebKit was throwing an Exception.
+
+        This change impacts the CharacterData and the SVGTextContentElement
+        API. The compatibility risk is low because we were throwing an exception
+        for negative values and we now wrap the value around instead, as other
+        browsers do.
+
+        No new tests, already covered by existing tests.
+
+        [1] https://heycam.github.io/webidl/#EnforceRange
+        [2] https://heycam.github.io/webidl/#Clamp
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateParametersCheck): Deleted.
+        * bindings/scripts/IDLAttributes.txt:
+        * bindings/scripts/test/JS/JSTestEventTarget.cpp:
+        (WebCore::jsTestEventTargetPrototypeFunctionItem):
+        * bindings/scripts/test/TestEventTarget.idl:
+        * dom/CharacterData.cpp:
+        (WebCore::CharacterData::deleteData):
+        (WebCore::CharacterData::replaceData):
+        * dom/CharacterData.idl:
+        * dom/ClientRectList.idl:
+        * svg/SVGTextContentElement.cpp:
+        (WebCore::SVGTextContentElement::getSubStringLength):
+        (WebCore::SVGTextContentElement::selectSubString):
+        * svg/SVGTextContentElement.idl:
+
+2015-09-14  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         Document.createNodeIterator(null) / Document.createTreeWalker(null) should throw a TypeError
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=149126
</span><span class="cx">         &lt;rdar://problem/22564891&gt;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -3397,16 +3397,6 @@
</span><span class="cx">                 push(@$outputArray, &quot;    &quot; . GetNativeTypeFromSignature($parameter) . &quot; $name = $outer&quot; . JSValueToNative($parameter, $inner, $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Conditional&quot;}) . &quot;;\n&quot;);
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            # If a parameter is &quot;an index&quot; and it's negative it should throw an INDEX_SIZE_ERR exception.
-            # But this needs to be done in the bindings, because the type is unsigned and the fact that it
-            # was negative will be lost by the time we're inside the DOM.
-            if ($parameter-&gt;extendedAttributes-&gt;{&quot;IsIndex&quot;}) {
-                push(@$outputArray, &quot;    if ($name &lt; 0) {\n&quot;);
-                push(@$outputArray, &quot;        setDOMException(exec, INDEX_SIZE_ERR);\n&quot;);
-                push(@$outputArray, &quot;        return JSValue::encode(jsUndefined());\n&quot;);
-                push(@$outputArray, &quot;    }\n&quot;);
-            }
-
</del><span class="cx">             # Check if the type conversion succeeded.
</span><span class="cx">             push(@$outputArray, &quot;    if (UNLIKELY(exec-&gt;hadException()))\n&quot;);
</span><span class="cx">             push(@$outputArray, &quot;        return JSValue::encode(jsUndefined());\n&quot;);
</span><span class="lines">@@ -3811,11 +3801,6 @@
</span><span class="cx">     my $signature = shift;
</span><span class="cx">     my $type = $signature-&gt;type;
</span><span class="cx"> 
</span><del>-    if ($type eq &quot;unsigned long&quot; and $signature-&gt;extendedAttributes-&gt;{&quot;IsIndex&quot;}) {
-        # Special-case index arguments because we need to check that they aren't &lt; 0.
-        return &quot;int&quot;;
-    }
-
</del><span class="cx">     return GetNativeType($type);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLAttributestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -72,7 +72,6 @@
</span><span class="cx"> ImplementedAs=*
</span><span class="cx"> InitializedByEventConstructor
</span><span class="cx"> InterfaceName=*
</span><del>-IsIndex
</del><span class="cx"> IsWeakCallback
</span><span class="cx"> JSCustomDefineOwnProperty
</span><span class="cx"> JSCustomDefineOwnPropertyOnPrototype
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestEventTargetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -251,11 +251,7 @@
</span><span class="cx">     auto&amp; impl = castedThis-&gt;impl();
</span><span class="cx">     if (UNLIKELY(exec-&gt;argumentCount() &lt; 1))
</span><span class="cx">         return throwVMError(exec, createNotEnoughArgumentsError(exec));
</span><del>-    int index = toUInt32(exec, exec-&gt;argument(0), NormalConversion);
-    if (index &lt; 0) {
-        setDOMException(exec, INDEX_SIZE_ERR);
-        return JSValue::encode(jsUndefined());
-    }
</del><ins>+    unsigned index = toUInt32(exec, exec-&gt;argument(0), NormalConversion);
</ins><span class="cx">     if (UNLIKELY(exec-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     JSValue result = toJS(exec, castedThis-&gt;globalObject(), WTF::getPtr(impl.item(index)));
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestEventTargetidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestEventTarget.idl (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestEventTarget.idl        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/Source/WebCore/bindings/scripts/test/TestEventTarget.idl        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx">     MasqueradesAsUndefined
</span><span class="cx"> ] interface TestEventTarget {
</span><span class="cx"> 
</span><del>-    getter Node item([IsIndex] unsigned long index);
</del><ins>+    getter Node item(unsigned long index);
</ins><span class="cx">     getter Node (DOMString name);
</span><span class="cx"> 
</span><span class="cx">     void addEventListener(DOMString type, 
</span></span></pre></div>
<a id="trunkSourceWebCoredomCharacterDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/CharacterData.cpp (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CharacterData.cpp        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/Source/WebCore/dom/CharacterData.cpp        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -137,18 +137,14 @@
</span><span class="cx">     if (ec)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    unsigned realCount;
-    if (offset + count &gt; length())
-        realCount = length() - offset;
-    else
-        realCount = count;
</del><ins>+    count = std::min(count, length() - offset);
</ins><span class="cx"> 
</span><span class="cx">     String newStr = m_data;
</span><del>-    newStr.remove(offset, realCount);
</del><ins>+    newStr.remove(offset, count);
</ins><span class="cx"> 
</span><span class="cx">     setDataAndUpdate(newStr, offset, count, 0);
</span><span class="cx"> 
</span><del>-    document().textRemoved(this, offset, realCount);
</del><ins>+    document().textRemoved(this, offset, count);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CharacterData::replaceData(unsigned offset, unsigned count, const String&amp; data, ExceptionCode&amp; ec)
</span><span class="lines">@@ -157,20 +153,16 @@
</span><span class="cx">     if (ec)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    unsigned realCount;
-    if (offset + count &gt; length())
-        realCount = length() - offset;
-    else
-        realCount = count;
</del><ins>+    count = std::min(count, length() - offset);
</ins><span class="cx"> 
</span><span class="cx">     String newStr = m_data;
</span><del>-    newStr.remove(offset, realCount);
</del><ins>+    newStr.remove(offset, count);
</ins><span class="cx">     newStr.insert(data, offset);
</span><span class="cx"> 
</span><span class="cx">     setDataAndUpdate(newStr, offset, count, data.length());
</span><span class="cx"> 
</span><span class="cx">     // update the markers for spell checking and grammar checking
</span><del>-    document().textRemoved(this, offset, realCount);
</del><ins>+    document().textRemoved(this, offset, count);
</ins><span class="cx">     document().textInserted(this, offset, data.length());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomCharacterDataidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/CharacterData.idl (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/CharacterData.idl        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/Source/WebCore/dom/CharacterData.idl        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -23,15 +23,15 @@
</span><span class="cx"> 
</span><span class="cx">     readonly attribute unsigned long length;
</span><span class="cx">     
</span><del>-    [TreatReturnedNullStringAs=Null, ObjCLegacyUnnamedParameters, RaisesException] DOMString substringData([IsIndex] unsigned long offset, [IsIndex] unsigned long length);
</del><ins>+    [TreatReturnedNullStringAs=Null, ObjCLegacyUnnamedParameters, RaisesException] DOMString substringData(unsigned long offset, unsigned long length);
</ins><span class="cx"> 
</span><span class="cx">     void appendData(DOMString data);
</span><span class="cx"> 
</span><del>-    [ObjCLegacyUnnamedParameters, RaisesException] void insertData([IsIndex] unsigned long offset, DOMString data);
</del><ins>+    [ObjCLegacyUnnamedParameters, RaisesException] void insertData(unsigned long offset, DOMString data);
</ins><span class="cx"> 
</span><del>-    [ObjCLegacyUnnamedParameters, RaisesException] void deleteData([IsIndex] unsigned long offset, [IsIndex] unsigned long length);
</del><ins>+    [ObjCLegacyUnnamedParameters, RaisesException] void deleteData(unsigned long offset, unsigned long length);
</ins><span class="cx"> 
</span><del>-    [ObjCLegacyUnnamedParameters, RaisesException] void replaceData([IsIndex] unsigned long offset, [IsIndex] unsigned long length, DOMString data);
</del><ins>+    [ObjCLegacyUnnamedParameters, RaisesException] void replaceData(unsigned long offset, unsigned long length, DOMString data);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> CharacterData implements ChildNode;
</span></span></pre></div>
<a id="trunkSourceWebCoredomClientRectListidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ClientRectList.idl (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ClientRectList.idl        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/Source/WebCore/dom/ClientRectList.idl        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">     ImplementationLacksVTable,
</span><span class="cx"> ] interface ClientRectList {
</span><span class="cx">     readonly attribute unsigned long length;
</span><del>-    getter ClientRect item([IsIndex, Default=Undefined] optional unsigned long index);
</del><ins>+    getter ClientRect item([Default=Undefined] optional unsigned long index);
</ins><span class="cx">     // FIXME: Fix list behavior to allow custom exceptions to be thrown.
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTextContentElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTextContentElement.cpp (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTextContentElement.cpp        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/Source/WebCore/svg/SVGTextContentElement.cpp        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -122,6 +122,7 @@
</span><span class="cx">         return 0.0f;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    nchars = std::min(nchars, numberOfChars - charnum);
</ins><span class="cx">     return SVGTextQuery(renderer()).subStringLength(charnum, nchars);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -187,8 +188,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (nchars &gt; numberOfChars - charnum)
-        nchars = numberOfChars - charnum;
</del><ins>+    nchars = std::min(nchars, numberOfChars - charnum);
</ins><span class="cx"> 
</span><span class="cx">     ASSERT(document().frame());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTextContentElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTextContentElement.idl (189769 => 189770)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTextContentElement.idl        2015-09-15 01:36:33 UTC (rev 189769)
+++ trunk/Source/WebCore/svg/SVGTextContentElement.idl        2015-09-15 01:48:38 UTC (rev 189770)
</span><span class="lines">@@ -34,15 +34,15 @@
</span><span class="cx"> 
</span><span class="cx">     long getNumberOfChars();
</span><span class="cx">     unrestricted float getComputedTextLength();
</span><del>-    [RaisesException] unrestricted float getSubStringLength([Default=Undefined,IsIndex] optional unsigned long offset, 
-                             [Default=Undefined,IsIndex] optional unsigned long length);
-    [RaisesException] SVGPoint getStartPositionOfChar([Default=Undefined,IsIndex] optional unsigned long offset);
-    [RaisesException] SVGPoint getEndPositionOfChar([Default=Undefined,IsIndex] optional unsigned long offset);
-    [RaisesException] SVGRect getExtentOfChar([Default=Undefined,IsIndex] optional unsigned long offset);
-    [RaisesException] unrestricted float getRotationOfChar([Default=Undefined,IsIndex] optional unsigned long offset);
</del><ins>+    [RaisesException] unrestricted float getSubStringLength([Default=Undefined] optional unsigned long offset,
+                             [Default=Undefined] optional unsigned long length);
+    [RaisesException] SVGPoint getStartPositionOfChar([Default=Undefined] optional unsigned long offset);
+    [RaisesException] SVGPoint getEndPositionOfChar([Default=Undefined] optional unsigned long offset);
+    [RaisesException] SVGRect getExtentOfChar([Default=Undefined] optional unsigned long offset);
+    [RaisesException] unrestricted float getRotationOfChar([Default=Undefined] optional unsigned long offset);
</ins><span class="cx">     long getCharNumAtPosition([Default=Undefined] optional SVGPoint point);
</span><del>-    [RaisesException] void selectSubString([Default=Undefined,IsIndex] optional unsigned long offset, 
-                         [Default=Undefined,IsIndex] optional unsigned long length);
</del><ins>+    [RaisesException] void selectSubString([Default=Undefined] optional unsigned long offset,
+                         [Default=Undefined] optional unsigned long length);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> // FIXME: SVGTextContentElement is not supposed to implement SVGExternalResourcesRequired.
</span></span></pre>
</div>
</div>

</body>
</html>