Diff
Modified: trunk/Source/WebCore/ChangeLog (190238 => 190239)
--- 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)
@@ -1,3 +1,24 @@
+2015-09-25 Youenn Fablet <[email protected]>
+
+ 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.
+
2015-09-24 Brent Fulgham <[email protected]>
[Win] Support composited content in WebView render-to-context methods
Deleted: trunk/Source/WebCore/Modules/streams/CountQueuingStrategy.h (190238 => 190239)
--- 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)
@@ -1,56 +0,0 @@
-/*
- * 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
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (190238 => 190239)
--- 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)
@@ -20561,7 +20561,6 @@
<ClInclude Include="..\Modules\notifications\NotificationClient.h" />
<ClInclude Include="..\Modules\notifications\WorkerGlobalScopeNotifications.h" />
<ClInclude Include="..\Modules\plugins\PluginReplacement.h" />
- <ClInclude Include="..\Modules\streams\CountQueuingStrategy.h" />
<ClInclude Include="..\Modules\streams\ReadableStream.h" />
<ClInclude Include="..\Modules\streams\ReadableStreamController.h" />
<ClInclude Include="..\Modules\streams\ReadableStreamReader.h" />
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (190238 => 190239)
--- 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)
@@ -619,7 +619,6 @@
1479FAF4109AE37500DED655 /* RenderRubyText.h in Headers */ = {isa = PBXBuildFile; fileRef = 1479FAEC109AE37500DED655 /* RenderRubyText.h */; };
148AFDA50AF58360008CC700 /* ExceptionHandlers.h in Headers */ = {isa = PBXBuildFile; fileRef = 148AFDA30AF58360008CC700 /* ExceptionHandlers.h */; settings = {ATTRIBUTES = (Private, ); }; };
148AFDA60AF58360008CC700 /* ExceptionHandlers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */; };
- 148B4FFE1B6904AA00C954E4 /* CountQueuingStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 148B4FFD1B6904AA00C954E4 /* CountQueuingStrategy.h */; };
14947FFD12F80CD200A0F631 /* DocumentOrderedMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14947FFB12F80CD200A0F631 /* DocumentOrderedMap.cpp */; };
14947FFE12F80CD200A0F631 /* DocumentOrderedMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 14947FFC12F80CD200A0F631 /* DocumentOrderedMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
14993BE50B2F2B1C0050497F /* FocusController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14993BE30B2F2B1C0050497F /* FocusController.cpp */; };
@@ -7798,7 +7797,6 @@
14813BF309EDF88E00F757E1 /* IDLParser.pm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; name = IDLParser.pm; path = scripts/IDLParser.pm; sourceTree = "<group>"; };
148AFDA30AF58360008CC700 /* ExceptionHandlers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ExceptionHandlers.h; sourceTree = "<group>"; };
148AFDA40AF58360008CC700 /* ExceptionHandlers.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = ExceptionHandlers.mm; sourceTree = "<group>"; };
- 148B4FFD1B6904AA00C954E4 /* CountQueuingStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CountQueuingStrategy.h; sourceTree = "<group>"; };
148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CountQueuingStrategy.idl; sourceTree = "<group>"; };
14947FFB12F80CD200A0F631 /* DocumentOrderedMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentOrderedMap.cpp; sourceTree = "<group>"; };
14947FFC12F80CD200A0F631 /* DocumentOrderedMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentOrderedMap.h; sourceTree = "<group>"; };
@@ -16202,7 +16200,6 @@
41A023EA1A39DB7900F722CF /* streams */ = {
isa = PBXGroup;
children = (
- 148B4FFD1B6904AA00C954E4 /* CountQueuingStrategy.h */,
148B4FFF1B6904C500C954E4 /* CountQueuingStrategy.idl */,
41A023EB1A39DB7900F722CF /* ReadableStream.cpp */,
41A023EC1A39DB7900F722CF /* ReadableStream.h */,
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (190238 => 190239)
--- 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)
@@ -866,6 +866,8 @@
my $exportLabel = ExportLabelForClass($className);
+ GenerateDummyDOMClassForJSBuiltin($implType) if UseDummyDOMClass($interface);
+
# Class declaration
push(@headerContent, "class $exportLabel$className : public $parentClassName {\n");
@@ -898,7 +900,7 @@
push(@headerContent, " return ptr;\n");
push(@headerContent, " }\n\n");
} else {
- AddIncludesForTypeInHeader($implType) unless $svgPropertyOrListPropertyType;
+ AddIncludesForTypeInHeader($implType) unless $svgPropertyOrListPropertyType || UseDummyDOMClass($interface);
push(@headerContent, " static $className* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<$implType>&& impl)\n");
push(@headerContent, " {\n");
push(@headerContent, " $className* ptr = new (NotNull, JSC::allocateCell<$className>(globalObject->vm().heap)) $className(structure, globalObject, WTF::move(impl));\n");
@@ -1746,7 +1748,7 @@
$implIncludes{"<runtime/PropertyNameArray.h>"} = 1 if $indexedGetterFunction;
my $implType = GetImplClassName($interfaceName);
- AddIncludesForTypeInImpl($implType);
+ AddIncludesForTypeInImpl($implType) if not UseDummyDOMClass($interface);
AddIncludesForJSBuiltinMethods($interface);
@@ -5082,4 +5084,22 @@
}
+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");
+}
+
1;