Changeset 265833 in webkit
- Timestamp:
- Aug 18, 2020 2:24:51 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 11 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r265829 r265833 1 2020-08-18 Kenneth Russell <kbr@chromium.org> 2 3 [WebGL2] Pass user-defined-properties-on-context.html layout test 4 https://bugs.webkit.org/show_bug.cgi?id=215433 5 6 Reviewed by Yusuke Suzuki. 7 8 Rebaseline user-defined-properties-on-context.html, which is now 9 fully passing. 10 11 Add tests of expando properties on 2D and WebGPU contexts. Add a 12 FIXME to the WebGPU test, as that specification no longer defines 13 a canvas rendering context. 14 15 * fast/canvas/2d.context.expando-expected.txt: Added. 16 * fast/canvas/2d.context.expando.html: Added. 17 * webgl/2.0.0/conformance/context/user-defined-properties-on-context-expected.txt: 18 * webgpu/expando-properties-expected.txt: Added. 19 * webgpu/expando-properties.html: Added. 20 1 21 2020-08-18 Karl Rackler <rackler@apple.com> 2 22 -
trunk/LayoutTests/webgl/2.0.0/conformance/context/user-defined-properties-on-context-expected.txt
r265534 r265833 2 2 3 3 Test: ../../resources/webgl_test_files/conformance/context/user-defined-properties-on-context.html 4 5 [ 1: PASS ] WebGL context exists 6 [ 2: FAIL ] gl2.myProperty should be 2 (of type number). Was undefined (of type undefined). 7 [ 3: PASS ] successfullyParsed is true 8 [ FAIL ] 1 failures reported 4 [ PASS ] All tests passed -
trunk/Source/WebCore/ChangeLog
r265832 r265833 1 2020-08-18 Kenneth Russell <kbr@chromium.org> 2 3 [WebGL2] Pass user-defined-properties-on-context.html layout test 4 https://bugs.webkit.org/show_bug.cgi?id=215433 5 6 Reviewed by Yusuke Suzuki. 7 8 Keep the canvas' rendering context alive from the canvas itself by 9 adding a custom mark function for HTMLCanvasElement, and adding a 10 new GenerateIsReachable=ImplCanvasBase extended IDL attribute, 11 used from all rendering context types (2D, WebGL, and WebGPU). 12 13 This patch does not touch OffscreenCanvas since the implementation 14 there seems to be incomplete and there are no associated tests of 15 GC behavior. 16 17 Tests: fast/canvas/2d.context.expando.html 18 webgpu/expando-properties.html 19 20 * Modules/webgpu/GPUCanvasContext.idl: 21 * Sources.txt: 22 * WebCore.xcodeproj/project.pbxproj: 23 * bindings/js/JSHTMLCanvasElementCustom.cpp: Copied from Source/WebCore/html/canvas/WebGLRenderingContext.idl. 24 (WebCore::JSHTMLCanvasElement::visitAdditionalChildren): 25 * bindings/scripts/CodeGeneratorJS.pm: 26 (GenerateImplementation): 27 * bindings/scripts/IDLAttributes.json: 28 * html/HTMLCanvasElement.idl: 29 * html/canvas/WebGL2RenderingContext.idl: 30 * html/canvas/WebGLRenderingContext.idl: 31 1 32 2020-08-18 Chris Dumez <cdumez@apple.com> 2 33 -
trunk/Source/WebCore/Modules/webgpu/GPUCanvasContext.idl
r251053 r265833 40 40 ActiveDOMObject, 41 41 Conditional=WEBGPU, 42 EnabledAtRuntime=WebGPU 42 EnabledAtRuntime=WebGPU, 43 GenerateIsReachable=ImplCanvasBase 43 44 ] interface GPUCanvasContext { 44 45 // back-reference to the canvas -
trunk/Source/WebCore/Sources.txt
r265797 r265833 510 510 bindings/js/JSFetchEventCustom.cpp 511 511 bindings/js/JSFileSystemEntryCustom.cpp 512 bindings/js/JSHTMLCanvasElementCustom.cpp 512 513 bindings/js/JSHTMLCollectionCustom.cpp 513 514 bindings/js/JSHTMLDocumentCustom.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r265797 r265833 9495 9495 6E5388E02458AE1D0076AE03 /* WebGLColorBufferFloat.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGLColorBufferFloat.cpp; sourceTree = "<group>"; }; 9496 9496 6E5388E12458AE1D0076AE03 /* WebGLColorBufferFloat.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGLColorBufferFloat.idl; sourceTree = "<group>"; }; 9497 6E576BC324EB509C0094D4AA /* JSHTMLCanvasElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLCanvasElementCustom.cpp; sourceTree = "<group>"; }; 9497 9498 6E67D2A41280E8A4008758F7 /* ExtensionsGLOpenGL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExtensionsGLOpenGL.cpp; sourceTree = "<group>"; }; 9498 9499 6E67D2A51280E8A4008758F7 /* ExtensionsGLOpenGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionsGLOpenGL.h; sourceTree = "<group>"; }; … … 21936 21937 4131F3B11F9552810059995A /* JSFetchEventCustom.cpp */, 21937 21938 835B680E1F548BDE0071F7F6 /* JSFileSystemEntryCustom.cpp */, 21939 6E576BC324EB509C0094D4AA /* JSHTMLCanvasElementCustom.cpp */, 21938 21940 BCCBAD3A0C18BFF800CE890F /* JSHTMLCollectionCustom.cpp */, 21939 21941 BC51580A0C03D404008BB0EE /* JSHTMLDocumentCustom.cpp */, -
trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp
r265832 r265833 1 1 /* 2 * Copyright (C) 20 15Apple Inc. All rights reserved.2 * Copyright (C) 2020 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 21 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 25 26 typedef unsigned long GLenum; 27 typedef long GLint; 28 typedef long GLsizei; 26 #include "config.h" 27 #include "JSHTMLCanvasElement.h" 29 28 30 #ifdef ENABLE_VIDEO 31 typedef (ImageBitmap or ImageData or HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) TexImageSource; 32 #else 33 typedef (ImageBitmap or ImageData or HTMLImageElement or HTMLCanvasElement) TexImageSource; 34 #endif 29 #include <JavaScriptCore/SlotVisitor.h> 30 #include <JavaScriptCore/SlotVisitorInlines.h> 35 31 36 [ 37 ActiveDOMObject, 38 Conditional=WEBGL, 39 JSCustomMarkFunction, 40 JSGenerateToJSObject, 41 DoNotCheckConstants, 42 ExportMacro=WEBCORE_EXPORT, 43 CallTracingCallback=recordCanvasAction, 44 ] interface WebGLRenderingContext { 45 }; 32 namespace WebCore { 46 33 47 WebGLRenderingContext implements WebGLRenderingContextBase; 34 void JSHTMLCanvasElement::visitAdditionalChildren(SlotVisitor& visitor) 35 { 36 visitor.addOpaqueRoot(static_cast<CanvasBase*>(&wrapped())); 37 } 38 39 } // namespace WebCore -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r265387 r265833 4842 4842 $rootString .= " if (UNLIKELY(reason))\n"; 4843 4843 $rootString .= " *reason = \"Reachable from Navigator\";\n"; 4844 } elsif (GetGenerateIsReachable($interface) eq "ImplCanvasBase") { 4845 $rootString = " CanvasBase* root = WTF::getPtr(&(js${interfaceName}->wrapped().canvasBase()));\n"; 4846 $rootString .= " if (!root)\n"; 4847 $rootString .= " return false;\n"; 4848 $rootString .= " if (UNLIKELY(reason))\n"; 4849 $rootString .= " *reason = \"Reachable from CanvasBase\";\n"; 4844 4850 } elsif (GetGenerateIsReachable($interface) eq "ImplDocument") { 4845 4851 $rootString = " Document* root = WTF::getPtr(js${interfaceName}->wrapped().document());\n"; -
trunk/Source/WebCore/bindings/scripts/IDLAttributes.json
r263450 r265833 222 222 "GenerateIsReachable": { 223 223 "contextsAllowed": ["interface"], 224 "values": ["", "Impl", "ImplWebGLRenderingContext", "Impl Document", "ImplElementRoot", "ImplOwnerNodeRoot", "ImplScriptExecutionContext", "ReachableFromDOMWindow", "ReachableFromNavigator"]224 "values": ["", "Impl", "ImplWebGLRenderingContext", "ImplCanvasBase", "ImplDocument", "ImplElementRoot", "ImplOwnerNodeRoot", "ImplScriptExecutionContext", "ReachableFromDOMWindow", "ReachableFromNavigator"] 225 225 }, 226 226 "Global": { -
trunk/Source/WebCore/html/HTMLCanvasElement.idl
r265543 r265833 40 40 [ 41 41 ActiveDOMObject, 42 JSCustomMarkFunction, 42 43 JSGenerateToNativeObject, 43 44 ReportExtraMemoryCost, -
trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.idl
r254148 r265833 55 55 Conditional=WEBGL2, 56 56 EnabledAtRuntime=WebGL2, 57 GenerateIsReachable=ImplCanvasBase, 57 58 JSCustomMarkFunction, 58 59 JSGenerateToJSObject, -
trunk/Source/WebCore/html/canvas/WebGLRenderingContext.idl
r254148 r265833 37 37 ActiveDOMObject, 38 38 Conditional=WEBGL, 39 GenerateIsReachable=ImplCanvasBase, 39 40 JSCustomMarkFunction, 40 41 JSGenerateToJSObject,
Note: See TracChangeset
for help on using the changeset viewer.