-
ap authored
http://bugs.webkit.org/show_bug.cgi?id=7323 REGRESSION (10.4.4): ondrag* events don't fire on page in a frame WebCore: * bridge/mac/FrameMac.h: Moved drag source information to a static variable in FrameMac.mm. There can be only one drag active at any moment, and having this information here was making sharing this information between subframes hard. * bridge/mac/FrameMac.mm: (WebCore::FrameMac::FrameMac): Initialize sharedDragInfo. (WebCore::FrameMac::freeClipboard): (WebCore::FrameMac::dragHysteresisExceeded): (WebCore::FrameMac::handleMouseMoveEvent): (WebCore::FrameMac::handleMouseReleaseEvent): (WebCore::FrameMac::mouseDown): (WebCore::FrameMac::dragSourceMovedTo): (WebCore::FrameMac::dragSourceEndedAt): (WebCore::FrameMac::dispatchDragSrcEvent): Access drag source info via sharedDragInfo - this fixes drag source even dispatching. Also removed some old code that was forwarding mouse events to subviews to make HTML editing work in subframes. * page/FrameView.cpp: (WebCore::FrameView::updateDragAndDrop): (WebCore::FrameView::cancelDragAndDrop): (WebCore::FrameView::performDragAndDrop): Forward events to subframes for dispatching - this fixes drag target events. WebKitTools: When dragging, do not send EventSendingController's events immediately. Dragging is supposed to be modal, so we need to perform it from within the delegate, without returning to JS to make the next mouse movement. When the mouse is down, mouse events are now recorded, and executed when mouseUp is sent. * DumpRenderTree/EventSendingController.h: * DumpRenderTree/EventSendingController.m: (-[EventSendingController dealloc]): (-[EventSendingController leapForward:]): (-[EventSendingController mouseDown]): (-[EventSendingController mouseUp]): (-[EventSendingController mouseMoveToX:Y:]): (+[EventSendingController saveEvent:]): (+[EventSendingController replaySavedEvents]): * DumpRenderTree/UIDelegate.m: (-[UIDelegate webView:dragImage:at:offset:event:pasteboard:source:slideBack:forView:]): LayoutTests: * fast/events/drag-in-frames-expected.txt: Added. * fast/events/drag-in-frames.html: Added. * fast/events/resources/drag-in-frames-console.html: Added. * fast/events/resources/drag-in-frames-left.html: Added. * fast/events/resources/drag-in-frames-right.html: Added. * editing/selection/expanding-selections.html: * editing/selection/expanding-selections2.html: * fast/dynamic/layer-hit-test-crash.html: * fast/events/event-view-toString.html: * fast/events/resources/drag-outside-window-frame.html: * svg/custom/hover-default-fill.svg: Added missing calls to mouseUp(). * svg/custom/stroke-width-click-expected.txt: * svg/custom/stroke-width-click.svg: Don't attempt to click outside the page, this was confusing DRT. * editing/selection/select-from-textfield-outwards-expected.txt: * editing/selection/select-from-textfield-outwards.html: Removed alerts between dragging steps - they are now useless, as the dragging events are stored and executed at once. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18e99774