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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 case DragSourceActionNone: | 103 case DragSourceActionNone: |
104 return false; | 104 return false; |
105 } | 105 } |
106 // Make sure MSVC doesn't complain that not all control paths return a value
. | 106 // Make sure MSVC doesn't complain that not all control paths return a value
. |
107 return false; | 107 return false; |
108 } | 108 } |
109 #endif | 109 #endif |
110 | 110 |
111 static PlatformMouseEvent createMouseEvent(DragData* dragData) | 111 static PlatformMouseEvent createMouseEvent(DragData* dragData) |
112 { | 112 { |
113 bool shiftKey, ctrlKey, altKey, metaKey; | |
114 shiftKey = ctrlKey = altKey = metaKey = false; | |
115 int keyState = dragData->modifierKeyState(); | 113 int keyState = dragData->modifierKeyState(); |
116 shiftKey = static_cast<bool>(keyState & PlatformEvent::ShiftKey); | 114 bool shiftKey = static_cast<bool>(keyState & PlatformEvent::ShiftKey); |
117 ctrlKey = static_cast<bool>(keyState & PlatformEvent::CtrlKey); | 115 bool ctrlKey = static_cast<bool>(keyState & PlatformEvent::CtrlKey); |
118 altKey = static_cast<bool>(keyState & PlatformEvent::AltKey); | 116 bool altKey = static_cast<bool>(keyState & PlatformEvent::AltKey); |
119 metaKey = static_cast<bool>(keyState & PlatformEvent::MetaKey); | 117 bool metaKey = static_cast<bool>(keyState & PlatformEvent::MetaKey); |
120 | 118 |
121 return PlatformMouseEvent(dragData->clientPosition(), dragData->globalPositi
on(), | 119 return PlatformMouseEvent(dragData->clientPosition(), dragData->globalPositi
on(), |
122 LeftButton, PlatformEvent::MouseMoved, 0, shiftKey
, ctrlKey, altKey, | 120 LeftButton, PlatformEvent::MouseMoved, 0, shiftKey
, ctrlKey, altKey, |
123 metaKey, currentTime()); | 121 metaKey, currentTime()); |
124 } | 122 } |
125 | 123 |
126 static PassRefPtr<Clipboard> createDraggingClipboard(ClipboardAccessPolicy polic
y, DragData* dragData) | 124 static PassRefPtr<Clipboard> createDraggingClipboard(ClipboardAccessPolicy polic
y, DragData* dragData) |
127 { | 125 { |
128 return Clipboard::create(Clipboard::DragAndDrop, policy, dragData->platformD
ata()); | 126 return Clipboard::create(Clipboard::DragAndDrop, policy, dragData->platformD
ata()); |
129 } | 127 } |
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 return false; | 957 return false; |
960 #endif | 958 #endif |
961 } | 959 } |
962 | 960 |
963 void DragController::cleanupAfterSystemDrag() | 961 void DragController::cleanupAfterSystemDrag() |
964 { | 962 { |
965 } | 963 } |
966 | 964 |
967 } // namespace WebCore | 965 } // namespace WebCore |
968 | 966 |
OLD | NEW |