Title: [204748] trunk

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (204747 => 204748)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-08-23 00:03:15 UTC (rev 204748)
@@ -1,5 +1,18 @@
 2016-08-22  Chris Dumez  <cdu...@apple.com>
 
+        Unreviewed, rolling out r204745.
+
+        Broke the Windows build
+
+        Reverted changeset:
+
+        "CanvasRenderingContext2D should not have a
+        CanvasRenderingContext parent interface"
+        https://bugs.webkit.org/show_bug.cgi?id=161054
+        http://trac.webkit.org/changeset/204745
+
+2016-08-22  Chris Dumez  <cdu...@apple.com>
+
         CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
         https://bugs.webkit.org/show_bug.cgi?id=161054
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (204747 => 204748)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt	2016-08-23 00:03:15 UTC (rev 204748)
@@ -4790,9 +4790,9 @@
 PASS CanvasRenderingContext2D interface: existence and properties of interface object 
 PASS CanvasRenderingContext2D interface object length 
 PASS CanvasRenderingContext2D interface object name 
-PASS CanvasRenderingContext2D interface: existence and properties of interface prototype object 
+FAIL CanvasRenderingContext2D interface: existence and properties of interface prototype object assert_equals: prototype of CanvasRenderingContext2D.prototype is not Object.prototype expected object "[object Object]" but got object "[object CanvasRenderingContextPrototype]"
 PASS CanvasRenderingContext2D interface: existence and properties of interface prototype object's "constructor" property 
-PASS CanvasRenderingContext2D interface: attribute canvas 
+FAIL CanvasRenderingContext2D interface: attribute canvas assert_own_property: expected property "canvas" missing
 PASS CanvasRenderingContext2D interface: operation save() 
 PASS CanvasRenderingContext2D interface: operation restore() 
 PASS CanvasRenderingContext2D interface: operation scale(unrestricted double,unrestricted double) 

Modified: trunk/Source/WebCore/CMakeLists.txt (204747 => 204748)


--- trunk/Source/WebCore/CMakeLists.txt	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/CMakeLists.txt	2016-08-23 00:03:15 UTC (rev 204748)
@@ -544,6 +544,7 @@
     html/canvas/CanvasPath.idl
     html/canvas/CanvasPattern.idl
     html/canvas/CanvasProxy.idl
+    html/canvas/CanvasRenderingContext.idl
     html/canvas/CanvasRenderingContext2D.idl
     html/canvas/DOMPath.idl
     html/canvas/EXTBlendMinMax.idl
@@ -1123,6 +1124,7 @@
     bindings/js/JSCSSValueCustom.cpp
     bindings/js/JSCallbackData.cpp
     bindings/js/JSCanvasRenderingContext2DCustom.cpp
+    bindings/js/JSCanvasRenderingContextCustom.cpp
     bindings/js/JSCharacterDataCustom.cpp
     bindings/js/JSClientRectCustom.cpp
     bindings/js/JSCommandLineAPIHostCustom.cpp

Modified: trunk/Source/WebCore/ChangeLog (204747 => 204748)


--- trunk/Source/WebCore/ChangeLog	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/ChangeLog	2016-08-23 00:03:15 UTC (rev 204748)
@@ -1,5 +1,18 @@
 2016-08-22  Chris Dumez  <cdu...@apple.com>
 
+        Unreviewed, rolling out r204745.
+
+        Broke the Windows build
+
+        Reverted changeset:
+
+        "CanvasRenderingContext2D should not have a
+        CanvasRenderingContext parent interface"
+        https://bugs.webkit.org/show_bug.cgi?id=161054
+        http://trac.webkit.org/changeset/204745
+
+2016-08-22  Chris Dumez  <cdu...@apple.com>
+
         CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
         https://bugs.webkit.org/show_bug.cgi?id=161054
 

Modified: trunk/Source/WebCore/DerivedSources.cpp (204747 => 204748)


