[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
eric at webkit.org
eric at webkit.org
Thu Oct 29 20:37:33 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit fb4d844b358b91516a7a1cda880999cf9b38872e
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 1 17:25:36 2009 +0000
2009-10-01 Victor Wang <victorw at chromium.org>
Reviewed by Oliver Hunt.
Allow dragging a node who has child nodes.
https://bugs.webkit.org/show_bug.cgi?id=28632
* fast/events/drag-parent-node-expected.txt: Added.
* fast/events/drag-parent-node.html: Added.
* fast/events/resources/bookmark.gif: Added.
2009-10-01 Victor Wang <victorw at chromium.org>
Reviewed by Oliver Hunt.
Allow dragging a node who has child nodes.
https://bugs.webkit.org/show_bug.cgi?id=28632
Test: fast/events/drag-parent-node.html
* page/EventHandler.cpp:
(WebCore::EventHandler::shouldDragAutoNode):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6f4f9e5..961f064 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2009-10-01 Victor Wang <victorw at chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ Allow dragging a node who has child nodes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28632
+
+ * fast/events/drag-parent-node-expected.txt: Added.
+ * fast/events/drag-parent-node.html: Added.
+ * fast/events/resources/bookmark.gif: Added.
+
2009-10-01 Adam Roben <aroben at apple.com>
Land expected failure results for two tests on Windows
diff --git a/LayoutTests/fast/events/drag-parent-node-expected.txt b/LayoutTests/fast/events/drag-parent-node-expected.txt
new file mode 100644
index 0000000..e13e2d4
--- /dev/null
+++ b/LayoutTests/fast/events/drag-parent-node-expected.txt
@@ -0,0 +1,5 @@
+This tests a parent node (has child nodes) is draggable. You should be able to drag the bookmark image below and drop it to bookmarks bar.
+
+Bookmark
+
+Test passed.
diff --git a/LayoutTests/fast/events/drag-parent-node.html b/LayoutTests/fast/events/drag-parent-node.html
new file mode 100644
index 0000000..341db61
--- /dev/null
+++ b/LayoutTests/fast/events/drag-parent-node.html
@@ -0,0 +1,61 @@
+<html>
+<head>
+<style type="text/css">
+.bookmark {
+ background-image:url(resources/bookmark.gif);
+ text-indent:-1000px;
+ display:block;
+ height:25px;
+ width:80px;
+}
+</style>
+</head>
+<script>
+var dragStarted = false;
+window.ondragstart = function() {
+ dragStarted = true;
+}
+
+window.ondragend = function() {
+ if (!window.layoutTestController)
+ return;
+
+ if (dragStarted) {
+ document.getElementById('results').innerHTML = 'Test passed.';
+ }
+}
+
+function test() {
+ if (!window.layoutTestController)
+ return;
+
+ if (!window.eventSender)
+ return;
+
+ document.getElementById('results').innerHTML = 'Test failed.';
+
+ layoutTestController.dumpAsText();
+ layoutTestController.waitUntilDone();
+
+ var testBookmark = document.getElementById('testBookmark');
+ var x = testBookmark.offsetLeft + testBookmark.offsetWidth / 2;
+ var y = testBookmark.offsetTop + testBookmark.offsetHeight / 2;
+
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(x + 100, y + 100);
+ eventSender.mouseUp();
+
+ layoutTestController.notifyDone();
+}
+</script>
+
+<body onload="test()">
+<p>This tests a parent node (has child nodes) is draggable.
+You should be able to drag the bookmark image below and drop it to bookmarks bar.
+</p>
+<a id="testBookmark" href="http://testbookmark" title="Bookmark" class="bookmark">Bookmark</a>
+<br>
+<div id="results"></div>
+</body>
+</html>
diff --git a/LayoutTests/fast/events/resources/bookmark.gif b/LayoutTests/fast/events/resources/bookmark.gif
new file mode 100644
index 0000000..57f5c1f
Binary files /dev/null and b/LayoutTests/fast/events/resources/bookmark.gif differ
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d5819a9..f36b4ee 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2009-10-01 Victor Wang <victorw at chromium.org>
+
+ Reviewed by Oliver Hunt.
+
+ Allow dragging a node who has child nodes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=28632
+
+ Test: fast/events/drag-parent-node.html
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::shouldDragAutoNode):
+
2009-10-01 Philippe Normand <pnormand at igalia.com>
Reviewed by Gustavo Noronha.
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index 4a63c9c..a19cd82 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -2179,7 +2179,7 @@ void EventHandler::freeClipboard()
bool EventHandler::shouldDragAutoNode(Node* node, const IntPoint& point) const
{
- if (!node || node->hasChildNodes() || !m_frame->view())
+ if (!node || !m_frame->view())
return false;
Page* page = m_frame->page();
return page && page->dragController()->mayStartDragAtEventLocation(m_frame, point);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list