Changeset 27742 in webkit


Ignore:
Timestamp:
Nov 12, 2007 7:57:45 PM (16 years ago)
Author:
oliver@apple.com
Message:

<rdar://problem/5537289> REGRESSION: Dragging a link or an image from an IFrame causes the page to not respond to clicks afterwards (15460)

Reviewed by John S.

EventHandler needs to reset these fields when a drag terminates, otherwise
EventHandler is left in an inconsistent state when a drag is initiated on a
page with multiple frames.

Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r27735 r27742  
    99          with a detail of 2 or higher comes in. This prevents the selection.
    1010        * page/inspector/inspector.css: Mark the breadcrumb as user-select: none.
     11
     122007-11-12  Oliver Hunt  <oliver@apple.com>
     13
     14        Reviewed by John S.
     15
     16        <rdar://problem/5537289> REGRESSION: Dragging a link or an image from an IFrame causes the page to not respond to clicks afterwards (15460)
     17       
     18        EventHandler needs to reset these fields when a drag terminates, otherwise
     19        EventHandler is left in an inconsistent state when a drag is initiated on a
     20        page with multiple frames.
     21
     22        * page/EventHandler.cpp:
     23        (WebCore::EventHandler::cancelDragAndDrop):
     24        (WebCore::EventHandler::performDragAndDrop):
     25        (WebCore::EventHandler::clearDragState):
     26        * page/EventHandler.h:
    1127
    12282007-11-12  Oliver Hunt  <oliver@apple.com>
  • trunk/WebCore/page/EventHandler.cpp

    r27690 r27742  
    10151015    Node* targetNode = m_capturingMouseEventsNode ? m_capturingMouseEventsNode.get() : mev.targetNode();
    10161016    RefPtr<Frame> newSubframe = subframeForTargetNode(targetNode);
    1017    
     1017
    10181018    // We want mouseouts to happen first, from the inside out.  First send a move event to the last subframe so that it will fire mouseouts.
    10191019    if (m_lastMouseMoveEventSubframe && m_lastMouseMoveEventSubframe->tree()->isDescendantOf(m_frame) && m_lastMouseMoveEventSubframe != newSubframe)
     
    11781178            dispatchDragEvent(dragleaveEvent, m_dragTarget.get(), event, clipboard);
    11791179    }
    1180     m_dragTarget = 0;
     1180    clearDragState();
    11811181}
    11821182
     
    11921192            accept = dispatchDragEvent(dropEvent, m_dragTarget.get(), event, clipboard);
    11931193    }
     1194    clearDragState();
     1195    return accept;
     1196}
     1197
     1198void EventHandler::clearDragState()
     1199{
    11941200    m_dragTarget = 0;
    1195     return accept;
     1201    m_capturingMouseEventsNode = 0;
     1202#if PLATFORM(MAC)
     1203    m_sendingEventToSubview = false;
     1204#endif
    11961205}
    11971206
  • trunk/WebCore/page/EventHandler.h

    r27668 r27742  
    223223    bool handleDrag(const MouseEventWithHitTestResults&);
    224224    bool handleMouseUp(const MouseEventWithHitTestResults&);
     225    void clearDragState();
    225226
    226227    bool dispatchDragSrcEvent(const AtomicString& eventType, const PlatformMouseEvent&);
Note: See TracChangeset for help on using the changeset viewer.