Commit aa8a6e34 authored by jberlin@webkit.org's avatar jberlin@webkit.org

"event.ctrlKey" is always false when dragging an element with "ctrl" key down

https://bugs.webkit.org/show_bug.cgi?id=17113

Reviewed by Sam Weinig.

No new tests.

* page/DragController.cpp:
(WebCore::createMouseEvent):
Use the current state of the shift, ctrl, alt, and meta keys when creating the drag mouse event.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55974 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ff3cc439
2010-03-14 Jessie Berlin <jberlin@webkit.org>
Reviewed by Sam Weinig.
"event.ctrlKey" is always false when dragging an element with "ctrl" key down
https://bugs.webkit.org/show_bug.cgi?id=17113
No new tests.
* page/DragController.cpp:
(WebCore::createMouseEvent):
Use the current state of the shift, ctrl, alt, and meta keys when creating the drag mouse event.
2010-03-13 Antonio Gomes <tonikitoo@webkit.org>
Not reviewed identation fix.
......
......@@ -53,6 +53,7 @@
#include "MoveSelectionCommand.h"
#include "Node.h"
#include "Page.h"
#include "PlatformKeyboardEvent.h"
#include "RenderFileUploadControl.h"
#include "RenderImage.h"
#include "RenderView.h"
......@@ -70,10 +71,12 @@ namespace WebCore {
static PlatformMouseEvent createMouseEvent(DragData* dragData)
{
// FIXME: We should fake modifier keys here.
bool shiftKey, ctrlKey, altKey, metaKey;
shiftKey = ctrlKey = altKey = metaKey = false;
PlatformKeyboardEvent::getCurrentModifierState(shiftKey, ctrlKey, altKey, metaKey);
return PlatformMouseEvent(dragData->clientPosition(), dragData->globalPosition(),
LeftButton, MouseEventMoved, 0, false, false, false, false, currentTime());
LeftButton, MouseEventMoved, 0, shiftKey, ctrlKey, altKey,
metaKey, currentTime());
}
DragController::DragController(Page* page, DragClient* client)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment