| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 } | 118 } |
| 119 #endif // DCHECK_IS_ON() | 119 #endif // DCHECK_IS_ON() |
| 120 | 120 |
| 121 static WebMouseEvent createMouseEvent(DragData* dragData) { | 121 static WebMouseEvent createMouseEvent(DragData* dragData) { |
| 122 WebMouseEvent result( | 122 WebMouseEvent result( |
| 123 WebInputEvent::MouseMove, WebFloatPoint(dragData->clientPosition().x(), | 123 WebInputEvent::MouseMove, WebFloatPoint(dragData->clientPosition().x(), |
| 124 dragData->clientPosition().y()), | 124 dragData->clientPosition().y()), |
| 125 WebFloatPoint(dragData->globalPosition().x(), | 125 WebFloatPoint(dragData->globalPosition().x(), |
| 126 dragData->globalPosition().y()), | 126 dragData->globalPosition().y()), |
| 127 WebPointerProperties::Button::Left, 0, | 127 WebPointerProperties::Button::Left, 0, |
| 128 static_cast<PlatformEvent::Modifiers>(dragData->modifiers()), | 128 static_cast<WebInputEvent::Modifiers>(dragData->modifiers()), |
| 129 TimeTicks::Now().InSeconds()); | 129 TimeTicks::Now().InSeconds()); |
| 130 // TODO(dtapuska): Really we should chnage DragData to store the viewport | 130 // TODO(dtapuska): Really we should chnage DragData to store the viewport |
| 131 // coordinates and scale. | 131 // coordinates and scale. |
| 132 result.setFrameScale(1); | 132 result.setFrameScale(1); |
| 133 return result; | 133 return result; |
| 134 } | 134 } |
| 135 | 135 |
| 136 static DataTransfer* createDraggingDataTransfer(DataTransferAccessPolicy policy, | 136 static DataTransfer* createDraggingDataTransfer(DataTransferAccessPolicy policy, |
| 137 DragData* dragData) { | 137 DragData* dragData) { |
| 138 return DataTransfer::create(DataTransfer::DragAndDrop, policy, | 138 return DataTransfer::create(DataTransfer::DragAndDrop, policy, |
| (...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1217 // operationForDrag can be pulled into WebCore itself | 1217 // operationForDrag can be pulled into WebCore itself |
| 1218 DCHECK(dragData); | 1218 DCHECK(dragData); |
| 1219 return dragData->containsURL() && !m_didInitiateDrag ? DragOperationCopy | 1219 return dragData->containsURL() && !m_didInitiateDrag ? DragOperationCopy |
| 1220 : DragOperationNone; | 1220 : DragOperationNone; |
| 1221 } | 1221 } |
| 1222 | 1222 |
| 1223 bool DragController::isCopyKeyDown(DragData* dragData) { | 1223 bool DragController::isCopyKeyDown(DragData* dragData) { |
| 1224 int modifiers = dragData->modifiers(); | 1224 int modifiers = dragData->modifiers(); |
| 1225 | 1225 |
| 1226 #if OS(MACOSX) | 1226 #if OS(MACOSX) |
| 1227 return modifiers & PlatformEvent::AltKey; | 1227 return modifiers & WebInputEvent::AltKey; |
| 1228 #else | 1228 #else |
| 1229 return modifiers & PlatformEvent::CtrlKey; | 1229 return modifiers & WebInputEvent::ControlKey; |
| 1230 #endif | 1230 #endif |
| 1231 } | 1231 } |
| 1232 | 1232 |
| 1233 DEFINE_TRACE(DragController) { | 1233 DEFINE_TRACE(DragController) { |
| 1234 visitor->trace(m_page); | 1234 visitor->trace(m_page); |
| 1235 visitor->trace(m_documentUnderMouse); | 1235 visitor->trace(m_documentUnderMouse); |
| 1236 visitor->trace(m_dragInitiator); | 1236 visitor->trace(m_dragInitiator); |
| 1237 visitor->trace(m_fileInputElementUnderMouse); | 1237 visitor->trace(m_fileInputElementUnderMouse); |
| 1238 } | 1238 } |
| 1239 | 1239 |
| 1240 } // namespace blink | 1240 } // namespace blink |
| OLD | NEW |