| 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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 | 574 |
| 575 // For range to be null a WebKit client must have done something bad while | 575 // For range to be null a WebKit client must have done something bad while |
| 576 // manually controlling drag behaviour | 576 // manually controlling drag behaviour |
| 577 if (!range) | 577 if (!range) |
| 578 return false; | 578 return false; |
| 579 ResourceFetcher* fetcher = range->ownerDocument().fetcher(); | 579 ResourceFetcher* fetcher = range->ownerDocument().fetcher(); |
| 580 ResourceCacheValidationSuppressor validationSuppressor(fetcher); | 580 ResourceCacheValidationSuppressor validationSuppressor(fetcher); |
| 581 | 581 |
| 582 // Start new Drag&Drop command group, invalidate previous command group. | 582 // Start new Drag&Drop command group, invalidate previous command group. |
| 583 // Assume no other places is firing |DeleteByDrag| and |InsertFromDrop|. | 583 // Assume no other places is firing |DeleteByDrag| and |InsertFromDrop|. |
| 584 innerFrame->editor().registerCommandGroup( | 584 innerFrame->editor().registerCommandGroup(DragAndDropCommand::create( |
| 585 DragAndDropCommand::create(*innerFrame->document())); | 585 *innerFrame->document(), CommandSource::MenuOrKeyBinding)); |
| 586 | 586 |
| 587 if (dragIsMove(innerFrame->selection(), dragData) || | 587 if (dragIsMove(innerFrame->selection(), dragData) || |
| 588 dragCaret.isContentRichlyEditable()) { | 588 dragCaret.isContentRichlyEditable()) { |
| 589 DragSourceType dragSourceType = DragSourceType::HTMLSource; | 589 DragSourceType dragSourceType = DragSourceType::HTMLSource; |
| 590 DocumentFragment* fragment = documentFragmentFromDragData( | 590 DocumentFragment* fragment = documentFragmentFromDragData( |
| 591 dragData, innerFrame, range, true, dragSourceType); | 591 dragData, innerFrame, range, true, dragSourceType); |
| 592 if (!fragment) | 592 if (!fragment) |
| 593 return false; | 593 return false; |
| 594 | 594 |
| 595 if (dragIsMove(innerFrame->selection(), dragData)) { | 595 if (dragIsMove(innerFrame->selection(), dragData)) { |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1232 } | 1232 } |
| 1233 | 1233 |
| 1234 DEFINE_TRACE(DragController) { | 1234 DEFINE_TRACE(DragController) { |
| 1235 visitor->trace(m_page); | 1235 visitor->trace(m_page); |
| 1236 visitor->trace(m_documentUnderMouse); | 1236 visitor->trace(m_documentUnderMouse); |
| 1237 visitor->trace(m_dragInitiator); | 1237 visitor->trace(m_dragInitiator); |
| 1238 visitor->trace(m_fileInputElementUnderMouse); | 1238 visitor->trace(m_fileInputElementUnderMouse); |
| 1239 } | 1239 } |
| 1240 | 1240 |
| 1241 } // namespace blink | 1241 } // namespace blink |
| OLD | NEW |