| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Google Inc. | 3 * Copyright (C) 2008 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1143 return true; | 1143 return true; |
| 1144 } | 1144 } |
| 1145 | 1145 |
| 1146 // TODO(esprehn): forLink is dead code, what was it for? | 1146 // TODO(esprehn): forLink is dead code, what was it for? |
| 1147 void DragController::doSystemDrag(DragImage* image, | 1147 void DragController::doSystemDrag(DragImage* image, |
| 1148 const IntPoint& dragLocation, | 1148 const IntPoint& dragLocation, |
| 1149 const IntPoint& eventPos, | 1149 const IntPoint& eventPos, |
| 1150 DataTransfer* dataTransfer, | 1150 DataTransfer* dataTransfer, |
| 1151 LocalFrame* frame, | 1151 LocalFrame* frame, |
| 1152 bool forLink) { | 1152 bool forLink) { |
| 1153 // TODO(dcheng): Drag and drop is not yet supported for OOPI. | |
| 1154 if (m_page->mainFrame()->isRemoteFrame()) | |
| 1155 return; | |
| 1156 m_didInitiateDrag = true; | 1153 m_didInitiateDrag = true; |
| 1157 m_dragInitiator = frame->document(); | 1154 m_dragInitiator = frame->document(); |
| 1158 | 1155 |
| 1159 LocalFrame* mainFrame = m_page->deprecatedLocalMainFrame(); | 1156 LocalFrame* mainFrame = frame->localFrameRoot(); |
| 1160 FrameView* mainFrameView = mainFrame->view(); | 1157 FrameView* mainFrameView = mainFrame->view(); |
| 1161 IntPoint adjustedDragLocation = mainFrameView->rootFrameToContents( | 1158 IntPoint adjustedDragLocation = mainFrameView->rootFrameToContents( |
| 1162 frame->view()->contentsToRootFrame(dragLocation)); | 1159 frame->view()->contentsToRootFrame(dragLocation)); |
| 1163 IntPoint adjustedEventPos = mainFrameView->rootFrameToContents( | 1160 IntPoint adjustedEventPos = mainFrameView->rootFrameToContents( |
| 1164 frame->view()->contentsToRootFrame(eventPos)); | 1161 frame->view()->contentsToRootFrame(eventPos)); |
| 1165 WebDragData dragData = dataTransfer->dataObject()->toWebDragData(); | 1162 WebDragData dragData = dataTransfer->dataObject()->toWebDragData(); |
| 1166 WebDragOperationsMask dragOperationMask = | 1163 WebDragOperationsMask dragOperationMask = |
| 1167 static_cast<WebDragOperationsMask>(dataTransfer->sourceOperation()); | 1164 static_cast<WebDragOperationsMask>(dataTransfer->sourceOperation()); |
| 1168 IntSize offsetSize(adjustedEventPos - adjustedDragLocation); | 1165 IntSize offsetSize(adjustedEventPos - adjustedDragLocation); |
| 1169 WebPoint offsetPoint(offsetSize.width(), offsetSize.height()); | 1166 WebPoint offsetPoint(offsetSize.width(), offsetSize.height()); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 } | 1203 } |
| 1207 | 1204 |
| 1208 DEFINE_TRACE(DragController) { | 1205 DEFINE_TRACE(DragController) { |
| 1209 visitor->trace(m_page); | 1206 visitor->trace(m_page); |
| 1210 visitor->trace(m_documentUnderMouse); | 1207 visitor->trace(m_documentUnderMouse); |
| 1211 visitor->trace(m_dragInitiator); | 1208 visitor->trace(m_dragInitiator); |
| 1212 visitor->trace(m_fileInputElementUnderMouse); | 1209 visitor->trace(m_fileInputElementUnderMouse); |
| 1213 } | 1210 } |
| 1214 | 1211 |
| 1215 } // namespace blink | 1212 } // namespace blink |
| OLD | NEW |