Commit fb4d844b authored by eric@webkit.org's avatar eric@webkit.org
Browse files

2009-10-01 Victor Wang <victorw@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@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
parent aeb4c271
2009-10-01 Victor Wang <victorw@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@apple.com>
 
Land expected failure results for two tests on Windows
......
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.
<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>
2009-10-01 Victor Wang <victorw@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@igalia.com>
 
Reviewed by Gustavo Noronha.
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment