Changeset 58441 in webkit
- Timestamp:
- Apr 28, 2010 3:48:23 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r58439 r58441 1 2010-04-28 Abhishek Arya <inferno@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Tests for a crash when an image drag-drop operation happens inside a continuously refreshing iframe. 6 https://bugs.webkit.org/show_bug.cgi?id=37618 7 8 * editing/pasteboard/drag-drop-iframe-refresh-crash-expected.txt: Added. 9 * editing/pasteboard/drag-drop-iframe-refresh-crash.html: Added. 10 * editing/resources/drag-drop.html: Added. 11 1 12 2010-04-28 Adam Langley <agl@chromium.org> 2 13 -
trunk/WebCore/ChangeLog
r58440 r58441 1 2010-04-28 Abhishek Arya <inferno@chromium.org> 2 3 Reviewed by Eric Seidel. 4 5 Convert m_documentUnderMouse, m_dragInitiator to RefPtr. 6 Eliminated unused m_dragInitiator accessor to prevent dereferencing. 7 https://bugs.webkit.org/show_bug.cgi?id=37618 8 9 Test: editing/pasteboard/drag-drop-iframe-refresh-crash.html 10 11 * page/DragController.cpp: 12 (WebCore::DragController::tryDocumentDrag): 13 (WebCore::DragController::concludeEditDrag): 14 * page/DragController.h: 15 (WebCore::DragController::draggingImageURL): 16 (WebCore::DragController::documentUnderMouse): 17 1 18 2010-04-28 Dumitru Daniliuc <dumi@chromium.org> 2 19 -
trunk/WebCore/page/DragController.cpp
r56175 r58441 314 314 315 315 IntPoint point = frameView->windowToContents(dragData->clientPosition()); 316 Element* element = elementUnderMouse(m_documentUnderMouse , point);316 Element* element = elementUnderMouse(m_documentUnderMouse.get(), point); 317 317 if (!asFileInput(element)) { 318 318 VisibleSelection dragCaret = m_documentUnderMouse->frame()->visiblePositionForPoint(point); … … 364 364 365 365 IntPoint point = m_documentUnderMouse->view()->windowToContents(dragData->clientPosition()); 366 Element* element = elementUnderMouse(m_documentUnderMouse , point);366 Element* element = elementUnderMouse(m_documentUnderMouse.get(), point); 367 367 Frame* innerFrame = element->ownerDocument()->frame(); 368 368 ASSERT(innerFrame); … … 440 440 } else { 441 441 if (setSelectionToDragCaret(innerFrame, dragCaret, range, point)) 442 applyCommand(ReplaceSelectionCommand::create(m_documentUnderMouse , fragment, true, dragData->canSmartReplace(), chosePlainText));442 applyCommand(ReplaceSelectionCommand::create(m_documentUnderMouse.get(), fragment, true, dragData->canSmartReplace(), chosePlainText)); 443 443 } 444 444 } else { … … 451 451 m_client->willPerformDragDestinationAction(DragDestinationActionEdit, dragData); 452 452 if (setSelectionToDragCaret(innerFrame, dragCaret, range, point)) 453 applyCommand(ReplaceSelectionCommand::create(m_documentUnderMouse , createFragmentFromText(range.get(), text), true, false, true));453 applyCommand(ReplaceSelectionCommand::create(m_documentUnderMouse.get(), createFragmentFromText(range.get(), text), true, false, true)); 454 454 } 455 455 loader->setAllowStaleResources(false); -
trunk/WebCore/page/DragController.h
r55353 r58441 68 68 void setDraggingImageURL(const KURL& url) { m_draggingImageURL = url; } 69 69 const KURL& draggingImageURL() const { return m_draggingImageURL; } 70 void setDragInitiator(Document* initiator) { m_dragInitiator = initiator; m_didInitiateDrag = true; }71 Document* dragInitiator() const { return m_dragInitiator; }72 70 void setDragOffset(const IntPoint& offset) { m_dragOffset = offset; } 73 71 const IntPoint& dragOffset() const { return m_dragOffset; } 74 72 DragSourceAction dragSourceAction() const { return m_dragSourceAction; } 75 73 76 Document* documentUnderMouse() const { return m_documentUnderMouse ; }74 Document* documentUnderMouse() const { return m_documentUnderMouse.get(); } 77 75 DragDestinationAction dragDestinationAction() const { return m_dragDestinationAction; } 78 76 DragSourceAction delegateDragSourceAction(const IntPoint& pagePoint); … … 115 113 DragClient* m_client; 116 114 117 Document*m_documentUnderMouse; // The document the mouse was last dragged over.118 Document*m_dragInitiator; // The Document (if any) that initiated the drag.115 RefPtr<Document> m_documentUnderMouse; // The document the mouse was last dragged over. 116 RefPtr<Document> m_dragInitiator; // The Document (if any) that initiated the drag. 119 117 120 118 DragDestinationAction m_dragDestinationAction;
Note: See TracChangeset
for help on using the changeset viewer.