<!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>[190239] 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/190239">190239</a></dd>
<dt>Author</dt> <dd>youenn.fablet@crf.canon.fr</dd>
<dt>Date</dt> <dd>2015-09-25 02:57:22 -0700 (Fri, 25 Sep 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove the need for DOMClass in case of JSBuiltinConstructor WebIDL
https://bugs.webkit.org/show_bug.cgi?id=149522
Reviewed by Darin Adler.
Adding generation of the dummy DOM class for JSBuiltinConstructor interfaces.
This is applied to CountQueuingStrategy.
Covered by existing tests of CountQueuingStrategy.
* Modules/streams/CountQueuingStrategy.h: Removed.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader): Removal of DOM class header include and generation of dummy class.
(GenerateImplementation): Removal of DOM class header include.
(UseDummyDOMClass): Helper routine.
(GenerateDummyDOMClassForJSBuiltin): Ditto.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreModulesstreamsCountQueuingStrategyh">trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (190238 => 190239)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-09-25 09:42:20 UTC (rev 190238)
+++ trunk/Source/WebCore/ChangeLog        2015-09-25 09:57:22 UTC (rev 190239)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-09-25 Youenn Fablet <youenn.fablet@crf.canon.fr>
+
+ Remove the need for DOMClass in case of JSBuiltinConstructor WebIDL
+ https://bugs.webkit.org/show_bug.cgi?id=149522
+
+ Reviewed by Darin Adler.
+
+ Adding generation of the dummy DOM class for JSBuiltinConstructor interfaces.
+ This is applied to CountQueuingStrategy.
+
+ Covered by existing tests of CountQueuingStrategy.
+
+ * Modules/streams/CountQueuingStrategy.h: Removed.
+ * WebCore.vcxproj/WebCore.vcxproj: Ditto.
+ * WebCore.xcodeproj/project.pbxproj: Ditto.
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateHeader): Removal of DOM class header include and generation of dummy class.
+ (GenerateImplementation): Removal of DOM class header include.
+ (UseDummyDOMClass): Helper routine.
+ (GenerateDummyDOMClassForJSBuiltin): Ditto.
+
</ins><span class="cx"> 2015-09-24 Brent Fulgham <bfulgham@apple.com>
</span><span class="cx">
</span><span class="cx"> [Win] Support composited content in WebView render-to-context methods
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesstreamsCountQueuingStrategyh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.h (190238 => 190239)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.h        2015-09-25 09:42:20 UTC (rev 190238)
+++ trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.h        2015-09-25 09:57:22 UTC (rev 190239)
</span><span class="lines">@@ -1,56 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Canon Inc.
- * Copyright (C) 2015 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted, provided that the following conditions
- * are required to be met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Canon Inc. nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY CANON INC. AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL CANON INC. AND ITS CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef CountQueuingStrategy_h
-#define CountQueuingStrategy_h
-
-#if ENABLE(STREAMS_API)
-
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
-
-namespace WebCore {
-
-// CountQueuingStrategy is implemented as JS builtin.
-// This class only serves to integrate with WebIDL auto-generated code.
-class CountQueuingStrategy : public RefCounted<CountQueuingStrategy> {
-public:
- static Ref<CountQueuingStrategy> create() { return adoptRef(*new CountQueuingStrategy); }
-
- virtual ~CountQueuingStrategy() { }
-
-private:
- CountQueuingStrategy() { }
-};
-
-}
-
-#endif
-
-#endif // CountQueuingStrategy_h
</del></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (190238 => 190239)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-09-25 09:42:20 UTC (rev 190238)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-09-25 09:57:22 UTC (rev 190239)
</span><span class="lines">@@ -20561,7 +20561,6 @@
</span><span class="cx"> <ClInclude Include="..\Modules\notifications\NotificationClient.h" />
</span><span class="cx"> <ClInclude Include="..\Modules\notifications\WorkerGlobalScopeNotifications.h" />
</span><span class="cx"> <ClInclude Include="..\Modules\plugins\PluginReplacement.h" />
</span><del>- <ClInclude Include="..\Modules\streams\CountQueuingStrategy.h" />
</del><span class="cx"> <ClInclude Include="..\Modules\streams\ReadableStream.h" />
</span><span class="cx"> <ClInclude Include="..\Modules\streams\ReadableStreamController.h" />
</span><span class="cx"> <ClInclude Include="..\Modules\streams\ReadableStreamReader.h" />
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (190238 => 190239)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-09-25 09:42:20 UTC (rev 190238)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-09-25 09:57:22 UTC (rev 190239)
</span><span class="lines">@@ -619,7 +619,6 @@
</span><span class="cx">                 1479FAF4109AE37500DED655 /* RenderRubyText.h in Headers */ = {isa = PBXBuildFile; fileRef = 1479FAEC109AE37500DED655 /* RenderRubyText.h */; };
</span><span class="cx">                 148AFDA50AF58360008CC700 /* ExceptionHandlers.h in Headers */ = {isa = PBXBuildFile; fileRef = 148AFDA30AF58360008CC700 /* ExceptionHandlers.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 148AFDA60AF58360008CC700 /* ExceptionHandlers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */; };
</span><del>-                148B4FFE1B6904AA00C954E4 /* CountQueuingStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 148B4FFD1B6904AA00C954E4 /* CountQueuingStrategy.h */; };
</del><span class="cx">                 14947FFD12F80CD200A0F631 /* DocumentOrderedMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14947FFB12F80CD200A0F631 /* DocumentOrderedMap.cpp */; };
</span><span class="cx">                 14947FFE12F80CD200A0F631 /* DocumentOrderedMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 14947FFC12F80CD200A0F631 /* DocumentOrderedMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 14993BE50B2F2B1C0050497F /* FocusController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14993BE30B2F2B1C0050497F /* FocusController.cpp */; };
</span><span class="lines">@@ -7798,7 +7797,6 @@
</span><span class="cx">                 14813BF309EDF88E00F757E1 /* IDLParser.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; name = IDLParser.pm; path = scripts/IDLParser.pm; sourceTree = "<group>"; };
</span><span class="cx">                 148AFDA30AF58360008CC700 /* ExceptionHandlers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ExceptionHandlers.h; sourceTree = "<group>"; };
</span><span class="cx">                 148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ExceptionHandlers.mm; sourceTree = "<group>"; };
</span><del>-                148B4FFD1B6904AA00C954E4 /* CountQueuingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CountQueuingStrategy.h; sourceTree = "<group>"; };
</del><span class="cx">                 148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CountQueuingStrategy.idl; sourceTree = "<group>"; };
</span><span class="cx">                 14947FFB12F80CD200A0F631 /* DocumentOrderedMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentOrderedMap.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 14947FFC12F80CD200A0F631 /* DocumentOrderedMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentOrderedMap.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -16202,7 +16200,6 @@
</span><span class="cx">                 41A023EA1A39DB7900F722CF /* streams */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                148B4FFD1B6904AA00C954E4 /* CountQueuingStrategy.h */,
</del><span class="cx">                                 148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */,
</span><span class="cx">                                 41A023EB1A39DB7900F722CF /* ReadableStream.cpp */,
</span><span class="cx">                                 41A023EC1A39DB7900F722CF /* ReadableStream.h */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (190238 => 190239)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-09-25 09:42:20 UTC (rev 190238)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2015-09-25 09:57:22 UTC (rev 190239)
</span><span class="lines">@@ -866,6 +866,8 @@
</span><span class="cx">
</span><span class="cx"> my $exportLabel = ExportLabelForClass($className);
</span><span class="cx">
</span><ins>+ GenerateDummyDOMClassForJSBuiltin($implType) if UseDummyDOMClass($interface);
+
</ins><span class="cx"> # Class declaration
</span><span class="cx"> push(@headerContent, "class $exportLabel$className : public $parentClassName {\n");
</span><span class="cx">
</span><span class="lines">@@ -898,7 +900,7 @@
</span><span class="cx"> push(@headerContent, " return ptr;\n");
</span><span class="cx"> push(@headerContent, " }\n\n");
</span><span class="cx"> } else {
</span><del>- AddIncludesForTypeInHeader($implType) unless $svgPropertyOrListPropertyType;
</del><ins>+ AddIncludesForTypeInHeader($implType) unless $svgPropertyOrListPropertyType || UseDummyDOMClass($interface);
</ins><span class="cx"> push(@headerContent, " static $className* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<$implType>&& impl)\n");
</span><span class="cx"> push(@headerContent, " {\n");
</span><span class="cx"> push(@headerContent, " $className* ptr = new (NotNull, JSC::allocateCell<$className>(globalObject->vm().heap)) $className(structure, globalObject, WTF::move(impl));\n");
</span><span class="lines">@@ -1746,7 +1748,7 @@
</span><span class="cx"> $implIncludes{"<runtime/PropertyNameArray.h>"} = 1 if $indexedGetterFunction;
</span><span class="cx">
</span><span class="cx"> my $implType = GetImplClassName($interfaceName);
</span><del>- AddIncludesForTypeInImpl($implType);
</del><ins>+ AddIncludesForTypeInImpl($implType) if not UseDummyDOMClass($interface);
</ins><span class="cx">
</span><span class="cx"> AddIncludesForJSBuiltinMethods($interface);
</span><span class="cx">
</span><span class="lines">@@ -5082,4 +5084,22 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+sub UseDummyDOMClass()
+{
+ my $interface = shift;
+
+ return $interface->extendedAttributes->{"JSBuiltinConstructor"};
+}
+
+sub GenerateDummyDOMClassForJSBuiltin()
+{
+ my $className = shift;
+
+ push(@headerContent, "class $className : public RefCounted<$className> {\n");
+ push(@headerContent, "public:\n");
+ push(@headerContent, " static Ref<$className> create() { return adoptRef(* new $className); }\n");
+ push(@headerContent, " virtual ~$className() { }\n");
+ push(@headerContent, "};\n\n");
+}
+
</ins><span class="cx"> 1;
</span></span></pre>
</div>
</div>
</body>
</html>