Commit 6878f449 authored by oliver@apple.com's avatar oliver@apple.com

<rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop...

<rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves

Reviewed by Darin Adler.

Make mouseUp target the correct frame when the original
mousedown made the drag non-capturing.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3c6c8615
2009-04-22 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
<rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves
Update test to record correct mouseUp behaviour.
* fast/events/mouse-drag-from-frame-to-other-frame-expected.txt:
* fast/events/resources/mouse-drag-from-frame-target-subframe.html:
2009-04-22 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
......
......@@ -2,4 +2,5 @@ This tests that dragging from an element that returns false from its mousedown h
Drag Started
received mousemove
received mouseup
received mousemove
<body onmousemove="parent.log('received mousemove')" onmouseup="/*parent.log('received mouseup')*/">
<body onmousemove="parent.log('received mousemove')" onmouseup="parent.log('received mouseup')">
</body>
2009-04-22 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
<rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves
Make mouseUp target the correct frame when the original
mousedown made the drag non-capturing.
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passSubframeEventToSubframe):
2009-04-22 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
......@@ -434,12 +434,9 @@ bool EventHandler::passSubframeEventToSubframe(MouseEventWithHitTestResults& eve
case NSLeftMouseUp: {
if (!m_mouseDownWasInSubframe)
return false;
NSView *view = mouseDownViewIfStillGood();
if (!view)
return false;
ASSERT(!m_sendingEventToSubview);
m_sendingEventToSubview = true;
[view mouseUp:currentEvent().get()];
subframe->eventHandler()->handleMouseReleaseEvent(currentEvent().get());
m_sendingEventToSubview = false;
return true;
}
......
2009-04-22 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
<rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves
Make mouseUP forward to the root view as we do for mouseMoves and mouseDragged:.
* WebView/WebHTMLView.mm:
(-[WebHTMLView mouseUp:]):
2009-04-22 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
......
......@@ -3471,8 +3471,10 @@ noPromisedData:
[self retain];
[self _stopAutoscrollTimer];
if (Frame* coreframe = core([self _frame]))
coreframe->eventHandler()->mouseUp(event);
if (Frame* frame = core([self _frame])) {
if (Page* page = frame->page())
page->mainFrame()->eventHandler()->mouseUp(event);
}
[self _updateMouseoverWithFakeEvent];
[self release];
......
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