--- trunk/Source/WebCore/DerivedSources.cpp	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/DerivedSources.cpp	2016-08-23 00:03:15 UTC (rev 204748)
@@ -48,6 +48,7 @@
 #include "JSCanvasGradient.cpp"
 #include "JSCanvasPattern.cpp"
 #include "JSCanvasProxy.cpp"
+#include "JSCanvasRenderingContext.cpp"
 #include "JSCanvasRenderingContext2D.cpp"
 #if ENABLE(STREAMS_API)
 #include "JSByteLengthQueuingStrategy.cpp"

Modified: trunk/Source/WebCore/DerivedSources.make (204747 => 204748)


--- trunk/Source/WebCore/DerivedSources.make	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/DerivedSources.make	2016-08-23 00:03:15 UTC (rev 204748)
@@ -453,6 +453,7 @@
     $(WebCore)/html/canvas/CanvasPath.idl \
     $(WebCore)/html/canvas/CanvasPattern.idl \
     $(WebCore)/html/canvas/CanvasProxy.idl \
+    $(WebCore)/html/canvas/CanvasRenderingContext.idl \
     $(WebCore)/html/canvas/CanvasRenderingContext2D.idl \
     $(WebCore)/html/canvas/DOMPath.idl \
     $(WebCore)/html/canvas/EXTBlendMinMax.idl \

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (204747 => 204748)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-08-23 00:03:15 UTC (rev 204748)
@@ -1713,7 +1713,6 @@
 		4634592C1AC2271000ECB71C /* PowerObserverMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4634592B1AC2271000ECB71C /* PowerObserverMac.cpp */; };
 		463EB6221B8789E00096ED51 /* TagCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 463EB6201B8789CB0096ED51 /* TagCollection.cpp */; };
 		463EB6231B8789E00096ED51 /* TagCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 463EB6211B8789CB0096ED51 /* TagCollection.h */; };
-		4659D2711D6B90A50096FD86 /* JSCanvasRenderingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4659D2701D6B909F0096FD86 /* JSCanvasRenderingContext.h */; };
 		465A8E791C8A24CE00E7D3E4 /* RuntimeApplicationChecks.mm in Sources */ = {isa = PBXBuildFile; fileRef = 465A8E781C8A24CE00E7D3E4 /* RuntimeApplicationChecks.mm */; };
 		4669B2871B852A0B000F905F /* JSDOMNamedFlowCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46F2768E1B85297F005C2556 /* JSDOMNamedFlowCollectionCustom.cpp */; };
 		4671E0651D67A59600C6B497 /* CanvasPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4671E0631D67A57B00C6B497 /* CanvasPath.cpp */; };
@@ -1839,6 +1838,7 @@
 		49ECEB6E1499790D00CDD3A4 /* FilterOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 49ECEB641499790D00CDD3A4 /* FilterOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		49ECEB6F1499790D00CDD3A4 /* FilterOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49ECEB651499790D00CDD3A4 /* FilterOperations.cpp */; };
 		49ECEB701499790D00CDD3A4 /* FilterOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 49ECEB661499790D00CDD3A4 /* FilterOperations.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		49EED1421051969400099FAB /* JSCanvasRenderingContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49EED13C1051969400099FAB /* JSCanvasRenderingContext.cpp */; };
 		49EED1431051969400099FAB /* JSCanvasRenderingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 49EED13D1051969400099FAB /* JSCanvasRenderingContext.h */; };
 		49EED1441051969400099FAB /* JSCanvasRenderingContext2D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49EED13E1051969400099FAB /* JSCanvasRenderingContext2D.cpp */; };
 		49EED1451051969400099FAB /* JSCanvasRenderingContext2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 49EED13F1051969400099FAB /* JSCanvasRenderingContext2D.h */; };
@@ -1846,6 +1846,7 @@
 		49EED1471051969400099FAB /* JSWebGLRenderingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 49EED1411051969400099FAB /* JSWebGLRenderingContext.h */; };
 		49EED14E1051971A00099FAB /* JSCanvasRenderingContext2DCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49EED14B1051971900099FAB /* JSCanvasRenderingContext2DCustom.cpp */; };
 		49EED14F1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49EED14C1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp */; };
