| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 case DragSourceActionNone: | 104 case DragSourceActionNone: |
| 105 return false; | 105 return false; |
| 106 } | 106 } |
| 107 // Make sure MSVC doesn't complain that not all control paths return a value
. | 107 // Make sure MSVC doesn't complain that not all control paths return a value
. |
| 108 return false; | 108 return false; |
| 109 } | 109 } |
| 110 #endif | 110 #endif |
| 111 | 111 |
| 112 static PlatformMouseEvent createMouseEvent(DragData* dragData) | 112 static PlatformMouseEvent createMouseEvent(DragData* dragData) |
| 113 { | 113 { |
| 114 int keyState = dragData->modifierKeyState(); | |
| 115 bool shiftKey = static_cast<bool>(keyState & PlatformEvent::ShiftKey); | |
| 116 bool ctrlKey = static_cast<bool>(keyState & PlatformEvent::CtrlKey); | |
| 117 bool altKey = static_cast<bool>(keyState & PlatformEvent::AltKey); | |
| 118 bool metaKey = static_cast<bool>(keyState & PlatformEvent::MetaKey); | |
| 119 | |
| 120 return PlatformMouseEvent(dragData->clientPosition(), dragData->globalPositi
on(), | 114 return PlatformMouseEvent(dragData->clientPosition(), dragData->globalPositi
on(), |
| 121 LeftButton, PlatformEvent::MouseMoved, 0, shiftKey, ctrlKey, altKey, | 115 LeftButton, PlatformEvent::MouseMoved, 0, |
| 122 metaKey, PlatformMouseEvent::RealOrIndistinguishable, currentTime()); | 116 static_cast<PlatformEvent::Modifiers>(dragData->modifierKeyState()), |
| 117 PlatformMouseEvent::RealOrIndistinguishable, currentTime()); |
| 123 } | 118 } |
| 124 | 119 |
| 125 static PassRefPtrWillBeRawPtr<DataTransfer> createDraggingDataTransfer(DataTrans
ferAccessPolicy policy, DragData* dragData) | 120 static PassRefPtrWillBeRawPtr<DataTransfer> createDraggingDataTransfer(DataTrans
ferAccessPolicy policy, DragData* dragData) |
| 126 { | 121 { |
| 127 return DataTransfer::create(DataTransfer::DragAndDrop, policy, dragData->pla
tformData()); | 122 return DataTransfer::create(DataTransfer::DragAndDrop, policy, dragData->pla
tformData()); |
| 128 } | 123 } |
| 129 | 124 |
| 130 DragController::DragController(Page* page, DragClient* client) | 125 DragController::DragController(Page* page, DragClient* client) |
| 131 : m_page(page) | 126 : m_page(page) |
| 132 , m_client(client) | 127 , m_client(client) |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 986 | 981 |
| 987 void DragController::trace(Visitor* visitor) | 982 void DragController::trace(Visitor* visitor) |
| 988 { | 983 { |
| 989 visitor->trace(m_page); | 984 visitor->trace(m_page); |
| 990 visitor->trace(m_documentUnderMouse); | 985 visitor->trace(m_documentUnderMouse); |
| 991 visitor->trace(m_dragInitiator); | 986 visitor->trace(m_dragInitiator); |
| 992 visitor->trace(m_fileInputElementUnderMouse); | 987 visitor->trace(m_fileInputElementUnderMouse); |
| 993 } | 988 } |
| 994 | 989 |
| 995 } // namespace blink | 990 } // namespace blink |
| OLD | NEW |