[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
cmarrin at apple.com
cmarrin at apple.com
Tue Jan 5 23:39:43 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 2e90c6d2f05a0b483f0b0f904916174a29121f57
Author: cmarrin at apple.com <cmarrin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 1 14:44:59 2009 +0000
Updated HTMLCanvasElement to accept "experimental-webgl" as the context name.
https://bugs.webkit.org/show_bug.cgi?id=31672
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index fcf0b3a..286befa 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,16 @@
+2009-12-01 Chris Marrin <cmarrin at apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Updated webgl tests to use "experimental-webgl" as the context name.
+ https://bugs.webkit.org/show_bug.cgi?id=31672
+
+ * fast/canvas/webgl/gl-get-calls.html:
+ * fast/canvas/webgl/resources/utils3d.js:
+ (initWebGL):
+ * fast/canvas/webgl/resources/webgl-test.js:
+ (create3DContext):
+
2009-12-01 Csaba Osztrogonác <ossy at webkit.org>
[Qt] Put tests into skiplist because of missing textInputController.selectedRange().
diff --git a/LayoutTests/fast/canvas/webgl/gl-get-calls.html b/LayoutTests/fast/canvas/webgl/gl-get-calls.html
index 8613ac5..955704a 100644
--- a/LayoutTests/fast/canvas/webgl/gl-get-calls.html
+++ b/LayoutTests/fast/canvas/webgl/gl-get-calls.html
@@ -16,7 +16,7 @@ description("This test ensures basic functionality of the underlying graphics li
debug("");
debug("Canvas.getContext");
-var context = document.getElementById("canvas").getContext("webkit-3d");
+var context = document.getElementById("canvas").getContext("experimental-webgl");
if (!context)
testFailed("context does not exist");
else {
diff --git a/LayoutTests/fast/canvas/webgl/resources/utils3d.js b/LayoutTests/fast/canvas/webgl/resources/utils3d.js
index 09f7430..61d85b5 100644
--- a/LayoutTests/fast/canvas/webgl/resources/utils3d.js
+++ b/LayoutTests/fast/canvas/webgl/resources/utils3d.js
@@ -18,7 +18,7 @@ function initWebGL(canvasName, vshader, fshader, attribs, clearColor, clearDepth
var canvas = document.getElementById(canvasName);
var gl;
- try {gl = canvas.getContext("webkit-3d") } catch(e) { }
+ try {gl = canvas.getContext("experimental-webgl") } catch(e) { }
if (!gl)
try {gl = canvas.getContext("moz-webgl") } catch(e) { }
if (!gl) {
diff --git a/LayoutTests/fast/canvas/webgl/resources/webgl-test.js b/LayoutTests/fast/canvas/webgl/resources/webgl-test.js
index 3623e75..6c8cff1 100644
--- a/LayoutTests/fast/canvas/webgl/resources/webgl-test.js
+++ b/LayoutTests/fast/canvas/webgl/resources/webgl-test.js
@@ -11,7 +11,7 @@ function getShaderSource(file) {
function create3DContext() {
var canvas = document.createElement("canvas");
try {
- return canvas.getContext("webkit-3d");
+ return canvas.getContext("experimental-webgl");
} catch(e) {}
return canvas.getContext("moz-webgl");
}
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 398f744..0a0125a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2009-12-01 Chris Marrin <cmarrin at apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Updated HTMLCanvasElement to accept "experimental-webgl" as the context name.
+ https://bugs.webkit.org/show_bug.cgi?id=31672
+
+ * html/HTMLCanvasElement.cpp:
+ (WebCore::HTMLCanvasElement::getContext):
+
2009-12-01 Pavel Feldman <pfeldman at dhcp-172-28-174-220.spb.corp.google.com>
Not reviewed: chromium build fix, added missing import.
diff --git a/WebCore/html/HTMLCanvasElement.cpp b/WebCore/html/HTMLCanvasElement.cpp
index 636c545..1937b67 100644
--- a/WebCore/html/HTMLCanvasElement.cpp
+++ b/WebCore/html/HTMLCanvasElement.cpp
@@ -149,9 +149,9 @@ String HTMLCanvasElement::toDataURL(const String& mimeType, ExceptionCode& ec)
CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type)
{
- // A Canvas can either be "2D" or "3D" never both. If you request a 2D canvas and the existing
- // context is already 2D, just return that. If the existing context is 3D, then destroy it
- // before creating a new 2D context. Vice versa when requesting a 3D canvas. Requesting a
+ // A Canvas can either be "2D" or "webgl" but never both. If you request a 2D canvas and the existing
+ // context is already 2D, just return that. If the existing context is WebGL, then destroy it
+ // before creating a new 2D context. Vice versa when requesting a WebGL canvas. Requesting a
// context with any other type string will destroy any existing context.
// FIXME - The code depends on the context not going away once created, to prevent JS from
@@ -167,8 +167,10 @@ CanvasRenderingContext* HTMLCanvasElement::getContext(const String& type)
#if ENABLE(3D_CANVAS)
Settings* settings = document()->settings();
if (settings && settings->webGLEnabled()) {
+ // Accept the legacy "webkit-3d" name as well as the provisional "experimental-webgl" name.
+ // Once ratified, we will also accept "webgl" as the context name.
if ((type == "webkit-3d") ||
- (type == "GL")) {
+ (type == "experimental-webgl")) {
if (m_context && !m_context->is3d())
return 0;
if (!m_context) {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list