+		49EED1501051971A00099FAB /* JSCanvasRenderingContextCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49EED14D1051971A00099FAB /* JSCanvasRenderingContextCustom.cpp */; };
 		49FC7A501444AF5F00A5D864 /* DisplayRefreshMonitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49FC7A4F1444AF5F00A5D864 /* DisplayRefreshMonitor.cpp */; };
 		49FFBF1D11C8550E006A7118 /* GraphicsContext3DMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 49FFBF1C11C8550E006A7118 /* GraphicsContext3DMac.mm */; };
 		49FFBF3F11C93EE3006A7118 /* WebGLLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 49FFBF3D11C93EE3006A7118 /* WebGLLayer.h */; };
@@ -8630,7 +8631,6 @@
 		4634592B1AC2271000ECB71C /* PowerObserverMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PowerObserverMac.cpp; sourceTree = "<group>"; };
 		463EB6201B8789CB0096ED51 /* TagCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TagCollection.cpp; sourceTree = "<group>"; };
 		463EB6211B8789CB0096ED51 /* TagCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagCollection.h; sourceTree = "<group>"; };
-		4659D2701D6B909F0096FD86 /* JSCanvasRenderingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCanvasRenderingContext.h; sourceTree = "<group>"; };
 		465A8E781C8A24CE00E7D3E4 /* RuntimeApplicationChecks.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RuntimeApplicationChecks.mm; sourceTree = "<group>"; };
 		4671E0631D67A57B00C6B497 /* CanvasPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasPath.cpp; sourceTree = "<group>"; };
 		4671E0641D67A57B00C6B497 /* CanvasPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasPath.h; sourceTree = "<group>"; };
@@ -8729,6 +8729,7 @@
 		49C7B9BB1042D32F0009D447 /* WebGLRenderbuffer.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGLRenderbuffer.idl; sourceTree = "<group>"; };
 		49C7B9BC1042D32F0009D447 /* CanvasRenderingContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasRenderingContext.cpp; sourceTree = "<group>"; };
 		49C7B9BD1042D32F0009D447 /* CanvasRenderingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CanvasRenderingContext.h; sourceTree = "<group>"; };
+		49C7B9BE1042D32F0009D447 /* CanvasRenderingContext.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CanvasRenderingContext.idl; sourceTree = "<group>"; };
 		49C7B9BF1042D32F0009D447 /* WebGLRenderingContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebGLRenderingContext.cpp; sourceTree = "<group>"; };
 		49C7B9C01042D32F0009D447 /* WebGLRenderingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLRenderingContext.h; sourceTree = "<group>"; };
 		49C7B9C11042D32F0009D447 /* WebGLRenderingContext.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebGLRenderingContext.idl; sourceTree = "<group>"; };
@@ -8769,6 +8770,7 @@
 		49ECEB641499790D00CDD3A4 /* FilterOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterOperation.h; sourceTree = "<group>"; };
 		49ECEB651499790D00CDD3A4 /* FilterOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FilterOperations.cpp; sourceTree = "<group>"; };
 		49ECEB661499790D00CDD3A4 /* FilterOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterOperations.h; sourceTree = "<group>"; };
+		49EED13C1051969400099FAB /* JSCanvasRenderingContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCanvasRenderingContext.cpp; sourceTree = "<group>"; };
 		49EED13D1051969400099FAB /* JSCanvasRenderingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCanvasRenderingContext.h; sourceTree = "<group>"; };
 		49EED13E1051969400099FAB /* JSCanvasRenderingContext2D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCanvasRenderingContext2D.cpp; sourceTree = "<group>"; };
 		49EED13F1051969400099FAB /* JSCanvasRenderingContext2D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCanvasRenderingContext2D.h; sourceTree = "<group>"; };
@@ -8776,6 +8778,7 @@
 		49EED1411051969400099FAB /* JSWebGLRenderingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLRenderingContext.h; sourceTree = "<group>"; };
 		49EED14B1051971900099FAB /* JSCanvasRenderingContext2DCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCanvasRenderingContext2DCustom.cpp; sourceTree = "<group>"; };
 		49EED14C1051971A00099FAB /* JSWebGLRenderingContextCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLRenderingContextCustom.cpp; sourceTree = "<group>"; };
+		49EED14D1051971A00099FAB /* JSCanvasRenderingContextCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCanvasRenderingContextCustom.cpp; sourceTree = "<group>"; };
 		49FC7A4F1444AF5F00A5D864 /* DisplayRefreshMonitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DisplayRefreshMonitor.cpp; sourceTree = "<group>"; };
 		49FFBF1C11C8550E006A7118 /* GraphicsContext3DMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GraphicsContext3DMac.mm; sourceTree = "<group>"; };
 		49FFBF3D11C93EE3006A7118 /* WebGLLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLLayer.h; sourceTree = "<group>"; };
@@ -16050,6 +16053,7 @@
 				49484FB8102CF23C00188DD3 /* CanvasProxy.idl */,
 				49C7B9BC1042D32F0009D447 /* CanvasRenderingContext.cpp */,
 				49C7B9BD1042D32F0009D447 /* CanvasRenderingContext.h */,
