Title: [87298] trunk
- Revision
- 87298
- Author
- [email protected]
- Date
- 2011-05-25 09:33:57 -0700 (Wed, 25 May 2011)
Log Message
2011-05-25 Igor Oliveira <[email protected]>
Reviewed by Antonio Gomes.
[Qt] QtWebKit crashes when dragging not loaded images
https://bugs.webkit.org/show_bug.cgi?id=61314
Checks if WebKit crashes when dragging an image not yet loaded.
* http/tests/misc/drag-not-loaded-image-expected.txt: Added.
* http/tests/misc/drag-not-loaded-image.html: Added.
2011-05-25 Igor Oliveira <[email protected]>
Reviewed by Antonio Gomes.
[Qt] QtWebKit crashes when dragging not loaded images
https://bugs.webkit.org/show_bug.cgi?id=61314
Checks if nativeImageForCurrentFrame is a valid pointer.
Test: http/tests/misc/drag-not-loaded-image.html
* platform/qt/DragImageQt.cpp:
(WebCore::createDragImageFromImage):
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (87297 => 87298)
--- trunk/LayoutTests/ChangeLog 2011-05-25 16:27:30 UTC (rev 87297)
+++ trunk/LayoutTests/ChangeLog 2011-05-25 16:33:57 UTC (rev 87298)
@@ -1,3 +1,15 @@
+2011-05-25 Igor Oliveira <[email protected]>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] QtWebKit crashes when dragging not loaded images
+ https://bugs.webkit.org/show_bug.cgi?id=61314
+
+ Checks if WebKit crashes when dragging an image not yet loaded.
+
+ * http/tests/misc/drag-not-loaded-image-expected.txt: Added.
+ * http/tests/misc/drag-not-loaded-image.html: Added.
+
2011-05-25 Andrey Kosyakov <[email protected]>
Unreviewed. Skipped 3 new inspector tests that time out on gtk.
Added: trunk/LayoutTests/http/tests/misc/drag-not-loaded-image-expected.txt (0 => 87298)
--- trunk/LayoutTests/http/tests/misc/drag-not-loaded-image-expected.txt (rev 0)
+++ trunk/LayoutTests/http/tests/misc/drag-not-loaded-image-expected.txt 2011-05-25 16:33:57 UTC (rev 87298)
@@ -0,0 +1,3 @@
+
+Success
+
Added: trunk/LayoutTests/http/tests/misc/drag-not-loaded-image.html (0 => 87298)
--- trunk/LayoutTests/http/tests/misc/drag-not-loaded-image.html (rev 0)
+++ trunk/LayoutTests/http/tests/misc/drag-not-loaded-image.html 2011-05-25 16:33:57 UTC (rev 87298)
@@ -0,0 +1,44 @@
+<html>
+<head>
+<script>
+if (window.layoutTestController) {
+ layoutTestController.waitUntilDone();
+ layoutTestController.dumpAsText();
+}
+
+function log(text)
+{
+ var console = document.getElementById('console');
+ console.appendChild(document.createTextNode(text));
+ console.appendChild(document.createElement('br'));
+}
+</script>
+<body>
+<img id="imageSlow"
+ src="" width="128" height="128">
+<div id="console"></div>
+<script language="_javascript_">
+ var e = document.getElementById("imageSlow");
+ function runTest() {
+ readyState = document.readyState;
+ if (readyState == 'complete') {
+ log("Success")
+ layoutTestController.notifyDone()
+ } else if (readyState == 'loading' || readyState == 'interactive') {
+ x = e.offsetLeft + e.offsetWidth / 2;
+ y = e.offsetTop + e.offsetHeight / 2;
+
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(x + 100, y + 100);
+ eventSender.mouseUp();
+ setTimeout("runTest()", 50);
+ }
+ }
+
+ runTest();
+</script>
+</body>
+</head>
+</html>
+
Modified: trunk/Source/WebCore/ChangeLog (87297 => 87298)
--- trunk/Source/WebCore/ChangeLog 2011-05-25 16:27:30 UTC (rev 87297)
+++ trunk/Source/WebCore/ChangeLog 2011-05-25 16:33:57 UTC (rev 87298)
@@ -1,3 +1,17 @@
+2011-05-25 Igor Oliveira <[email protected]>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] QtWebKit crashes when dragging not loaded images
+ https://bugs.webkit.org/show_bug.cgi?id=61314
+
+ Checks if nativeImageForCurrentFrame is a valid pointer.
+
+ Test: http/tests/misc/drag-not-loaded-image.html
+
+ * platform/qt/DragImageQt.cpp:
+ (WebCore::createDragImageFromImage):
+
2011-05-25 Ryuan Choi <[email protected]>
Reviewed by Xan Lopez.
Modified: trunk/Source/WebCore/platform/qt/DragImageQt.cpp (87297 => 87298)
--- trunk/Source/WebCore/platform/qt/DragImageQt.cpp 2011-05-25 16:27:30 UTC (rev 87297)
+++ trunk/Source/WebCore/platform/qt/DragImageQt.cpp 2011-05-25 16:33:57 UTC (rev 87298)
@@ -63,7 +63,7 @@
DragImageRef createDragImageFromImage(Image* image)
{
- if (!image)
+ if (!image || !image->nativeImageForCurrentFrame())
return 0;
return new QPixmap(*image->nativeImageForCurrentFrame());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes