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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 dragSourceType = DragSourceType::PlainTextSource; | 192 dragSourceType = DragSourceType::PlainTextSource; |
193 return createFragmentFromText(EphemeralRange(context), | 193 return createFragmentFromText(EphemeralRange(context), |
194 dragData->asPlainText()); | 194 dragData->asPlainText()); |
195 } | 195 } |
196 | 196 |
197 return nullptr; | 197 return nullptr; |
198 } | 198 } |
199 | 199 |
200 bool DragController::dragIsMove(FrameSelection& selection, DragData* dragData) { | 200 bool DragController::dragIsMove(FrameSelection& selection, DragData* dragData) { |
201 return m_documentUnderMouse == m_dragInitiator && | 201 return m_documentUnderMouse == m_dragInitiator && |
202 selection.isContentEditable() && selection.isRange() && | 202 selection.isContentEditable() && |
| 203 selection.computeVisibleSelectionInDOMTreeDeprecated().isRange() && |
203 !isCopyKeyDown(dragData); | 204 !isCopyKeyDown(dragData); |
204 } | 205 } |
205 | 206 |
206 // FIXME: This method is poorly named. We're just clearing the selection from | 207 // FIXME: This method is poorly named. We're just clearing the selection from |
207 // the document this drag is exiting. | 208 // the document this drag is exiting. |
208 void DragController::cancelDrag() { | 209 void DragController::cancelDrag() { |
209 m_page->dragCaret().clear(); | 210 m_page->dragCaret().clear(); |
210 } | 211 } |
211 | 212 |
212 void DragController::dragEnded() { | 213 void DragController::dragEnded() { |
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 | 1244 |
1244 DEFINE_TRACE(DragController) { | 1245 DEFINE_TRACE(DragController) { |
1245 visitor->trace(m_page); | 1246 visitor->trace(m_page); |
1246 visitor->trace(m_documentUnderMouse); | 1247 visitor->trace(m_documentUnderMouse); |
1247 visitor->trace(m_dragInitiator); | 1248 visitor->trace(m_dragInitiator); |
1248 visitor->trace(m_dragState); | 1249 visitor->trace(m_dragState); |
1249 visitor->trace(m_fileInputElementUnderMouse); | 1250 visitor->trace(m_fileInputElementUnderMouse); |
1250 } | 1251 } |
1251 | 1252 |
1252 } // namespace blink | 1253 } // namespace blink |
OLD | NEW |