+				49C7B9BE1042D32F0009D447 /* CanvasRenderingContext.idl */,
 				49484FBC102CF23C00187DD3 /* CanvasRenderingContext2D.cpp */,
 				49484FBD102CF23C00187DD3 /* CanvasRenderingContext2D.h */,
 				49484FBE102CF23C00187DD3 /* CanvasRenderingContext2D.idl */,
@@ -18676,6 +18680,7 @@
 				65DF323509D1DE65000BE325 /* JSCanvasPattern.cpp */,
 				65DF323609D1DE65000BE325 /* JSCanvasPattern.h */,
 				65DF323609D1DE65001BE325 /* JSCanvasProxy.h */,
+				49EED13C1051969400099FAB /* JSCanvasRenderingContext.cpp */,
 				49EED13D1051969400099FAB /* JSCanvasRenderingContext.h */,
 				49EED13E1051969400099FAB /* JSCanvasRenderingContext2D.cpp */,
 				49EED13F1051969400099FAB /* JSCanvasRenderingContext2D.h */,
@@ -20906,7 +20911,7 @@
 				FD8AA63B1695148E00D2EA68 /* JSBiquadFilterNodeCustom.cpp */,
 				8931DE5A14C44C44000DC9D2 /* JSBlobCustom.cpp */,
 				49EED14B1051971900099FAB /* JSCanvasRenderingContext2DCustom.cpp */,
-				4659D2701D6B909F0096FD86 /* JSCanvasRenderingContext.h */,
+				49EED14D1051971A00099FAB /* JSCanvasRenderingContextCustom.cpp */,
 				7C33F3581B4A044800502CAF /* JSCharacterDataCustom.cpp */,
 				46A58AC41D46B3FA00432036 /* JSClientRectCustom.cpp */,
 				A584FE371864DAC100843B10 /* JSCommandLineAPIHostCustom.cpp */,
@@ -24939,7 +24944,6 @@
 				FD23A12613F5FA5900F67001 /* JSMediaElementAudioSourceNode.h in Headers */,
 				E44614190CD6826900FADA75 /* JSMediaError.h in Headers */,
 				BC3C39B70C0D3D8D005F4D7A /* JSMediaList.h in Headers */,
-				4659D2711D6B90A50096FD86 /* JSCanvasRenderingContext.h in Headers */,
 				93D437A31D57B7E200AB85EA /* JSMediaListCustom.h in Headers */,
 				D3A94A47122DC40F00A37BBC /* JSMediaQueryList.h in Headers */,
 				7C5343FD17B74B63004232F0 /* JSMediaQueryListListener.h in Headers */,
@@ -28286,8 +28290,10 @@
 				1449E287107D4DB400B5793F /* JSCallbackData.cpp in Sources */,
 				65DF323909D1DE65000BE325 /* JSCanvasGradient.cpp in Sources */,
 				65DF323B09D1DE65000BE325 /* JSCanvasPattern.cpp in Sources */,
