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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 static PlatformMouseEvent createMouseEvent(DragData* dragData) | 111 static PlatformMouseEvent createMouseEvent(DragData* dragData) |
112 { | 112 { |
113 int keyState = dragData->modifierKeyState(); | 113 int keyState = dragData->modifierKeyState(); |
114 bool shiftKey = static_cast<bool>(keyState & PlatformEvent::ShiftKey); | 114 bool shiftKey = static_cast<bool>(keyState & PlatformEvent::ShiftKey); |
115 bool ctrlKey = static_cast<bool>(keyState & PlatformEvent::CtrlKey); | 115 bool ctrlKey = static_cast<bool>(keyState & PlatformEvent::CtrlKey); |
116 bool altKey = static_cast<bool>(keyState & PlatformEvent::AltKey); | 116 bool altKey = static_cast<bool>(keyState & PlatformEvent::AltKey); |
117 bool metaKey = static_cast<bool>(keyState & PlatformEvent::MetaKey); | 117 bool metaKey = static_cast<bool>(keyState & PlatformEvent::MetaKey); |
118 | 118 |
119 return PlatformMouseEvent(dragData->clientPosition(), dragData->globalPositi
on(), | 119 return PlatformMouseEvent(dragData->clientPosition(), dragData->globalPositi
on(), |
120 LeftButton, PlatformEvent::MouseMoved, 0, shiftKey
, ctrlKey, altKey, | 120 LeftButton, PlatformEvent::MouseMoved, 0, shiftKey, ctrlKey, altKey, |
121 metaKey, currentTime()); | 121 metaKey, PlatformMouseEvent::RealOrIndistinguishable, currentTime()); |
122 } | 122 } |
123 | 123 |
124 static PassRefPtrWillBeRawPtr<DataTransfer> createDraggingDataTransfer(DataTrans
ferAccessPolicy policy, DragData* dragData) | 124 static PassRefPtrWillBeRawPtr<DataTransfer> createDraggingDataTransfer(DataTrans
ferAccessPolicy policy, DragData* dragData) |
125 { | 125 { |
126 return DataTransfer::create(DataTransfer::DragAndDrop, policy, dragData->pla
tformData()); | 126 return DataTransfer::create(DataTransfer::DragAndDrop, policy, dragData->pla
tformData()); |
127 } | 127 } |
128 | 128 |
129 DragController::DragController(Page* page, DragClient* client) | 129 DragController::DragController(Page* page, DragClient* client) |
130 : m_page(page) | 130 : m_page(page) |
131 , m_client(client) | 131 , m_client(client) |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 | 965 |
966 void DragController::trace(Visitor* visitor) | 966 void DragController::trace(Visitor* visitor) |
967 { | 967 { |
968 visitor->trace(m_page); | 968 visitor->trace(m_page); |
969 visitor->trace(m_documentUnderMouse); | 969 visitor->trace(m_documentUnderMouse); |
970 visitor->trace(m_dragInitiator); | 970 visitor->trace(m_dragInitiator); |
971 visitor->trace(m_fileInputElementUnderMouse); | 971 visitor->trace(m_fileInputElementUnderMouse); |
972 } | 972 } |
973 | 973 |
974 } // namespace blink | 974 } // namespace blink |
OLD | NEW |