Index: Source/WebCore/page/EventHandler.cpp |
=================================================================== |
--- Source/WebCore/page/EventHandler.cpp (revision 107411) |
+++ Source/WebCore/page/EventHandler.cpp (working copy) |
@@ -1831,7 +1831,7 @@ |
MouseEventWithHitTestResults mev = prepareMouseEvent(request, event); |
// Drag events should never go to text nodes (following IE, and proper mouseover/out dispatch) |
- Node* newTarget = targetNode(mev); |
+ RefPtr<Node> newTarget = targetNode(mev); |
if (newTarget && newTarget->isTextNode()) |
newTarget = newTarget->parentNode(); |
if (newTarget) |
@@ -1844,7 +1844,7 @@ |
// |
// Moreover, this ordering conforms to section 7.9.4 of the HTML 5 spec. <http://dev.w3.org/html5/spec/Overview.html#drag-and-drop-processing-model>. |
Frame* targetFrame; |
- if (targetIsFrame(newTarget, targetFrame)) { |
+ if (targetIsFrame(newTarget.get(), targetFrame)) { |
if (targetFrame) |
accept = targetFrame->eventHandler()->updateDragAndDrop(event, clipboard); |
} else if (newTarget) { |
@@ -1853,9 +1853,9 @@ |
// for now we don't care if event handler cancels default behavior, since there is none |
dispatchDragSrcEvent(eventNames().dragEvent, event); |
} |
- accept = dispatchDragEvent(eventNames().dragenterEvent, newTarget, event, clipboard); |
+ accept = dispatchDragEvent(eventNames().dragenterEvent, newTarget.get(), event, clipboard); |
if (!accept) |
- accept = findDropZone(newTarget, clipboard); |
+ accept = findDropZone(newTarget.get(), clipboard); |
} |
if (targetIsFrame(m_dragTarget.get(), targetFrame)) { |
@@ -1871,7 +1871,7 @@ |
} |
} else { |
Frame* targetFrame; |
- if (targetIsFrame(newTarget, targetFrame)) { |
+ if (targetIsFrame(newTarget.get(), targetFrame)) { |
if (targetFrame) |
accept = targetFrame->eventHandler()->updateDragAndDrop(event, clipboard); |
} else if (newTarget) { |
@@ -1880,9 +1880,9 @@ |
// for now we don't care if event handler cancels default behavior, since there is none |
dispatchDragSrcEvent(eventNames().dragEvent, event); |
} |
- accept = dispatchDragEvent(eventNames().dragoverEvent, newTarget, event, clipboard); |
+ accept = dispatchDragEvent(eventNames().dragoverEvent, newTarget.get(), event, clipboard); |
if (!accept) |
- accept = findDropZone(newTarget, clipboard); |
+ accept = findDropZone(newTarget.get(), clipboard); |
m_shouldOnlyFireDragOverEvent = false; |
} |
} |