+				49EED1421051969400099FAB /* JSCanvasRenderingContext.cpp in Sources */,
 				49EED1441051969400099FAB /* JSCanvasRenderingContext2D.cpp in Sources */,
 				49EED14E1051971A00099FAB /* JSCanvasRenderingContext2DCustom.cpp in Sources */,
+				49EED1501051971A00099FAB /* JSCanvasRenderingContextCustom.cpp in Sources */,
 				93F9B7A00BA6032600854064 /* JSCDATASection.cpp in Sources */,
 				FDA15EA112B03EE1003A583A /* JSChannelMergerNode.cpp in Sources */,
 				FDA15EA312B03EE1003A583A /* JSChannelSplitterNode.cpp in Sources */,

Modified: trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp (204747 => 204748)


--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp	2016-08-23 00:03:15 UTC (rev 204748)
@@ -41,6 +41,7 @@
 #include "JSCSSValueCustom.cpp"
 #include "JSCallbackData.cpp"
 #include "JSCanvasRenderingContext2DCustom.cpp"
+#include "JSCanvasRenderingContextCustom.cpp"
 #include "JSCharacterDataCustom.cpp"
 #include "JSClientRectCustom.cpp"
 #include "JSCommandLineAPIHostCustom.cpp"

Deleted: trunk/Source/WebCore/bindings/js/JSCanvasRenderingContext.h (204747 => 204748)


--- trunk/Source/WebCore/bindings/js/JSCanvasRenderingContext.h	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/bindings/js/JSCanvasRenderingContext.h	2016-08-23 00:03:15 UTC (rev 204748)
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. OR
- * 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.
- */
-
-#include "CanvasRenderingContext2D.h"
-#include "JSCanvasRenderingContext2D.h"
-
-#if ENABLE(WEBGL)
-#include "JSWebGL2RenderingContext.h"
-#include "JSWebGLRenderingContext.h"
-#include "WebGL2RenderingContext.h"
-#include "WebGLRenderingContext.h"
-#endif
-
-namespace WebCore {
-
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, CanvasRenderingContext& object)
-{
-#if ENABLE(WEBGL)
-    if (is<WebGLRenderingContext>(object))
-        return wrap(state, globalObject, downcast<WebGLRenderingContext>(object));
-#if ENABLE(WEBGL2)
-    if (is<WebGL2RenderingContext>(object))
-        return wrap(state, globalObject, downcast<WebGL2RenderingContext>(object));
-#endif
-#endif
-    return wrap(state, globalObject, downcast<CanvasRenderingContext2D>(object));
-}
-
-inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, CanvasRenderingContext* object)
-{
-    return object ? toJS(state, globalObject, *object) : JSC::jsNull();
-}
-
-} // namespace WebCore

Modified: trunk/Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp (204747 => 204748)


--- trunk/Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp	2016-08-23 00:03:15 UTC (rev 204748)
@@ -38,18 +38,6 @@
 
 namespace WebCore {
 
-bool JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
-{
-    JSCanvasRenderingContext2D* jsCanvasRenderingContext = jsCast<JSCanvasRenderingContext2D*>(handle.slot()->asCell());
-    void* root = WebCore::root(jsCanvasRenderingContext->wrapped().canvas());
-    return visitor.containsOpaqueRoot(root);
-}
-
-void JSCanvasRenderingContext2D::visitAdditionalChildren(SlotVisitor& visitor)
-{
-    visitor.addOpaqueRoot(root(wrapped().canvas()));
-}
-
 static JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, const CanvasStyle& style)
 {
     if (style.canvasGradient())

Copied: trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp (from rev 204745, trunk/Source/WebCore/bindings/js/JSCanvasRenderingContext.h) (0 => 204748)


--- trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp	                        (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp	2016-08-23 00:03:15 UTC (rev 204748)
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. OR
+ * 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. 
+ */
+
+#include "config.h"
+#include "JSCanvasRenderingContext.h"
+
+#include "CanvasRenderingContext2D.h"
+#include "HTMLCanvasElement.h"
+#include "JSCanvasRenderingContext2D.h"
+#include "JSNode.h"
+
+#if ENABLE(WEBGL)
+#include "JSWebGL2RenderingContext.h"
+#include "JSWebGLRenderingContext.h"
+#include "WebGL2RenderingContext.h"
+#include "WebGLRenderingContext.h"
+#endif
+
+using namespace JSC;
+
+namespace WebCore {
+
+void JSCanvasRenderingContext::visitAdditionalChildren(SlotVisitor& visitor)
+{
+    visitor.addOpaqueRoot(root(wrapped().canvas()));
+}
+
+JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<CanvasRenderingContext>&& object)
+{
+#if ENABLE(WEBGL)
+    if (is<WebGLRenderingContext>(object))
+        return CREATE_DOM_WRAPPER(globalObject, WebGLRenderingContext, WTFMove(object));
+#if ENABLE(WEBGL2)
+    if (is<WebGL2RenderingContext>(object))
+        return CREATE_DOM_WRAPPER(globalObject, WebGL2RenderingContext, WTFMove(object));
+#endif
+#endif
+    return CREATE_DOM_WRAPPER(globalObject, CanvasRenderingContext2D, WTFMove(object));
+}
+
+JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, CanvasRenderingContext& object)
+{
+    return wrap(state, globalObject, object);
+}
+
+} // namespace WebCore

Modified: trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp (204747 => 204748)


--- trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp	2016-08-23 00:03:15 UTC (rev 204748)
@@ -24,9 +24,7 @@
 #include "Frame.h"
 #include "FrameLoader.h"
 #include "HTMLDocument.h"
-#include "JSCanvasRenderingContext.h"
 #include "JSCanvasRenderingContext2D.h"
-#include "JSDOMConvert.h"
 #include "JSDOMWindowCustom.h"
 #include "JSHTMLDocument.h"
 #include "JSLocation.h"
@@ -143,25 +141,6 @@
 }
 #endif
 
