2010-11-19 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] mask-box-image renders wrong in certain conditions
https://bugs.webkit.org/show_bug.cgi?id=43476
When rendering a pixmap with a dest rect having a null dimension,
Qt uses the dimension of the Pixmap. The other ports do not render
anything by convention.
This patch change BitmapImage to follow the convention of other ports and do not
paint anything.
* platform/graphics/qt/ImageQt.cpp:
(WebCore::BitmapImage::draw):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/platform/graphics/qt/ImageQt.cpp b/WebCore/platform/graphics/qt/ImageQt.cpp
index 7b46b71..26179ad 100644
--- a/WebCore/platform/graphics/qt/ImageQt.cpp
+++ b/WebCore/platform/graphics/qt/ImageQt.cpp
@@ -182,6 +182,9 @@
startAnimation();
+ if (normalizedSrc.isEmpty() || normalizedDst.isEmpty())
+ return;
+
QPixmap* image = nativeImageForCurrentFrame();
if (!image)
return;