Reviewed by Adele.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Nov 2006 18:36:56 +0000 (18:36 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Nov 2006 18:36:56 +0000 (18:36 +0000)
commit879eb8f451129cbbcfe0927921a26044f4e34eaf
treec60f10ec6b311c9ca85256066a776e3e4da56ac2
parentfe52372ca11185e2a94d3d7c58cb20b12de18074
    Reviewed by Adele.

        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: https://svn.webkit.org/repository/webkit/trunk@17574 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/selection/expanding-selections.html
LayoutTests/editing/selection/expanding-selections2.html
LayoutTests/editing/selection/select-from-textfield-outwards-expected.txt
LayoutTests/editing/selection/select-from-textfield-outwards.html
LayoutTests/fast/dynamic/layer-hit-test-crash.html
LayoutTests/fast/events/drag-in-frames-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/drag-in-frames.html [new file with mode: 0644]
LayoutTests/fast/events/event-view-toString.html
LayoutTests/fast/events/resources/drag-in-frames-console.html [new file with mode: 0644]
LayoutTests/fast/events/resources/drag-in-frames-left.html [new file with mode: 0644]
LayoutTests/fast/events/resources/drag-in-frames-right.html [new file with mode: 0644]
LayoutTests/fast/events/resources/drag-outside-window-frame.html
LayoutTests/svg/custom/hover-default-fill.svg
LayoutTests/svg/custom/stroke-width-click-expected.txt
LayoutTests/svg/custom/stroke-width-click.svg
WebCore/ChangeLog
WebCore/bridge/mac/FrameMac.h
WebCore/bridge/mac/FrameMac.mm
WebCore/page/FrameView.cpp
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/EventSendingController.h
WebKitTools/DumpRenderTree/EventSendingController.m
WebKitTools/DumpRenderTree/UIDelegate.m