Title: [110226] trunk
- Revision
- 110226
- Author
- [email protected]
- Date
- 2012-03-08 15:47:36 -0800 (Thu, 08 Mar 2012)
Log Message
NULL renderer possible in WebCore::HTMLInputElement::setCanReceiveDroppedFiles()
https://bugs.webkit.org/show_bug.cgi?id=80648
Reviewed by Simon Fraser.
Source/WebCore:
Test: fast/events/input-element-display-none-in-dragleave-crash.html
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::setCanReceiveDroppedFiles): NULL-check renderer().
LayoutTests:
* fast/events/input-element-display-none-in-dragleave-crash-expected.txt: Added.
* fast/events/input-element-display-none-in-dragleave-crash.html: Added.
* platform/wk2/Skipped: WebKitTestRunner doesn't support
EventSender.beginDragWithFiles().
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (110225 => 110226)
--- trunk/LayoutTests/ChangeLog 2012-03-08 23:46:30 UTC (rev 110225)
+++ trunk/LayoutTests/ChangeLog 2012-03-08 23:47:36 UTC (rev 110226)
@@ -1,3 +1,15 @@
+2012-03-08 Andy Estes <[email protected]>
+
+ NULL renderer possible in WebCore::HTMLInputElement::setCanReceiveDroppedFiles()
+ https://bugs.webkit.org/show_bug.cgi?id=80648
+
+ Reviewed by Simon Fraser.
+
+ * fast/events/input-element-display-none-in-dragleave-crash-expected.txt: Added.
+ * fast/events/input-element-display-none-in-dragleave-crash.html: Added.
+ * platform/wk2/Skipped: WebKitTestRunner doesn't support
+ EventSender.beginDragWithFiles().
+
2012-03-07 Ojan Vafai <[email protected]>
Moar Chromium Lion rebaselines.
Added: trunk/LayoutTests/fast/events/input-element-display-none-in-dragleave-crash-expected.txt (0 => 110226)
--- trunk/LayoutTests/fast/events/input-element-display-none-in-dragleave-crash-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/input-element-display-none-in-dragleave-crash-expected.txt 2012-03-08 23:47:36 UTC (rev 110226)
@@ -0,0 +1,3 @@
+This test passes if there is no crash when dragging a file over and then away from the file input element below.
+
+
Added: trunk/LayoutTests/fast/events/input-element-display-none-in-dragleave-crash.html (0 => 110226)
--- trunk/LayoutTests/fast/events/input-element-display-none-in-dragleave-crash.html (rev 0)
+++ trunk/LayoutTests/fast/events/input-element-display-none-in-dragleave-crash.html 2012-03-08 23:47:36 UTC (rev 110226)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <script>
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+ }
+
+ function test()
+ {
+ var dropTarget = document.getElementById("drop-target");
+ dropTarget.addEventListener("dragleave", function() {
+ dropTarget.style.display = "none";
+ }, false);
+
+ if (window.eventSender) {
+ eventSender.beginDragWithFiles(["resources/abe.png"]);
+ var x = dropTarget.offsetLeft + dropTarget.offsetWidth / 2;
+ var y = dropTarget.offsetTop + dropTarget.offsetHeight / 2;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseMoveTo(0, 0);
+ }
+
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ }
+ </script>
+</head>
+<body _onload_="test()">
+ <p>This test passes if there is no crash when dragging a file over and then away from the file input element below.</p>
+ <input type="file" id="drop-target">
+</body>
+</html>
\ No newline at end of file
Modified: trunk/LayoutTests/platform/wk2/Skipped (110225 => 110226)
--- trunk/LayoutTests/platform/wk2/Skipped 2012-03-08 23:46:30 UTC (rev 110225)
+++ trunk/LayoutTests/platform/wk2/Skipped 2012-03-08 23:47:36 UTC (rev 110226)
@@ -1346,6 +1346,7 @@
fast/events/drag-file-crash.html
fast/events/drag-to-navigate.html
fast/events/dropzone-004.html
+fast/events/input-element-display-none-in-dragleave-crash.html
fast/events/prevent-drag-to-navigate.html
fast/files/apply-blob-url-to-img.html
fast/files/apply-blob-url-to-xhr.html
Modified: trunk/Source/WebCore/ChangeLog (110225 => 110226)
--- trunk/Source/WebCore/ChangeLog 2012-03-08 23:46:30 UTC (rev 110225)
+++ trunk/Source/WebCore/ChangeLog 2012-03-08 23:47:36 UTC (rev 110226)
@@ -1,3 +1,15 @@
+2012-03-08 Andy Estes <[email protected]>
+
+ NULL renderer possible in WebCore::HTMLInputElement::setCanReceiveDroppedFiles()
+ https://bugs.webkit.org/show_bug.cgi?id=80648
+
+ Reviewed by Simon Fraser.
+
+ Test: fast/events/input-element-display-none-in-dragleave-crash.html
+
+ * html/HTMLInputElement.cpp:
+ (WebCore::HTMLInputElement::setCanReceiveDroppedFiles): NULL-check renderer().
+
2012-03-08 Jer Noble <[email protected]>
Yet another unreviewed build fix.
Modified: trunk/Source/WebCore/html/HTMLInputElement.cpp (110225 => 110226)
--- trunk/Source/WebCore/html/HTMLInputElement.cpp 2012-03-08 23:46:30 UTC (rev 110225)
+++ trunk/Source/WebCore/html/HTMLInputElement.cpp 2012-03-08 23:47:36 UTC (rev 110226)
@@ -1356,7 +1356,8 @@
if (m_canReceiveDroppedFiles == canReceiveDroppedFiles)
return;
m_canReceiveDroppedFiles = canReceiveDroppedFiles;
- renderer()->updateFromElement();
+ if (renderer())
+ renderer()->updateFromElement();
}
String HTMLInputElement::visibleValue() const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes