Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (204744 => 204745)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-08-22 23:23:26 UTC (rev 204745)
@@ -1,5 +1,16 @@
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
+
+ Reviewed by Ryosuke Niwa.
+
+ Rebaseline W3C test now that more checks are passing.
+
+ * web-platform-tests/html/dom/interfaces-expected.txt:
+
+2016-08-22 Chris Dumez <cdu...@apple.com>
+
Add support for GlobalEventHandlers.oncuechange attribute
https://bugs.webkit.org/show_bug.cgi?id=161046
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (204744 => 204745)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt 2016-08-22 23:23:26 UTC (rev 204745)
@@ -4790,9 +4790,9 @@
PASS CanvasRenderingContext2D interface: existence and properties of interface object
PASS CanvasRenderingContext2D interface object length
PASS CanvasRenderingContext2D interface object name
-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
PASS CanvasRenderingContext2D interface: existence and properties of interface prototype object's "constructor" property
-FAIL CanvasRenderingContext2D interface: attribute canvas assert_own_property: expected property "canvas" missing
+PASS CanvasRenderingContext2D interface: attribute canvas
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 (204744 => 204745)
--- trunk/Source/WebCore/CMakeLists.txt 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/CMakeLists.txt 2016-08-22 23:23:26 UTC (rev 204745)
@@ -544,7 +544,6 @@
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
@@ -1124,7 +1123,6 @@
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 (204744 => 204745)
--- trunk/Source/WebCore/ChangeLog 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/ChangeLog 2016-08-22 23:23:26 UTC (rev 204745)
@@ -1,3 +1,41 @@
+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
+
+ Reviewed by Ryosuke Niwa.
+
+ CanvasRenderingContext2D should not have a CanvasRenderingContext parent interface
+ as per:
+ - https://html.spec.whatwg.org/multipage/scripting.html#canvasrenderingcontext2d
+
+ Firefox and Chrome agree with the specification.
+
+ No new tests, rebaselined existing test.
+
+ * CMakeLists.txt:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSBindingsAllInOne.cpp:
+ * bindings/js/JSCanvasRenderingContext.h: Renamed from Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp.
+ (WebCore::toJS):
+ * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
+ (WebCore::JSCanvasRenderingContext2DOwner::isReachableFromOpaqueRoots):
+ (WebCore::JSCanvasRenderingContext2D::visitAdditionalChildren):
+ * bindings/js/JSDocumentCustom.cpp:
+ (WebCore::JSDocument::getCSSCanvasContext):
+ (WebCore::JSDocument::createTouchList): Deleted.
+ * bindings/js/JSHTMLCanvasElementCustom.cpp:
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateImplementation):
+ * dom/Document.idl:
+ * html/canvas/CanvasRenderingContext.idl: Removed.
+ * html/canvas/CanvasRenderingContext2D.idl:
+ * html/canvas/WebGL2RenderingContext.idl:
+ * html/canvas/WebGLRenderingContext.idl:
+ * html/canvas/WebGLRenderingContextBase.idl:
+
2016-08-22 Johan K. Jensen <johan_jen...@apple.com>
Make NetworkLoadTiming use double for higher precision in Resource Timing
Modified: trunk/Source/WebCore/DerivedSources.cpp (204744 => 204745)
--- trunk/Source/WebCore/DerivedSources.cpp 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/DerivedSources.cpp 2016-08-22 23:23:26 UTC (rev 204745)
@@ -48,7 +48,6 @@
#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 (204744 => 204745)
--- trunk/Source/WebCore/DerivedSources.make 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/DerivedSources.make 2016-08-22 23:23:26 UTC (rev 204745)
@@ -453,7 +453,6 @@
$(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 (204744 => 204745)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-08-22 23:23:26 UTC (rev 204745)
@@ -1713,6 +1713,7 @@
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 */; };
@@ -1838,7 +1839,6 @@
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,7 +1846,6 @@
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 */; };
@@ -8631,6 +8630,7 @@
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,7 +8729,6 @@
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>"; };
@@ -8770,7 +8769,6 @@
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>"; };
@@ -8778,7 +8776,6 @@
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>"; };
@@ -16053,7 +16050,6 @@
49484FB8102CF23C00188DD3 /* CanvasProxy.idl */,
49C7B9BC1042D32F0009D447 /* CanvasRenderingContext.cpp */,
49C7B9BD1042D32F0009D447 /* CanvasRenderingContext.h */,
- 49C7B9BE1042D32F0009D447 /* CanvasRenderingContext.idl */,
49484FBC102CF23C00187DD3 /* CanvasRenderingContext2D.cpp */,
49484FBD102CF23C00187DD3 /* CanvasRenderingContext2D.h */,
49484FBE102CF23C00187DD3 /* CanvasRenderingContext2D.idl */,
@@ -18680,7 +18676,6 @@
65DF323509D1DE65000BE325 /* JSCanvasPattern.cpp */,
65DF323609D1DE65000BE325 /* JSCanvasPattern.h */,
65DF323609D1DE65001BE325 /* JSCanvasProxy.h */,
- 49EED13C1051969400099FAB /* JSCanvasRenderingContext.cpp */,
49EED13D1051969400099FAB /* JSCanvasRenderingContext.h */,
49EED13E1051969400099FAB /* JSCanvasRenderingContext2D.cpp */,
49EED13F1051969400099FAB /* JSCanvasRenderingContext2D.h */,
@@ -20911,7 +20906,7 @@
FD8AA63B1695148E00D2EA68 /* JSBiquadFilterNodeCustom.cpp */,
8931DE5A14C44C44000DC9D2 /* JSBlobCustom.cpp */,
49EED14B1051971900099FAB /* JSCanvasRenderingContext2DCustom.cpp */,
- 49EED14D1051971A00099FAB /* JSCanvasRenderingContextCustom.cpp */,
+ 4659D2701D6B909F0096FD86 /* JSCanvasRenderingContext.h */,
7C33F3581B4A044800502CAF /* JSCharacterDataCustom.cpp */,
46A58AC41D46B3FA00432036 /* JSClientRectCustom.cpp */,
A584FE371864DAC100843B10 /* JSCommandLineAPIHostCustom.cpp */,
@@ -24944,6 +24939,7 @@
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 */,
@@ -28290,10 +28286,8 @@
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 (204744 => 204745)
--- trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp 2016-08-22 23:23:26 UTC (rev 204745)
@@ -41,7 +41,6 @@
#include "JSCSSValueCustom.cpp"
#include "JSCallbackData.cpp"
#include "JSCanvasRenderingContext2DCustom.cpp"
-#include "JSCanvasRenderingContextCustom.cpp"
#include "JSCharacterDataCustom.cpp"
#include "JSClientRectCustom.cpp"
#include "JSCommandLineAPIHostCustom.cpp"
Copied: trunk/Source/WebCore/bindings/js/JSCanvasRenderingContext.h (from rev 204744, trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp) (0 => 204745)
--- trunk/Source/WebCore/bindings/js/JSCanvasRenderingContext.h (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSCanvasRenderingContext.h 2016-08-22 23:23:26 UTC (rev 204745)
@@ -0,0 +1,56 @@
+/*
+ * 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 (204744 => 204745)
--- trunk/Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp 2016-08-22 23:23:26 UTC (rev 204745)
@@ -38,6 +38,18 @@
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())
Deleted: trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp (204744 => 204745)
--- trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp 2016-08-22 23:23:26 UTC (rev 204745)
@@ -1,68 +0,0 @@
-/*
- * 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 (204744 => 204745)
--- trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp 2016-08-22 23:23:26 UTC (rev 204745)
@@ -24,7 +24,9 @@
#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"
@@ -141,6 +143,25 @@
}
#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 (204744 => 204745)
--- trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp 2016-08-22 23:23:26 UTC (rev 204745)
@@ -29,6 +29,7 @@
#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 (204744 => 204745)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2016-08-22 23:23:26 UTC (rev 204745)
@@ -3538,10 +3538,6 @@
$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 (204744 => 204745)
--- trunk/Source/WebCore/dom/Document.idl 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/dom/Document.idl 2016-08-22 23:23:26 UTC (rev 204745)
@@ -171,7 +171,8 @@
CSSStyleDeclaration createCSSStyleDeclaration();
#endif
- CanvasRenderingContext getCSSCanvasContext(DOMString contextId, DOMString name, long width, long height);
+ // 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);
HTMLCollection getElementsByClassName(DOMString classNames);
Deleted: trunk/Source/WebCore/html/canvas/CanvasRenderingContext.idl (204744 => 204745)
--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext.idl 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext.idl 2016-08-22 23:23:26 UTC (rev 204745)
@@ -1,34 +0,0 @@
-/*
- * 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 (204744 => 204745)
--- trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl 2016-08-22 23:23:26 UTC (rev 204745)
@@ -26,8 +26,15 @@
enum ImageSmoothingQuality { "low", "medium", "high" };
enum CanvasWindingRule { "nonzero", "evenodd" };
-interface CanvasRenderingContext2D : CanvasRenderingContext {
+[
+ CustomIsReachable,
+ JSGenerateToJSObject,
+ JSCustomMarkFunction,
+] interface CanvasRenderingContext2D {
+ // back-reference to the canvas
+ readonly attribute HTMLCanvasElement canvas;
+
void save();
void restore();
Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl (204744 => 204745)
--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl 2016-08-22 23:23:26 UTC (rev 204745)
@@ -44,6 +44,7 @@
Conditional=WEBGL2,
EnabledAtRuntime=WebGL2,
JSCustomMarkFunction,
+ JSGenerateToJSObject,
DoNotCheckConstants,
] interface WebGL2RenderingContext : WebGLRenderingContextBase {
const GLenum READ_BUFFER = 0x0C02;
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.idl (204744 => 204745)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.idl 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.idl 2016-08-22 23:23:26 UTC (rev 204745)
@@ -26,6 +26,7 @@
[
Conditional=WEBGL,
JSCustomMarkFunction,
+ JSGenerateToJSObject,
DoNotCheckConstants,
] interface WebGLRenderingContext : WebGLRenderingContextBase {
};
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl (204744 => 204745)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl 2016-08-22 23:18:09 UTC (rev 204744)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl 2016-08-22 23:23:26 UTC (rev 204745)
@@ -43,8 +43,11 @@
DoNotCheckConstants,
JSCustomMarkFunction,
NoInterfaceObject,
-] interface WebGLRenderingContextBase : CanvasRenderingContext {
+] interface WebGLRenderingContextBase {
+ // back-reference to the canvas
+ readonly attribute HTMLCanvasElement canvas;
+
/* ClearBufferMask */
const GLenum DEPTH_BUFFER_BIT = 0x00000100;
const GLenum STENCIL_BUFFER_BIT = 0x00000400;