[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
mdelaney at apple.com
mdelaney at apple.com
Wed Dec 22 15:43:42 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 49ce82fa1207f54e9e2ae8d44102b6c0b57393b9
Author: mdelaney at apple.com <mdelaney at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Nov 11 08:07:15 2010 +0000
2010-11-11 Matthew Delaney <mdelaney at apple.com>
Reviewed by Dan Bernstein.
Fix LayoutTests/canvas/philip/tests/2d.drawImage.null.html
https://bugs.webkit.org/show_bug.cgi?id=48307
There are no new tests because this is a fix for a pre-existing failing test.)
* bindings/js/JSCanvasRenderingContext2DCustom.cpp: Corrected expection throwing cases to match up with spec.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71798 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7b27aae..19379fa 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-11 Matthew Delaney <mdelaney at apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix LayoutTests/canvas/philip/tests/2d.drawImage.null.html
+ https://bugs.webkit.org/show_bug.cgi?id=48307
+
+ There are no new tests because this is a fix for a pre-existing failing test.)
+
+ * bindings/js/JSCanvasRenderingContext2DCustom.cpp: Corrected expection throwing cases to match up with spec.
+
2010-11-10 Ryosuke Niwa <rniwa at webkit.org>
Reviewed by Adam Barth.
diff --git a/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp b/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
index e3f5a4e..3bbe9c7 100644
--- a/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
+++ b/WebCore/bindings/js/JSCanvasRenderingContext2DCustom.cpp
@@ -195,10 +195,14 @@ JSValue JSCanvasRenderingContext2D::drawImage(ExecState* exec)
// Composite operation is specified with globalCompositeOperation.
// The img parameter can be a <img> or <canvas> element.
JSValue value = exec->argument(0);
+ if (value.isNull()) {
+ setDOMException(exec, TYPE_MISMATCH_ERR);
+ return jsUndefined();
+ }
if (!value.isObject())
return throwTypeError(exec);
+
JSObject* o = asObject(value);
-
ExceptionCode ec = 0;
if (o->inherits(&JSHTMLImageElement::s_info)) {
HTMLImageElement* imgElt = static_cast<HTMLImageElement*>(static_cast<JSHTMLElement*>(o)->impl());
@@ -267,9 +271,9 @@ JSValue JSCanvasRenderingContext2D::drawImage(ExecState* exec)
}
#endif
} else
- return throwTypeError(exec);
-
- return jsUndefined();
+ return throwTypeError(exec);
+
+ return jsUndefined();
}
JSValue JSCanvasRenderingContext2D::drawImageFromRect(ExecState* exec)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list