Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Unified Diff: Source/WebCore/page/EventHandler.cpp

Issue 9379014: Merge 106488 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/events/remove-target-with-shadow-in-drag-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/page/EventHandler.cpp
===================================================================
--- Source/WebCore/page/EventHandler.cpp (revision 107413)
+++ Source/WebCore/page/EventHandler.cpp (working copy)
@@ -1837,7 +1837,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)
@@ -1850,7 +1850,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) {
@@ -1859,9 +1859,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)) {
@@ -1877,7 +1877,7 @@
}
} else {
Frame* targetFrame;
- if (targetIsFrame(newTarget, targetFrame)) {
+ if (targetIsFrame(newTarget.get(), targetFrame)) {
if (targetFrame)
accept = targetFrame->eventHandler()->updateDragAndDrop(event, clipboard);
} else if (newTarget) {
@@ -1886,9 +1886,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;
}
}
« no previous file with comments | « LayoutTests/fast/events/remove-target-with-shadow-in-drag-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698