Diff
Modified: trunk/LayoutTests/ChangeLog (155136 => 155137)
--- trunk/LayoutTests/ChangeLog 2013-09-05 18:29:30 UTC (rev 155136)
+++ trunk/LayoutTests/ChangeLog 2013-09-05 18:58:07 UTC (rev 155137)
@@ -1,3 +1,16 @@
+2013-09-04 Dean Jackson <[email protected]>
+
+ Rename supportsContext to probablySupportsContext
+ https://bugs.webkit.org/show_bug.cgi?id=120716
+ <rdar://problem/14914499>
+
+ Reviewed by Antoine Quint.
+
+ As decided in: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-September/040680.html
+
+ * fast/canvas/webgl/canvas-supports-context-expected.txt:
+ * fast/canvas/webgl/canvas-supports-context.html:
+
2013-09-05 Joseph Pecoraro <[email protected]>
Web Inspector: Breakpoint Actions
Modified: trunk/LayoutTests/fast/canvas/webgl/canvas-supports-context-expected.txt (155136 => 155137)
--- trunk/LayoutTests/fast/canvas/webgl/canvas-supports-context-expected.txt 2013-09-05 18:29:30 UTC (rev 155136)
+++ trunk/LayoutTests/fast/canvas/webgl/canvas-supports-context-expected.txt 2013-09-05 18:58:07 UTC (rev 155137)
@@ -1,118 +1,118 @@
-This test ensures WebGL implementations interact correctly with the canvas tag's supportContext function, that getContext and supportsContext are implemented consistently with one another, and that malformed parameters to supportsContext are handled correctly.
+This test ensures WebGL implementations interact correctly with the canvas tag's probablySupportsContext function, that getContext and probablySupportsContext are implemented consistently with one another, and that malformed parameters to probablySupportsContext are handled correctly.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-Canvas.supportsContext('2d')
+Canvas.probablySupportsContext('2d')
-PASS supportsContext('2d') is consistent with getContext('2d')
-PASS supportsContext('2d') returns true
+PASS probablySupportsContext('2d') is consistent with getContext('2d')
+PASS probablySupportsContext('2d') returns true
PASS getContext('2d') returns true (context exists)
-Testing getContext and supportsContext('2d') after a context is created
-PASS supportsContext('2d') returns true
-PASS supportsContext('webkit-3d') returns false
+Testing getContext and probablySupportsContext('2d') after a context is created
+PASS probablySupportsContext('2d') returns true
+PASS probablySupportsContext('webkit-3d') returns false
PASS webkit-3d context does not exist
WebGL disabled
-Canvas.supportsContext('webkit-3d')
+Canvas.probablySupportsContext('webkit-3d')
-PASS supportsContext('webkit-3d') is consistent with getContext('webkit-3d')
-FAIL supportsContext('webkit-3d') returns false
+PASS probablySupportsContext('webkit-3d') is consistent with getContext('webkit-3d')
+FAIL probablySupportsContext('webkit-3d') returns false
FAIL getContext('webkit-3d') returns false (context does not exist)
-Canvas.supportsContext('experimental-webgl')
+Canvas.probablySupportsContext('experimental-webgl')
-PASS supportsContext('experimental-webgl') is consistent with getContext('experimental-webgl')
-FAIL supportsContext('experimental-webgl') returns false
+PASS probablySupportsContext('experimental-webgl') is consistent with getContext('experimental-webgl')
+FAIL probablySupportsContext('experimental-webgl') returns false
FAIL getContext('experimental-webgl') returns false (context does not exist)
-Canvas.supportsContext('moz-webgl')
+Canvas.probablySupportsContext('moz-webgl')
-PASS supportsContext('moz-webgl') is consistent with getContext('moz-webgl')
-FAIL supportsContext('moz-webgl') returns false
+PASS probablySupportsContext('moz-webgl') is consistent with getContext('moz-webgl')
+FAIL probablySupportsContext('moz-webgl') returns false
FAIL getContext('moz-webgl') returns false (context does not exist)
WebGL enabled
-Canvas.supportsContext('webkit-3d')
+Canvas.probablySupportsContext('webkit-3d')
-PASS supportsContext('webkit-3d') is consistent with getContext('webkit-3d')
-PASS supportsContext('webkit-3d') returns true
+PASS probablySupportsContext('webkit-3d') is consistent with getContext('webkit-3d')
+PASS probablySupportsContext('webkit-3d') returns true
PASS getContext('webkit-3d') returns true (context exists)
-Testing getContext and supportsContext('webkit-3d') after a context is created
-PASS supportsContext('webkit-3d') returns true
-PASS supportsContext('2d') returns false
+Testing getContext and probablySupportsContext('webkit-3d') after a context is created
+PASS probablySupportsContext('webkit-3d') returns true
+PASS probablySupportsContext('2d') returns false
PASS 2d context does not exist
-Canvas.supportsContext('experimental-webgl')
+Canvas.probablySupportsContext('experimental-webgl')
-PASS supportsContext('experimental-webgl') is consistent with getContext('experimental-webgl')
-PASS supportsContext('experimental-webgl') returns true
+PASS probablySupportsContext('experimental-webgl') is consistent with getContext('experimental-webgl')
+PASS probablySupportsContext('experimental-webgl') returns true
PASS getContext('experimental-webgl') returns true (context exists)
-Testing getContext and supportsContext('experimental-webgl') after a context is created
-PASS supportsContext('experimental-webgl') returns true
-PASS supportsContext('2d') returns false
+Testing getContext and probablySupportsContext('experimental-webgl') after a context is created
+PASS probablySupportsContext('experimental-webgl') returns true
+PASS probablySupportsContext('2d') returns false
PASS 2d context does not exist
-Canvas.supportsContext('moz-webgl')
+Canvas.probablySupportsContext('moz-webgl')
-PASS supportsContext('moz-webgl') is consistent with getContext('moz-webgl')
-FAIL supportsContext('moz-webgl') returns false
+PASS probablySupportsContext('moz-webgl') is consistent with getContext('moz-webgl')
+FAIL probablySupportsContext('moz-webgl') returns false
FAIL getContext('moz-webgl') returns false (context does not exist)
-Testing malformed attributes that cause supportsContext and getContext to be undefined
+Testing malformed attributes that cause probablySupportsContext and getContext to be undefined
-canvas.supportsContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } })
+canvas.probablySupportsContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } })
PASS supports is undefined
PASS context is undefined
-PASS supportsContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } }) is consistent with getContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } })
-FAIL supportsContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } }) returns false
+PASS probablySupportsContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } }) is consistent with getContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } })
+FAIL probablySupportsContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } }) returns false
FAIL getContext('webkit-3d' ,{ get alpha() { throw 'Test alpha Error'; } }) returns false (context does not exist)
-canvas.supportsContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } })
+canvas.probablySupportsContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } })
PASS supports is undefined
PASS context is undefined
-PASS supportsContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } }) is consistent with getContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } })
-FAIL supportsContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } }) returns false
+PASS probablySupportsContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } }) is consistent with getContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } })
+FAIL probablySupportsContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } }) returns false
FAIL getContext('webkit-3d' ,{ get depth() { throw 'Test depth Error'; } }) returns false (context does not exist)
-canvas.supportsContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } })
+canvas.probablySupportsContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } })
PASS supports is undefined
PASS context is undefined
-PASS supportsContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } }) is consistent with getContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } })
-FAIL supportsContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } }) returns false
+PASS probablySupportsContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } }) is consistent with getContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } })
+FAIL probablySupportsContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } }) returns false
FAIL getContext('webkit-3d' ,{ get stencil() { throw 'Test stencil Error'; } }) returns false (context does not exist)
-canvas.supportsContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } })
+canvas.probablySupportsContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } })
PASS supports is undefined
PASS context is undefined
-PASS supportsContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } }) is consistent with getContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } })
-FAIL supportsContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } }) returns false
+PASS probablySupportsContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } }) is consistent with getContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } })
+FAIL probablySupportsContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } }) returns false
FAIL getContext('webkit-3d' ,{ get antialias() { throw 'Test antialias Error'; } }) returns false (context does not exist)
-canvas.supportsContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } })
+canvas.probablySupportsContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } })
PASS supports is undefined
PASS context is undefined
-PASS supportsContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } }) is consistent with getContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } })
-FAIL supportsContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } }) returns false
+PASS probablySupportsContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } }) is consistent with getContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } })
+FAIL probablySupportsContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } }) returns false
FAIL getContext('webkit-3d' ,{ get premultipliedAlpha() { throw 'Test premultipliedAlpha Error'; } }) returns false (context does not exist)
-canvas.supportsContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } })
+canvas.probablySupportsContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } })
PASS supports is undefined
PASS context is undefined
-PASS supportsContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } }) is consistent with getContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } })
-FAIL supportsContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } }) returns false
+PASS probablySupportsContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } }) is consistent with getContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } })
+FAIL probablySupportsContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } }) returns false
FAIL getContext('webkit-3d' ,{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } }) returns false (context does not exist)
-Testing how supportsContext handles no parameters
-PASS document.createElement('canvas').supportsContext() is false
+Testing how probablySupportsContext handles no parameters
+PASS document.createElement('canvas').probablySupportsContext() is false
PASS successfullyParsed is true
Modified: trunk/LayoutTests/fast/canvas/webgl/canvas-supports-context.html (155136 => 155137)
--- trunk/LayoutTests/fast/canvas/webgl/canvas-supports-context.html 2013-09-05 18:29:30 UTC (rev 155136)
+++ trunk/LayoutTests/fast/canvas/webgl/canvas-supports-context.html 2013-09-05 18:58:07 UTC (rev 155137)
@@ -1,7 +1,6 @@
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>WebGL Canvas supportsContext Tests</title>
+<title>WebGL Canvas probablySupportsContext Tests</title>
<script src=""
</head>
<body>
@@ -16,14 +15,14 @@
function print_basic_results(supports, context, args_str)
{
if (context && !supports)
- testFailed(type_of_context + " context exists yet canvas.supportsContext(" + args_str + ") returns false");
+ testFailed(type_of_context + " context exists yet canvas.probablySupportsContext(" + args_str + ") returns false");
else
- testPassed("supportsContext(" + args_str + ") is consistent with getContext(" + args_str + ")");
+ testPassed("probablySupportsContext(" + args_str + ") is consistent with getContext(" + args_str + ")");
if (supports)
- testPassed("supportsContext(" + args_str + ") returns true");
+ testPassed("probablySupportsContext(" + args_str + ") returns true");
else
- testFailed("supportsContext(" + args_str + ") returns false");
+ testFailed("probablySupportsContext(" + args_str + ") returns false");
if (context) {
testPassed("getContext(" + args_str + ") returns true (context exists)");
@@ -46,12 +45,12 @@
function test_post_creation(canvas, type_of_context)
{
- debug("Testing getContext and supportsContext('" + type_of_context + "') after a context is created");
+ debug("Testing getContext and probablySupportsContext('" + type_of_context + "') after a context is created");
- if (canvas.supportsContext(type_of_context))
- testPassed("supportsContext('" + type_of_context + "') returns true");
+ if (canvas.probablySupportsContext(type_of_context))
+ testPassed("probablySupportsContext('" + type_of_context + "') returns true");
else
- testFailed("supportsContext('" + type_of_context + "') returns false");
+ testFailed("probablySupportsContext('" + type_of_context + "') returns false");
var other_type = other_type_of_context(type_of_context);
@@ -60,10 +59,10 @@
return;
}
- if (!canvas.supportsContext(other_type))
- testPassed("supportsContext('" + other_type + "') returns false");
+ if (!canvas.probablySupportsContext(other_type))
+ testPassed("probablySupportsContext('" + other_type + "') returns false");
else
- testFailed("supportsContext('" + other_type + "') returns true");
+ testFailed("probablySupportsContext('" + other_type + "') returns true");
if (!canvas.getContext(other_type))
testPassed(other_type + " context does not exist");
@@ -75,11 +74,11 @@
function check_context(type_of_context)
{
debug("");
- debug("Canvas.supportsContext('" + type_of_context + "')");
+ debug("Canvas.probablySupportsContext('" + type_of_context + "')");
debug("");
var canvas = document.createElement("canvas");
- var supports = canvas.supportsContext(type_of_context);
+ var supports = canvas.probablySupportsContext(type_of_context);
var context = canvas.getContext(type_of_context);
if(print_basic_results(supports, context, "'" + type_of_context + "'"))
@@ -91,13 +90,13 @@
type_of_context = type3dlegacy;
debug("");
- debug("canvas.supportsContext('" + type_of_context + "' ," + attrs_str + ")");
+ debug("canvas.probablySupportsContext('" + type_of_context + "' ," + attrs_str + ")");
debug("");
var canvas = document.createElement("canvas");
var supports;
try {
- supports = canvas.supportsContext(type_of_context, attrs);
+ supports = canvas.probablySupportsContext(type_of_context, attrs);
} catch (e) { } finally {
if (typeof(supports) == typeof(undefined))
testPassed("supports is undefined");
@@ -121,7 +120,7 @@
function run_tests()
{
- description("This test ensures WebGL implementations interact correctly with the canvas tag's supportContext function, that getContext and supportsContext are implemented consistently with one another, and that malformed parameters to supportsContext are handled correctly.");
+ description("This test ensures WebGL implementations interact correctly with the canvas tag's probablySupportsContext function, that getContext and probablySupportsContext are implemented consistently with one another, and that malformed parameters to probablySupportsContext are handled correctly.");
check_context(type2d);
@@ -142,7 +141,7 @@
check_context(type3dmoz);
debug("");
- debug("Testing malformed attributes that cause supportsContext and getContext to be undefined");
+ debug("Testing malformed attributes that cause probablySupportsContext and getContext to be undefined");
malformed_attrs({ get alpha() { throw 'Test alpha Error'; } },
"{ get alpha() { throw 'Test alpha Error'; } }");
@@ -158,8 +157,8 @@
"{ get preserveDrawingBUffer() { throw 'Test preserveDrawingBuffer Error'; } }");
debug("");
- debug("Testing how supportsContext handles no parameters");
- shouldBeFalse("document.createElement('canvas').supportsContext()");
+ debug("Testing how probablySupportsContext handles no parameters");
+ shouldBeFalse("document.createElement('canvas').probablySupportsContext()");
debug("");
}
Modified: trunk/Source/WebCore/ChangeLog (155136 => 155137)
--- trunk/Source/WebCore/ChangeLog 2013-09-05 18:29:30 UTC (rev 155136)
+++ trunk/Source/WebCore/ChangeLog 2013-09-05 18:58:07 UTC (rev 155137)
@@ -1,3 +1,20 @@
+2013-09-04 Dean Jackson <[email protected]>
+
+ Rename supportsContext to probablySupportsContext
+ https://bugs.webkit.org/show_bug.cgi?id=120716
+ <rdar://problem/14914499>
+
+ Reviewed by Antoine Quint.
+
+ As decided in: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2013-September/040680.html
+
+ * bindings/js/JSHTMLCanvasElementCustom.cpp:
+ (WebCore::JSHTMLCanvasElement::probablySupportsContext):
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::probablySupportsContext):
+ * html/HTMLCanvasElement.h:
+ * html/HTMLCanvasElement.idl:
+
2013-09-05 Joseph Pecoraro <[email protected]>
Fix build warning about unused variable.
Modified: trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp (155136 => 155137)
--- trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp 2013-09-05 18:29:30 UTC (rev 155136)
+++ trunk/Source/WebCore/bindings/js/JSHTMLCanvasElementCustom.cpp 2013-09-05 18:58:07 UTC (rev 155137)
@@ -99,7 +99,7 @@
return jsValue;
}
-JSValue JSHTMLCanvasElement::supportsContext(ExecState* exec)
+JSValue JSHTMLCanvasElement::probablySupportsContext(ExecState* exec)
{
HTMLCanvasElement* canvas = static_cast<HTMLCanvasElement*>(impl());
if (!exec->argumentCount())
@@ -117,7 +117,7 @@
}
#endif
- return jsBoolean(canvas->supportsContext(contextId, attrs.get()));
+ return jsBoolean(canvas->probablySupportsContext(contextId, attrs.get()));
}
JSValue JSHTMLCanvasElement::toDataURL(ExecState* exec)
Modified: trunk/Source/WebCore/html/HTMLCanvasElement.cpp (155136 => 155137)
--- trunk/Source/WebCore/html/HTMLCanvasElement.cpp 2013-09-05 18:29:30 UTC (rev 155136)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.cpp 2013-09-05 18:58:07 UTC (rev 155137)
@@ -235,7 +235,7 @@
return 0;
}
-bool HTMLCanvasElement::supportsContext(const String& type, CanvasContextAttributes*)
+bool HTMLCanvasElement::probablySupportsContext(const String& type, CanvasContextAttributes*)
{
// FIXME: Provide implementation that accounts for attributes. Bugzilla bug 117093
// https://bugs.webkit.org/show_bug.cgi?id=117093
Modified: trunk/Source/WebCore/html/HTMLCanvasElement.h (155136 => 155137)
--- trunk/Source/WebCore/html/HTMLCanvasElement.h 2013-09-05 18:29:30 UTC (rev 155136)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.h 2013-09-05 18:58:07 UTC (rev 155137)
@@ -92,7 +92,7 @@
}
CanvasRenderingContext* getContext(const String&, CanvasContextAttributes* attributes = 0);
- bool supportsContext(const String&, CanvasContextAttributes* = 0);
+ bool probablySupportsContext(const String&, CanvasContextAttributes* = 0);
static bool is2dType(const String&);
#if ENABLE(WEBGL)
static bool is3dType(const String&);
Modified: trunk/Source/WebCore/html/HTMLCanvasElement.idl (155136 => 155137)
--- trunk/Source/WebCore/html/HTMLCanvasElement.idl 2013-09-05 18:29:30 UTC (rev 155136)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.idl 2013-09-05 18:58:07 UTC (rev 155137)
@@ -37,7 +37,7 @@
#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
// The custom binding is needed to handle context creation attributes.
[Custom] any getContext([Default=Undefined] optional DOMString contextId);
- [Custom] any supportsContext([Default=Undefined] optional DOMString contextId);
+ [Custom] any probablySupportsContext([Default=Undefined] optional DOMString contextId);
#endif
#endif