<!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>[177864] trunk/Source/WebCore</title>
</head>
<body>

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

<h3>Log Message</h3>
<pre>Pass Document instead of ScriptExecutionContext to non-worker constructors
https://bugs.webkit.org/show_bug.cgi?id=140040

Reviewed by Sam Weinig.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
Generate code passing the document when ConstructorCallWith=Document is used.
Later, we could base this on whether the constructor is exposed to workers
or not, instead, but for now this seems a clean way to do it.

* bindings/scripts/IDLAttributes.txt: Allow ConstructorCallWith=Document.

* Modules/notifications/Notification.cpp:
(WebCore::Notification::create):
* Modules/notifications/Notification.h:
* Modules/notifications/Notification.idl:
* dom/Comment.cpp:
* dom/Comment.h:
* dom/Comment.idl:
* dom/DocumentFragment.cpp:
(WebCore::DocumentFragment::nodeName): Use ASCIILiteral (just something
I noticed in passing).
* dom/DocumentFragment.h:
* dom/DocumentFragment.idl:
* dom/Range.cpp:
* dom/Range.h:
* dom/Range.idl:
* dom/Text.cpp:
* dom/Text.h:
* dom/Text.idl:
Change from ScriptExecutionContext to Document, and remove unneeded
overloads that were just casting. It's better to have the bindings
layer, which knows these are not ScriptExecutionContext, do the cast
than to have create functions that cast that are not in any position
to know the cast is safe.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesnotificationsNotificationcpp">trunk/Source/WebCore/Modules/notifications/Notification.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesnotificationsNotificationh">trunk/Source/WebCore/Modules/notifications/Notification.h</a></li>
<li><a href="#trunkSourceWebCoreModulesnotificationsNotificationidl">trunk/Source/WebCore/Modules/notifications/Notification.idl</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="#trunkSourceWebCoredomCommentcpp">trunk/Source/WebCore/dom/Comment.cpp</a></li>
<li><a href="#trunkSourceWebCoredomCommenth">trunk/Source/WebCore/dom/Comment.h</a></li>
<li><a href="#trunkSourceWebCoredomCommentidl">trunk/Source/WebCore/dom/Comment.idl</a></li>
<li><a href="#trunkSourceWebCoredomDocumentFragmentcpp">trunk/Source/WebCore/dom/DocumentFragment.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentFragmenth">trunk/Source/WebCore/dom/DocumentFragment.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentFragmentidl">trunk/Source/WebCore/dom/DocumentFragment.idl</a></li>
<li><a href="#trunkSourceWebCoredomRangecpp">trunk/Source/WebCore/dom/Range.cpp</a></li>
<li><a href="#trunkSourceWebCoredomRangeh">trunk/Source/WebCore/dom/Range.h</a></li>
<li><a href="#trunkSourceWebCoredomRangeidl">trunk/Source/WebCore/dom/Range.idl</a></li>
<li><a href="#trunkSourceWebCoredomTextcpp">trunk/Source/WebCore/dom/Text.cpp</a></li>
<li><a href="#trunkSourceWebCoredomTexth">trunk/Source/WebCore/dom/Text.h</a></li>
<li><a href="#trunkSourceWebCoredomTextidl">trunk/Source/WebCore/dom/Text.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/ChangeLog        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -1,5 +1,44 @@
</span><span class="cx"> 2015-01-02  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Pass Document instead of ScriptExecutionContext to non-worker constructors
+        https://bugs.webkit.org/show_bug.cgi?id=140040
+
+        Reviewed by Sam Weinig.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateConstructorDefinition):
+        Generate code passing the document when ConstructorCallWith=Document is used.
+        Later, we could base this on whether the constructor is exposed to workers
+        or not, instead, but for now this seems a clean way to do it.
+
+        * bindings/scripts/IDLAttributes.txt: Allow ConstructorCallWith=Document.
+
+        * Modules/notifications/Notification.cpp:
+        (WebCore::Notification::create):
+        * Modules/notifications/Notification.h:
+        * Modules/notifications/Notification.idl:
+        * dom/Comment.cpp:
+        * dom/Comment.h:
+        * dom/Comment.idl:
+        * dom/DocumentFragment.cpp:
+        (WebCore::DocumentFragment::nodeName): Use ASCIILiteral (just something
+        I noticed in passing).
+        * dom/DocumentFragment.h:
+        * dom/DocumentFragment.idl:
+        * dom/Range.cpp:
+        * dom/Range.h:
+        * dom/Range.idl:
+        * dom/Text.cpp:
+        * dom/Text.h:
+        * dom/Text.idl:
+        Change from ScriptExecutionContext to Document, and remove unneeded
+        overloads that were just casting. It's better to have the bindings
+        layer, which knows these are not ScriptExecutionContext, do the cast
+        than to have create functions that cast that are not in any position
+        to know the cast is safe.
+
+2015-01-02  Darin Adler  &lt;darin@apple.com&gt;
+
</ins><span class="cx">         Re-land the HTMLTreeBuilder change with the assertion fixed.
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=140032
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesnotificationsNotificationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/notifications/Notification.cpp (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/notifications/Notification.cpp        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/Modules/notifications/Notification.cpp        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(NOTIFICATIONS)
</span><del>-Ref&lt;Notification&gt; Notification::create(ScriptExecutionContext&amp; context, const String&amp; title, const Dictionary&amp; options)
</del><ins>+Ref&lt;Notification&gt; Notification::create(Document&amp; context, const String&amp; title, const Dictionary&amp; options)
</ins><span class="cx"> {
</span><span class="cx">     auto notification = adoptRef(*new Notification(context, title));
</span><span class="cx">     String argument;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesnotificationsNotificationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/notifications/Notification.h (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/notifications/Notification.h        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/Modules/notifications/Notification.h        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -69,7 +69,7 @@
</span><span class="cx">     static Ref&lt;Notification&gt; create(const String&amp; title, const String&amp; body, const String&amp; iconURI, ScriptExecutionContext*, ExceptionCode&amp;, PassRefPtr&lt;NotificationCenter&gt; provider);
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(NOTIFICATIONS)
</span><del>-    static Ref&lt;Notification&gt; create(ScriptExecutionContext&amp;, const String&amp; title, const Dictionary&amp; options);
</del><ins>+    static Ref&lt;Notification&gt; create(Document&amp;, const String&amp; title, const Dictionary&amp; options);
</ins><span class="cx"> #endif
</span><span class="cx">     
</span><span class="cx">     WEBCORE_EXPORT virtual ~Notification();
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesnotificationsNotificationidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/notifications/Notification.idl (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/notifications/Notification.idl        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/Modules/notifications/Notification.idl        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx">     EventTarget,
</span><span class="cx"> #if defined(ENABLE_NOTIFICATIONS) &amp;&amp; ENABLE_NOTIFICATIONS
</span><span class="cx">     Constructor(DOMString title, [Default=Undefined] optional Dictionary options),
</span><del>-    ConstructorCallWith=ScriptExecutionContext,
</del><ins>+    ConstructorCallWith=Document,
</ins><span class="cx"> #endif
</span><span class="cx"> ] interface Notification {
</span><span class="cx">     void show();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -4599,12 +4599,20 @@
</span><span class="cx">             my $numParameters = @{$function-&gt;parameters};
</span><span class="cx">             my ($dummy, $paramIndex) = GenerateParametersCheck($outputArray, $function, $interface, $numParameters, $interfaceName, &quot;constructorCallback&quot;, undef, undef, undef);
</span><span class="cx"> 
</span><del>-            if ($codeGenerator-&gt;ExtendedAttributeContains($interface-&gt;extendedAttributes-&gt;{&quot;ConstructorCallWith&quot;}, &quot;ScriptExecutionContext&quot;) ) {
</del><ins>+            if ($codeGenerator-&gt;ExtendedAttributeContains($interface-&gt;extendedAttributes-&gt;{&quot;ConstructorCallWith&quot;}, &quot;ScriptExecutionContext&quot;)) {
</ins><span class="cx">                 push(@constructorArgList, &quot;*context&quot;);
</span><span class="cx">                 push(@$outputArray, &quot;    ScriptExecutionContext* context = castedThis-&gt;scriptExecutionContext();\n&quot;);
</span><span class="cx">                 push(@$outputArray, &quot;    if (!context)\n&quot;);
</span><span class="cx">                 push(@$outputArray, &quot;        return throwConstructorDocumentUnavailableError(*exec, \&quot;${interfaceName}\&quot;);\n&quot;);
</span><span class="cx">             }
</span><ins>+            if ($codeGenerator-&gt;ExtendedAttributeContains($interface-&gt;extendedAttributes-&gt;{&quot;ConstructorCallWith&quot;}, &quot;Document&quot;)) {
+                $implIncludes{&quot;Document.h&quot;} = 1;
+                push(@constructorArgList, &quot;document&quot;);
+                push(@$outputArray, &quot;    ScriptExecutionContext* context = castedThis-&gt;scriptExecutionContext();\n&quot;);
+                push(@$outputArray, &quot;    if (!context)\n&quot;);
+                push(@$outputArray, &quot;        return throwConstructorDocumentUnavailableError(*exec, \&quot;${interfaceName}\&quot;);\n&quot;);
+                push(@$outputArray, &quot;    Document&amp; document = downcast&lt;Document&gt;(*context);\n&quot;);
+            }
</ins><span class="cx">             if ($generatingNamedConstructor) {
</span><span class="cx">                 push(@constructorArgList, &quot;*castedThis-&gt;document()&quot;);
</span><span class="cx">             }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLAttributestxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> Clamp
</span><span class="cx"> Conditional=*
</span><span class="cx"> Constructor
</span><del>-ConstructorCallWith=ScriptExecutionContext
</del><ins>+ConstructorCallWith=Document|ScriptExecutionContext
</ins><span class="cx"> ConstructorConditional=*
</span><span class="cx"> ConstructorRaisesException
</span><span class="cx"> ConstructorTemplate=Event|TypedArray
</span></span></pre></div>
<a id="trunkSourceWebCoredomCommentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Comment.cpp (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Comment.cpp        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/dom/Comment.cpp        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -36,11 +36,6 @@
</span><span class="cx">     return adoptRef(*new Comment(document, text));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;Comment&gt; Comment::create(ScriptExecutionContext&amp; context, const String&amp; text)
-{
-    return adoptRef(*new Comment(downcast&lt;Document&gt;(context), text));
-}
-
</del><span class="cx"> String Comment::nodeName() const
</span><span class="cx"> {
</span><span class="cx">     return commentAtom.string();
</span></span></pre></div>
<a id="trunkSourceWebCoredomCommenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Comment.h (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Comment.h        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/dom/Comment.h        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -30,7 +30,6 @@
</span><span class="cx"> class Comment final : public CharacterData {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;Comment&gt; create(Document&amp;, const String&amp;);
</span><del>-    static Ref&lt;Comment&gt; create(ScriptExecutionContext&amp;, const String&amp;);
</del><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     Comment(Document&amp;, const String&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoredomCommentidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Comment.idl (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Comment.idl        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/dom/Comment.idl        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     Constructor([Default=NullString] optional DOMString data),
</span><del>-    ConstructorCallWith=ScriptExecutionContext
</del><ins>+    ConstructorCallWith=Document
</ins><span class="cx"> ] interface Comment : CharacterData {
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentFragmentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentFragment.cpp (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentFragment.cpp        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/dom/DocumentFragment.cpp        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -41,14 +41,9 @@
</span><span class="cx">     return adoptRef(*new DocumentFragment(document, Node::CreateDocumentFragment));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;DocumentFragment&gt; DocumentFragment::create(ScriptExecutionContext&amp; context)
-{
-    return adoptRef(*new DocumentFragment(downcast&lt;Document&gt;(context), Node::CreateDocumentFragment));
-}
-
</del><span class="cx"> String DocumentFragment::nodeName() const
</span><span class="cx"> {
</span><del>-    return &quot;#document-fragment&quot;;
</del><ins>+    return ASCIILiteral(&quot;#document-fragment&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Node::NodeType DocumentFragment::nodeType() const
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentFragmenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentFragment.h (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentFragment.h        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/dom/DocumentFragment.h        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -29,12 +29,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class ScriptExecutionContext;
-
</del><span class="cx"> class DocumentFragment : public ContainerNode {
</span><span class="cx"> public:
</span><span class="cx">     static Ref&lt;DocumentFragment&gt; create(Document&amp;);
</span><del>-    static Ref&lt;DocumentFragment&gt; create(ScriptExecutionContext&amp;);
</del><span class="cx"> 
</span><span class="cx">     void parseHTML(const String&amp;, Element* contextElement, ParserContentPolicy = AllowScriptingContent);
</span><span class="cx">     bool parseXML(const String&amp;, Element* contextElement, ParserContentPolicy = AllowScriptingContent);
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentFragmentidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentFragment.idl (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentFragment.idl        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/dom/DocumentFragment.idl        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -19,7 +19,7 @@
</span><span class="cx"> 
</span><span class="cx">  [
</span><span class="cx">     Constructor,
</span><del>-    ConstructorCallWith=ScriptExecutionContext
</del><ins>+    ConstructorCallWith=Document
</ins><span class="cx">  ] interface DocumentFragment : Node {
</span><span class="cx">     // NodeSelector - Selector API
</span><span class="cx">     [RaisesException] Element querySelector(DOMString selectors);
</span></span></pre></div>
<a id="trunkSourceWebCoredomRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Range.cpp (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Range.cpp        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/dom/Range.cpp        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -104,11 +104,6 @@
</span><span class="cx">     return adoptRef(*new Range(ownerDocument, start.containerNode(), start.computeOffsetInContainerNode(), end.containerNode(), end.computeOffsetInContainerNode()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;Range&gt; Range::create(ScriptExecutionContext&amp; context)
-{
-    return adoptRef(*new Range(downcast&lt;Document&gt;(context)));
-}
-
</del><span class="cx"> Ref&lt;Range&gt; Range::create(Document&amp; ownerDocument, const VisiblePosition&amp; visibleStart, const VisiblePosition&amp; visibleEnd)
</span><span class="cx"> {
</span><span class="cx">     Position start = visibleStart.deepEquivalent().parentAnchoredEquivalent();
</span></span></pre></div>
<a id="trunkSourceWebCoredomRangeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Range.h (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Range.h        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/dom/Range.h        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -44,18 +44,15 @@
</span><span class="cx"> class FloatQuad;
</span><span class="cx"> class Node;
</span><span class="cx"> class NodeWithIndex;
</span><ins>+class SelectionRect;
</ins><span class="cx"> class Text;
</span><span class="cx"> class VisiblePosition;
</span><del>-#if PLATFORM(IOS)
-class SelectionRect;
-#endif
</del><span class="cx"> 
</span><span class="cx"> class Range : public RefCounted&lt;Range&gt; {
</span><span class="cx"> public:
</span><span class="cx">     WEBCORE_EXPORT static Ref&lt;Range&gt; create(Document&amp;);
</span><span class="cx">     WEBCORE_EXPORT static Ref&lt;Range&gt; create(Document&amp;, PassRefPtr&lt;Node&gt; startContainer, int startOffset, PassRefPtr&lt;Node&gt; endContainer, int endOffset);
</span><span class="cx">     WEBCORE_EXPORT static Ref&lt;Range&gt; create(Document&amp;, const Position&amp;, const Position&amp;);
</span><del>-    WEBCORE_EXPORT static Ref&lt;Range&gt; create(ScriptExecutionContext&amp;);
</del><span class="cx">     WEBCORE_EXPORT static Ref&lt;Range&gt; create(Document&amp;, const VisiblePosition&amp;, const VisiblePosition&amp;);
</span><span class="cx">     WEBCORE_EXPORT ~Range();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomRangeidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Range.idl (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Range.idl        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/dom/Range.idl        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -21,7 +21,7 @@
</span><span class="cx"> // Introduced in DOM Level 2:
</span><span class="cx"> [
</span><span class="cx">     Constructor,
</span><del>-    ConstructorCallWith=ScriptExecutionContext,
</del><ins>+    ConstructorCallWith=Document,
</ins><span class="cx">     ImplementationLacksVTable
</span><span class="cx"> ] interface Range {
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Text.cpp (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Text.cpp        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/dom/Text.cpp        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -43,11 +43,6 @@
</span><span class="cx">     return adoptRef(*new Text(document, data, CreateText));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;Text&gt; Text::create(ScriptExecutionContext&amp; context, const String&amp; data)
-{
-    return adoptRef(*new Text(downcast&lt;Document&gt;(context), data, CreateText));
-}
-
</del><span class="cx"> Ref&lt;Text&gt; Text::createEditingText(Document&amp; document, const String&amp; data)
</span><span class="cx"> {
</span><span class="cx">     return adoptRef(*new Text(document, data, CreateEditingText));
</span></span></pre></div>
<a id="trunkSourceWebCoredomTexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Text.h (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Text.h        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/dom/Text.h        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -29,14 +29,12 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> class RenderText;
</span><del>-class ScriptExecutionContext;
</del><span class="cx"> 
</span><span class="cx"> class Text : public CharacterData {
</span><span class="cx"> public:
</span><span class="cx">     static const unsigned defaultLengthLimit = 1 &lt;&lt; 16;
</span><span class="cx"> 
</span><span class="cx">     static Ref&lt;Text&gt; create(Document&amp;, const String&amp;);
</span><del>-    static Ref&lt;Text&gt; create(ScriptExecutionContext&amp;, const String&amp;);
</del><span class="cx">     static Ref&lt;Text&gt; createWithLengthLimit(Document&amp;, const String&amp;, unsigned positionInString, unsigned lengthLimit = defaultLengthLimit);
</span><span class="cx">     static Ref&lt;Text&gt; createEditingText(Document&amp;, const String&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomTextidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Text.idl (177863 => 177864)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Text.idl        2015-01-02 18:17:05 UTC (rev 177863)
+++ trunk/Source/WebCore/dom/Text.idl        2015-01-02 18:18:40 UTC (rev 177864)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx">  */
</span><span class="cx"> [
</span><span class="cx">     Constructor([Default=NullString] optional DOMString data),
</span><del>-    ConstructorCallWith=ScriptExecutionContext
</del><ins>+    ConstructorCallWith=Document
</ins><span class="cx"> ] interface Text : CharacterData {
</span><span class="cx"> 
</span><span class="cx">     // DOM Level 1
</span></span></pre>
</div>
</div>

</body>
</html>