-JSValue JSDocument::getCSSCanvasContext(JSC::ExecState& state)
-{
-    if (UNLIKELY(state.argumentCount() < 4))
-        return state.vm().throwException(&state, createNotEnoughArgumentsError(&state));
-    auto contextId = state.uncheckedArgument(0).toWTFString(&state);
-    if (UNLIKELY(state.hadException()))
-        return jsUndefined();
-    auto name = state.uncheckedArgument(1).toWTFString(&state);
-    if (UNLIKELY(state.hadException()))
-        return jsUndefined();
-    auto width = convert<int32_t>(state, state.uncheckedArgument(2), NormalConversion);
-    if (UNLIKELY(state.hadException()))
-        return jsUndefined();
-    auto height = convert<int32_t>(state, state.uncheckedArgument(3), NormalConversion);
-    if (UNLIKELY(state.hadException()))
-        return jsUndefined();
-    return toJS(&state, globalObject(), wrapped().getCSSCanvasContext(WTFMove(contextId), WTFMove(name), WTFMove(width), WTFMove(height)));
-}
-
 void JSDocument::visitAdditionalChildren(SlotVisitor& visitor)
 {
     visitor.addOpaqueRoot(wrapped().scriptExecutionContext());

Modified: trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp (204747 => 204748)


--- trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp	2016-08-23 00:03:15 UTC (rev 204748)
@@ -29,7 +29,6 @@
 
 #include "CanvasContextAttributes.h"
 #include "HTMLCanvasElement.h"
-#include "JSCanvasRenderingContext.h"
 #include "JSCanvasRenderingContext2D.h"
 #include <bindings/ScriptObject.h>
 #include <wtf/GetPtr.h>

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (204747 => 204748)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-08-23 00:03:15 UTC (rev 204748)
@@ -3538,6 +3538,10 @@
                 $rootString .= "    if (!element)\n";
                 $rootString .= "        return false;\n";
                 $rootString .= "    void* root = WebCore::root(element);\n";
+            } elsif ($interfaceName eq "CanvasRenderingContext") {
+                $implIncludes{"Element.h"} = 1;
+                $implIncludes{"JSNodeCustom.h"} = 1;
+                $rootString  = "    void* root = WebCore::root(js${interfaceName}->wrapped().canvas());\n";
             } elsif (GetGenerateIsReachable($interface) eq "ImplOwnerNodeRoot") {
                 $implIncludes{"Element.h"} = 1;
                 $implIncludes{"JSNodeCustom.h"} = 1;

Modified: trunk/Source/WebCore/dom/Document.idl (204747 => 204748)


--- trunk/Source/WebCore/dom/Document.idl	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/dom/Document.idl	2016-08-23 00:03:15 UTC (rev 204748)
@@ -171,8 +171,7 @@
     CSSStyleDeclaration createCSSStyleDeclaration();
 #endif
 
-    // FIXME: This is not standard and has been dropped from Blink already.
-    [Custom] (CanvasRenderingContext2D or WebGLRenderingContextBase) getCSSCanvasContext(DOMString contextId, DOMString name, long width, long height);
+    CanvasRenderingContext getCSSCanvasContext(DOMString contextId, DOMString name, long width, long height);
 
     HTMLCollection getElementsByClassName(DOMString classNames);
 

Copied: trunk/Source/WebCore/html/canvas/CanvasRenderingContext.idl (from rev 204745, trunk/Source/WebCore/html/canvas/WebGLRenderingContext.idl) (0 => 204748)


--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext.idl	                        (rev 0)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext.idl	2016-08-23 00:03:15 UTC (rev 204748)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. OR
+ * 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. 
+ */
+
+[
+    NoInterfaceObject,
+    JSCustomMarkFunction,
+    GenerateIsReachable,
+    CustomToJSObject
+] interface CanvasRenderingContext {
+    readonly attribute HTMLCanvasElement canvas;
+};
+

Modified: trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl (204747 => 204748)


--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl	2016-08-23 00:03:15 UTC (rev 204748)
@@ -26,15 +26,8 @@
 enum ImageSmoothingQuality { "low", "medium", "high" };
 enum CanvasWindingRule { "nonzero", "evenodd" };
 
-[
-    CustomIsReachable,
-    JSGenerateToJSObject,
-    JSCustomMarkFunction,
-] interface CanvasRenderingContext2D {
+interface CanvasRenderingContext2D : CanvasRenderingContext {
 
-    // back-reference to the canvas
-    readonly attribute HTMLCanvasElement canvas;
-
     void save();
     void restore();
 

Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl (204747 => 204748)


--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl	2016-08-23 00:03:15 UTC (rev 204748)
@@ -44,7 +44,6 @@
     Conditional=WEBGL2,
     EnabledAtRuntime=WebGL2,
     JSCustomMarkFunction,
-    JSGenerateToJSObject,
     DoNotCheckConstants,
 ] interface WebGL2RenderingContext : WebGLRenderingContextBase {
     const GLenum READ_BUFFER                                   = 0x0C02;

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.idl (204747 => 204748)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.idl	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.idl	2016-08-23 00:03:15 UTC (rev 204748)
@@ -26,7 +26,6 @@
 [
     Conditional=WEBGL,
     JSCustomMarkFunction,
-    JSGenerateToJSObject,
     DoNotCheckConstants,
 ] interface WebGLRenderingContext : WebGLRenderingContextBase {
 };

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl (204747 => 204748)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl	2016-08-22 23:30:08 UTC (rev 204747)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl	2016-08-23 00:03:15 UTC (rev 204748)
@@ -43,11 +43,8 @@
 DoNotCheckConstants,
 JSCustomMarkFunction,
 NoInterfaceObject,
-] interface WebGLRenderingContextBase {
+] interface WebGLRenderingContextBase : CanvasRenderingContext {
 
-    // back-reference to the canvas
-    readonly attribute HTMLCanvasElement canvas;
-
     /* ClearBufferMask */
     const GLenum DEPTH_BUFFER_BIT = 0x00000100;
     const GLenum STENCIL_BUFFER_BIT = 0x00000400;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to