Changeset 203845 in webkit
- Timestamp:
- Jul 28, 2016 3:05:49 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r203840 r203845 1 2016-07-28 Chris Dumez <cdumez@apple.com> 2 3 First parameter to canvas.getContext() / probablySupportsContext() should be mandatory 4 https://bugs.webkit.org/show_bug.cgi?id=160312 5 6 Reviewed by Darin Adler. 7 8 Update existing test to reflect behavior change. 9 10 * fast/canvas/webgl/canvas-supports-context-expected.txt: 11 * fast/canvas/webgl/canvas-supports-context.html: 12 1 13 2016-07-28 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/LayoutTests/fast/canvas/webgl/canvas-supports-context-expected.txt
r202609 r203845 113 113 114 114 Testing how probablySupportsContext handles no parameters 115 PASS document.createElement('canvas').probablySupportsContext() is false115 PASS document.createElement('canvas').probablySupportsContext() threw exception TypeError: Not enough arguments. 116 116 117 117 PASS successfullyParsed is true -
trunk/LayoutTests/fast/canvas/webgl/canvas-supports-context.html
r177772 r203845 159 159 debug(""); 160 160 debug("Testing how probablySupportsContext handles no parameters"); 161 should BeFalse("document.createElement('canvas').probablySupportsContext()");161 shouldThrow("document.createElement('canvas').probablySupportsContext()"); 162 162 163 163 debug(""); -
trunk/LayoutTests/imported/w3c/ChangeLog
r203840 r203845 1 2016-07-28 Chris Dumez <cdumez@apple.com> 2 3 First parameter to canvas.getContext() / probablySupportsContext() should be mandatory 4 https://bugs.webkit.org/show_bug.cgi?id=160312 5 6 Reviewed by Darin Adler. 7 8 Rebaseline several W3C tests now that more checks are passing. 9 10 * web-platform-tests/html/dom/interfaces-expected.txt: 11 * web-platform-tests/html/semantics/embedded-content/the-canvas-element/context.arguments.missing-expected.txt: 12 1 13 2016-07-28 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt
r203840 r203845 4804 4804 PASS HTMLCanvasElement interface: attribute width 4805 4805 PASS HTMLCanvasElement interface: attribute height 4806 FAIL HTMLCanvasElement interface: operation getContext(DOMString,any) assert_equals: property has wrong .length expected 1 but got 0 4807 FAIL HTMLCanvasElement interface: operation probablySupportsContext(DOMString,any) assert_equals: property has wrong .length expected 1 but got 0 4806 PASS HTMLCanvasElement interface: operation getContext(DOMString,any) 4807 PASS HTMLCanvasElement interface: operation probablySupportsContext(DOMString,any) 4808 4808 FAIL HTMLCanvasElement interface: operation setContext(RenderingContext) assert_own_property: interface prototype object missing non-static operation expected property "setContext" missing 4809 4809 FAIL HTMLCanvasElement interface: operation transferControlToProxy() assert_own_property: interface prototype object missing non-static operation expected property "transferControlToProxy" missing … … 4815 4815 PASS HTMLCanvasElement interface: document.createElement("canvas") must inherit property "height" with the proper type (1) 4816 4816 PASS HTMLCanvasElement interface: document.createElement("canvas") must inherit property "getContext" with the proper type (2) 4817 FAIL HTMLCanvasElement interface: calling getContext(DOMString,any) on document.createElement("canvas") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 4818 fn.apply(obj, args); 4819 }" did not throw 4817 PASS HTMLCanvasElement interface: calling getContext(DOMString,any) on document.createElement("canvas") with too few arguments must throw TypeError 4820 4818 PASS HTMLCanvasElement interface: document.createElement("canvas") must inherit property "probablySupportsContext" with the proper type (3) 4821 FAIL HTMLCanvasElement interface: calling probablySupportsContext(DOMString,any) on document.createElement("canvas") with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () { 4822 fn.apply(obj, args); 4823 }" did not throw 4819 PASS HTMLCanvasElement interface: calling probablySupportsContext(DOMString,any) on document.createElement("canvas") with too few arguments must throw TypeError 4824 4820 FAIL HTMLCanvasElement interface: document.createElement("canvas") must inherit property "setContext" with the proper type (4) assert_inherits: property "setContext" not found in prototype chain 4825 4821 FAIL HTMLCanvasElement interface: calling setContext(RenderingContext) on document.createElement("canvas") with too few arguments must throw TypeError assert_inherits: property "setContext" not found in prototype chain -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/the-canvas-element/context.arguments.missing-expected.txt
r189476 r203845 3 3 Actual output: 4 4 5 FAIL Canvas test: context.arguments.missing assert_throws: function "function () { canvas.getContext(); }" did not throw 5 PASS Canvas test: context.arguments.missing 6 6 -
trunk/Source/WebCore/ChangeLog
r203840 r203845 1 2016-07-28 Chris Dumez <cdumez@apple.com> 2 3 First parameter to canvas.getContext() / probablySupportsContext() should be mandatory 4 https://bugs.webkit.org/show_bug.cgi?id=160312 5 6 Reviewed by Darin Adler. 7 8 First parameter to canvas.getContext() / probablySupportsContext() 9 should be mandatory: 10 - http://w3c.github.io/html/semantics-scripting.html#the-canvas-element 11 12 Firefox and Chrome agree with the specification for getContext(). 13 Neither of them supports probablySupportsContext(). 14 15 No new tests, rebaselined existing tests. 16 17 * bindings/js/JSHTMLCanvasElementCustom.cpp: 18 (WebCore::JSHTMLCanvasElement::getContext): 19 (WebCore::JSHTMLCanvasElement::probablySupportsContext): 20 * html/HTMLCanvasElement.idl: 21 1 22 2016-07-28 Chris Dumez <cdumez@apple.com> 2 23 -
trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp
r200775 r203845 70 70 JSValue JSHTMLCanvasElement::getContext(ExecState& state) 71 71 { 72 if (UNLIKELY(state.argumentCount() < 1)) 73 return state.vm().throwException(&state, createNotEnoughArgumentsError(&state)); 74 72 75 HTMLCanvasElement& canvas = wrapped(); 73 const String& contextId = state. argument(0).toString(&state)->value(&state);76 const String& contextId = state.uncheckedArgument(0).toWTFString(&state); 74 77 75 78 RefPtr<CanvasContextAttributes> attrs; … … 90 93 JSValue JSHTMLCanvasElement::probablySupportsContext(ExecState& state) 91 94 { 95 if (UNLIKELY(state.argumentCount() < 1)) 96 return state.vm().throwException(&state, createNotEnoughArgumentsError(&state)); 97 92 98 HTMLCanvasElement& canvas = wrapped(); 93 if (!state.argumentCount()) 94 return jsBoolean(false); 95 const String& contextId = state.uncheckedArgument(0).toString(&state)->value(&state); 99 const String& contextId = state.uncheckedArgument(0).toWTFString(&state); 96 100 if (state.hadException()) 97 101 return jsUndefined(); -
trunk/Source/WebCore/html/HTMLCanvasElement.idl
r202394 r203845 42 42 #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C 43 43 // The custom binding is needed to handle context creation attributes. 44 [Custom] any getContext( optional DOMString contextId);45 [Custom] any probablySupportsContext(optional DOMString contextId);44 [Custom] any getContext(DOMString contextId, any... arguments); 45 [Custom] boolean probablySupportsContext(DOMString contextId, any... arguments); 46 46 #endif 47 47 -
trunk/Source/WebInspectorUI/ChangeLog
r203844 r203845 1 2016-07-28 Chris Dumez <cdumez@apple.com> 2 3 First parameter to canvas.getContext() / probablySupportsContext() should be mandatory 4 https://bugs.webkit.org/show_bug.cgi?id=160312 5 6 Reviewed by Darin Adler. 7 8 Update WebInspector accordingly. 9 10 * UserInterface/Models/NativeFunctionParameters.js: 11 1 12 2016-07-28 Matt Baker <mattbaker@apple.com> 2 13 -
trunk/Source/WebInspectorUI/UserInterface/Models/NativeFunctionParameters.js
r203840 r203845 872 872 873 873 HTMLCanvasElement: { 874 getContext: " [contextId]",875 probablySupportsContext: " [contextId]",874 getContext: "contextId", 875 probablySupportsContext: "contextId", 876 876 toDataURL: "[type]", 877 877 __proto__: null,
Note: See TracChangeset
for help on using the changeset viewer.