Index: Source/core/page/DragController.cpp |
diff --git a/Source/core/page/DragController.cpp b/Source/core/page/DragController.cpp |
index 054eabfc828fe99260e516de398edafe243d4c38..8b05f7926d1831b6e8f498aa82547a392e009497 100644 |
--- a/Source/core/page/DragController.cpp |
+++ b/Source/core/page/DragController.cpp |
@@ -111,15 +111,10 @@ static bool dragTypeIsValid(DragSourceAction action) |
static PlatformMouseEvent createMouseEvent(DragData* dragData) |
{ |
- int keyState = dragData->modifierKeyState(); |
- bool shiftKey = static_cast<bool>(keyState & PlatformEvent::ShiftKey); |
- bool ctrlKey = static_cast<bool>(keyState & PlatformEvent::CtrlKey); |
- bool altKey = static_cast<bool>(keyState & PlatformEvent::AltKey); |
- bool metaKey = static_cast<bool>(keyState & PlatformEvent::MetaKey); |
- |
return PlatformMouseEvent(dragData->clientPosition(), dragData->globalPosition(), |
- LeftButton, PlatformEvent::MouseMoved, 0, shiftKey, ctrlKey, altKey, |
- metaKey, PlatformMouseEvent::RealOrIndistinguishable, currentTime()); |
+ LeftButton, PlatformEvent::MouseMoved, 0, |
+ static_cast<PlatformEvent::Modifiers>(dragData->modifiers()), |
+ PlatformMouseEvent::RealOrIndistinguishable, currentTime()); |
} |
static PassRefPtrWillBeRawPtr<DataTransfer> createDraggingDataTransfer(DataTransferAccessPolicy policy, DragData* dragData) |
@@ -971,12 +966,12 @@ DragOperation DragController::dragOperation(DragData* dragData) |
bool DragController::isCopyKeyDown(DragData* dragData) |
{ |
- int keyState = dragData->modifierKeyState(); |
+ int modifiers = dragData->modifiers(); |
#if OS(MACOSX) |
- return keyState & PlatformEvent::AltKey; |
+ return modifiers & PlatformEvent::AltKey; |
#else |
- return keyState & PlatformEvent::CtrlKey; |
+ return modifiers & PlatformEvent::CtrlKey; |
#endif |
} |