| 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 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 924 src->selection().setSelection(VisibleSelection::selectionFromCon
tentsOfNode(node)); | 924 src->selection().setSelection(VisibleSelection::selectionFromCon
tentsOfNode(node)); |
| 925 } | 925 } |
| 926 | 926 |
| 927 if (!dragImage) { | 927 if (!dragImage) { |
| 928 ASSERT(src->page()); | 928 ASSERT(src->page()); |
| 929 float deviceScaleFactor = src->page()->deviceScaleFactor(); | 929 float deviceScaleFactor = src->page()->deviceScaleFactor(); |
| 930 dragImage = dragImageForLink(linkURL, hitTestResult.textContent(), d
eviceScaleFactor, mouseDraggedPoint, dragLocation); | 930 dragImage = dragImageForLink(linkURL, hitTestResult.textContent(), d
eviceScaleFactor, mouseDraggedPoint, dragLocation); |
| 931 } | 931 } |
| 932 doSystemDrag(dragImage.get(), dragLocation, mouseDraggedPoint, dataTrans
fer, src, true); | 932 doSystemDrag(dragImage.get(), dragLocation, mouseDraggedPoint, dataTrans
fer, src, true); |
| 933 } else if (state.m_dragType == DragSourceActionDHTML) { | 933 } else if (state.m_dragType == DragSourceActionDHTML) { |
| 934 if (!dragImage) | |
| 935 return false; | |
| 936 doSystemDrag(dragImage.get(), dragLocation, dragOrigin, dataTransfer, sr
c, false); | 934 doSystemDrag(dragImage.get(), dragLocation, dragOrigin, dataTransfer, sr
c, false); |
| 937 } else { | 935 } else { |
| 938 ASSERT_NOT_REACHED(); | 936 ASSERT_NOT_REACHED(); |
| 939 return false; | 937 return false; |
| 940 } | 938 } |
| 941 | 939 |
| 942 return true; | 940 return true; |
| 943 } | 941 } |
| 944 | 942 |
| 945 void DragController::doSystemDrag(DragImage* image, const IntPoint& dragLocation
, const IntPoint& eventPos, DataTransfer* dataTransfer, LocalFrame* frame, bool
forLink) | 943 void DragController::doSystemDrag(DragImage* image, const IntPoint& dragLocation
, const IntPoint& eventPos, DataTransfer* dataTransfer, LocalFrame* frame, bool
forLink) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 | 984 |
| 987 void DragController::trace(Visitor* visitor) | 985 void DragController::trace(Visitor* visitor) |
| 988 { | 986 { |
| 989 visitor->trace(m_page); | 987 visitor->trace(m_page); |
| 990 visitor->trace(m_documentUnderMouse); | 988 visitor->trace(m_documentUnderMouse); |
| 991 visitor->trace(m_dragInitiator); | 989 visitor->trace(m_dragInitiator); |
| 992 visitor->trace(m_fileInputElementUnderMouse); | 990 visitor->trace(m_fileInputElementUnderMouse); |
| 993 } | 991 } |
| 994 | 992 |
| 995 } // namespace blink | 993 } // namespace blink |
| OLD | NEW |