Changeset 205360 in webkit
- Timestamp:
- Sep 2, 2016 12:14:46 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r205359 r205360 1 2016-09-02 Chris Dumez <cdumez@apple.com> 2 3 REGRESSION (r204839): [mac-wk1] LayoutTest webgl/max-active-contexts-webglcontextlost-prevent-default.html is a flaky timeout 4 https://bugs.webkit.org/show_bug.cgi?id=161205 5 6 Reviewed by Geoffrey Garen. 7 8 Unskip test case now that it is no longer flaky. 9 10 * platform/mac-wk1/TestExpectations: 11 1 12 2016-09-02 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r205124 r205360 253 253 webkit.org/b/161191 imported/w3c/web-platform-tests/url/url-setters.html [ Skip ] 254 254 255 webkit.org/b/161205 webgl/max-active-contexts-webglcontextlost-prevent-default.html [ Pass Timeout ] -
trunk/Source/WebCore/ChangeLog
r205359 r205360 1 2016-09-02 Chris Dumez <cdumez@apple.com> 2 3 REGRESSION (r204839): [mac-wk1] LayoutTest webgl/max-active-contexts-webglcontextlost-prevent-default.html is a flaky timeout 4 https://bugs.webkit.org/show_bug.cgi?id=161205 5 6 Reviewed by Geoffrey Garen. 7 8 Fixes several issues: 9 - Add missing isReachableFromOpaqueRoots() implementation for JSWebGLRenderingContextBase. 10 It used to rely on the one from its JSCanvasRenderingContext base. However, that base 11 was dropped in r204839. 12 - Update JSWebGLRenderingContextBase::visitAdditionalChildren() to add its canvas 13 object as opaque root as well. This used to be taken care of by 14 JSCanvasRenderingContext::visitAdditionalChildren() but it got dropped in r204839. 15 16 This also refactors the code a bit for clarity. 17 18 No new tests, unskipped existing test. 19 20 * WebCore.xcodeproj/project.pbxproj: 21 * bindings/js/JSCanvasRenderingContext.h: Removed. 22 * bindings/js/JSDocumentCustom.cpp: 23 (WebCore::JSDocument::getCSSCanvasContext): 24 * bindings/js/JSHTMLCanvasElementCustom.cpp: 25 (WebCore::JSHTMLCanvasElement::getContext): 26 * bindings/js/JSWebGLRenderingContextBaseCustom.cpp: 27 (WebCore::toJSNewlyCreated): 28 (WebCore::toJS): 29 (WebCore::JSWebGLRenderingContextBaseOwner::isReachableFromOpaqueRoots): 30 (WebCore::JSWebGLRenderingContextBase::visitAdditionalChildren): 31 * html/canvas/CanvasRenderingContext.h: 32 (WebCore::CanvasRenderingContext::is3d): 33 * html/canvas/WebGLRenderingContextBase.h: 34 * html/canvas/WebGLRenderingContextBase.idl: 35 1 36 2016-09-02 Chris Dumez <cdumez@apple.com> 2 37 -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r205348 r205360 1722 1722 463EB6221B8789E00096ED51 /* TagCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 463EB6201B8789CB0096ED51 /* TagCollection.cpp */; }; 1723 1723 463EB6231B8789E00096ED51 /* TagCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 463EB6211B8789CB0096ED51 /* TagCollection.h */; }; 1724 4659D2711D6B90A50096FD86 /* JSCanvasRenderingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4659D2701D6B909F0096FD86 /* JSCanvasRenderingContext.h */; };1725 1724 465A8E791C8A24CE00E7D3E4 /* RuntimeApplicationChecks.mm in Sources */ = {isa = PBXBuildFile; fileRef = 465A8E781C8A24CE00E7D3E4 /* RuntimeApplicationChecks.mm */; }; 1726 1725 4669B2871B852A0B000F905F /* JSDOMNamedFlowCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 46F2768E1B85297F005C2556 /* JSDOMNamedFlowCollectionCustom.cpp */; }; … … 1848 1847 49ECEB6F1499790D00CDD3A4 /* FilterOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49ECEB651499790D00CDD3A4 /* FilterOperations.cpp */; }; 1849 1848 49ECEB701499790D00CDD3A4 /* FilterOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 49ECEB661499790D00CDD3A4 /* FilterOperations.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1850 49EED1431051969400099FAB /* JSCanvasRenderingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 49EED13D1051969400099FAB /* JSCanvasRenderingContext.h */; };1851 1849 49EED1441051969400099FAB /* JSCanvasRenderingContext2D.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49EED13E1051969400099FAB /* JSCanvasRenderingContext2D.cpp */; }; 1852 1850 49EED1451051969400099FAB /* JSCanvasRenderingContext2D.h in Headers */ = {isa = PBXBuildFile; fileRef = 49EED13F1051969400099FAB /* JSCanvasRenderingContext2D.h */; }; … … 8676 8674 463EB6201B8789CB0096ED51 /* TagCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TagCollection.cpp; sourceTree = "<group>"; }; 8677 8675 463EB6211B8789CB0096ED51 /* TagCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagCollection.h; sourceTree = "<group>"; }; 8678 4659D2701D6B909F0096FD86 /* JSCanvasRenderingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCanvasRenderingContext.h; sourceTree = "<group>"; };8679 8676 465A8E781C8A24CE00E7D3E4 /* RuntimeApplicationChecks.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RuntimeApplicationChecks.mm; sourceTree = "<group>"; }; 8680 8677 4671E0631D67A57B00C6B497 /* CanvasPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanvasPath.cpp; sourceTree = "<group>"; }; … … 8815 8812 49ECEB651499790D00CDD3A4 /* FilterOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FilterOperations.cpp; sourceTree = "<group>"; }; 8816 8813 49ECEB661499790D00CDD3A4 /* FilterOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterOperations.h; sourceTree = "<group>"; }; 8817 49EED13D1051969400099FAB /* JSCanvasRenderingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCanvasRenderingContext.h; sourceTree = "<group>"; };8818 8814 49EED13E1051969400099FAB /* JSCanvasRenderingContext2D.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCanvasRenderingContext2D.cpp; sourceTree = "<group>"; }; 8819 8815 49EED13F1051969400099FAB /* JSCanvasRenderingContext2D.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCanvasRenderingContext2D.h; sourceTree = "<group>"; }; … … 18801 18797 65DF323609D1DE65000BE325 /* JSCanvasPattern.h */, 18802 18798 65DF323609D1DE65001BE325 /* JSCanvasProxy.h */, 18803 49EED13D1051969400099FAB /* JSCanvasRenderingContext.h */,18804 18799 49EED13E1051969400099FAB /* JSCanvasRenderingContext2D.cpp */, 18805 18800 49EED13F1051969400099FAB /* JSCanvasRenderingContext2D.h */, … … 21030 21025 BE6DF710171CA2DA00DD52B8 /* JSAudioTrackListCustom.cpp */, 21031 21026 8931DE5A14C44C44000DC9D2 /* JSBlobCustom.cpp */, 21032 4659D2701D6B909F0096FD86 /* JSCanvasRenderingContext.h */,21033 21027 49EED14B1051971900099FAB /* JSCanvasRenderingContext2DCustom.cpp */, 21034 21028 7C33F3581B4A044800502CAF /* JSCharacterDataCustom.cpp */, … … 24840 24834 65DF323C09D1DE65000BE325 /* JSCanvasPattern.h in Headers */, 24841 24835 65DF323C09D1DE65001BE325 /* JSCanvasProxy.h in Headers */, 24842 49EED1431051969400099FAB /* JSCanvasRenderingContext.h in Headers */,24843 4659D2711D6B90A50096FD86 /* JSCanvasRenderingContext.h in Headers */,24844 24836 49EED1451051969400099FAB /* JSCanvasRenderingContext2D.h in Headers */, 24845 24837 93F9B7A10BA6032600854064 /* JSCDATASection.h in Headers */, -
trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp
r205198 r205360 25 25 #include "FrameLoader.h" 26 26 #include "HTMLDocument.h" 27 #include "JSCanvasRenderingContext.h"28 27 #include "JSCanvasRenderingContext2D.h" 29 28 #include "JSDOMConvert.h" … … 166 165 if (UNLIKELY(state.hadException())) 167 166 return jsUndefined(); 168 return toJS(&state, globalObject(), wrapped().getCSSCanvasContext(WTFMove(contextId), WTFMove(name), WTFMove(width), WTFMove(height))); 167 168 auto* context = wrapped().getCSSCanvasContext(WTFMove(contextId), WTFMove(name), WTFMove(width), WTFMove(height)); 169 if (!context) 170 return jsNull(); 171 172 #if ENABLE(WEBGL) 173 if (is<WebGLRenderingContextBase>(*context)) 174 return toJS(&state, globalObject(), downcast<WebGLRenderingContextBase>(*context)); 175 #endif 176 177 return toJS(&state, globalObject(), downcast<CanvasRenderingContext2D>(*context)); 169 178 } 170 179 -
trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp
r205198 r205360 30 30 #include "CanvasContextAttributes.h" 31 31 #include "HTMLCanvasElement.h" 32 #include "JSCanvasRenderingContext.h"33 32 #include "JSCanvasRenderingContext2D.h" 34 33 #include <bindings/ScriptObject.h> … … 93 92 if (!context) 94 93 return jsNull(); 95 return toJS(&state, globalObject(), *context); 94 95 #if ENABLE(WEBGL) 96 if (is<WebGLRenderingContextBase>(*context)) 97 return toJS(&state, globalObject(), downcast<WebGLRenderingContextBase>(*context)); 98 #endif 99 100 return toJS(&state, globalObject(), downcast<CanvasRenderingContext2D>(*context)); 96 101 } 97 102 -
trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextBaseCustom.cpp
r205324 r205360 66 66 #include "JSWebGLProgram.h" 67 67 #include "JSWebGLRenderbuffer.h" 68 #include "JSWebGLRenderingContext.h" 68 69 #include "JSWebGLShader.h" 69 70 #include "JSWebGLTexture.h" … … 108 109 #endif 109 110 111 #if ENABLE(WEBGL2) 112 #include "JSWebGL2RenderingContext.h" 113 #endif 114 110 115 using namespace JSC; 111 116 112 117 namespace WebCore { 118 119 JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<WebGLRenderingContextBase>&& object) 120 { 121 #if ENABLE(WEBGL2) 122 if (is<WebGL2RenderingContext>(object)) 123 return CREATE_DOM_WRAPPER(globalObject, WebGL2RenderingContext, WTFMove(object)); 124 #endif 125 return CREATE_DOM_WRAPPER(globalObject, WebGLRenderingContext, WTFMove(object)); 126 } 127 128 JSValue toJS(ExecState* state, JSDOMGlobalObject* globalObject, WebGLRenderingContextBase& object) 129 { 130 return wrap(state, globalObject, object); 131 } 113 132 114 133 static JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, const WebGLGetInfo& info) … … 268 287 } 269 288 289 bool JSWebGLRenderingContextBaseOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor) 290 { 291 JSWebGLRenderingContextBase* jsWebGLRenderingContext = jsCast<JSWebGLRenderingContextBase*>(handle.slot()->asCell()); 292 void* root = WebCore::root(jsWebGLRenderingContext->wrapped().canvas()); 293 return visitor.containsOpaqueRoot(root); 294 } 295 270 296 void JSWebGLRenderingContextBase::visitAdditionalChildren(SlotVisitor& visitor) 271 297 { 272 298 visitor.addOpaqueRoot(&wrapped()); 299 visitor.addOpaqueRoot(root(wrapped().canvas())); 273 300 } 274 301 -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext.h
r195646 r205360 55 55 virtual bool isWebGL1() const { return false; } 56 56 virtual bool isWebGL2() const { return false; } 57 bool is3d() const { return isWebGL1() || isWebGL 1(); }57 bool is3d() const { return isWebGL1() || isWebGL2(); } 58 58 virtual bool isAccelerated() const { return false; } 59 59 -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.h
r200789 r205360 838 838 } // namespace WebCore 839 839 840 SPECIALIZE_TYPE_TRAITS_CANVASRENDERINGCONTEXT(WebCore::WebGLRenderingContextBase, is3d()) 841 840 842 #endif -
trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl
r204839 r205360 40 40 41 41 [ 42 Conditional=WEBGL, 43 DoNotCheckConstants, 44 JSCustomMarkFunction, 45 NoInterfaceObject, 42 Conditional=WEBGL, 43 CustomIsReachable, 44 CustomToJSObject, 45 DoNotCheckConstants, 46 JSCustomMarkFunction, 47 NoInterfaceObject, 46 48 ] interface WebGLRenderingContextBase { 47 49
Note: See TracChangeset
for help on using the changeset viewer.