Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1588)

Unified Diff: Source/web/WebViewImpl.cpp

Issue 879333002: Support buttons attribute for drag event (blink side). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index e53ccaaf1666e78c21913cfffda13b2b148eda32..62cb068bb96656238d315b21a27993c0bbeed820 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -237,20 +237,6 @@ STATIC_ASSERT_MATCHING_ENUM(DragOperationEvery);
static bool shouldUseExternalPopupMenus = false;
-static int webInputEventKeyStateToPlatformEventKeyState(int webInputEventKeyState)
-{
- int platformEventKeyState = 0;
- if (webInputEventKeyState & WebInputEvent::ShiftKey)
- platformEventKeyState = platformEventKeyState | PlatformEvent::ShiftKey;
- if (webInputEventKeyState & WebInputEvent::ControlKey)
- platformEventKeyState = platformEventKeyState | PlatformEvent::CtrlKey;
- if (webInputEventKeyState & WebInputEvent::AltKey)
- platformEventKeyState = platformEventKeyState | PlatformEvent::AltKey;
- if (webInputEventKeyState & WebInputEvent::MetaKey)
- platformEventKeyState = platformEventKeyState | PlatformEvent::MetaKey;
- return platformEventKeyState;
-}
-
namespace {
class UserGestureNotifier {
@@ -3639,25 +3625,25 @@ WebDragOperation WebViewImpl::dragTargetDragEnter(
const WebPoint& clientPoint,
const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed,
- int keyModifiers)
+ int modifiers)
{
ASSERT(!m_currentDragData);
m_currentDragData = DataObject::create(webDragData);
m_operationsAllowed = operationsAllowed;
- return dragTargetDragEnterOrOver(clientPoint, screenPoint, DragEnter, keyModifiers);
+ return dragTargetDragEnterOrOver(clientPoint, screenPoint, DragEnter, modifiers);
}
WebDragOperation WebViewImpl::dragTargetDragOver(
const WebPoint& clientPoint,
const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed,
- int keyModifiers)
+ int modifiers)
{
m_operationsAllowed = operationsAllowed;
- return dragTargetDragEnterOrOver(clientPoint, screenPoint, DragOver, keyModifiers);
+ return dragTargetDragEnterOrOver(clientPoint, screenPoint, DragOver, modifiers);
}
void WebViewImpl::dragTargetDragLeave()
@@ -3680,7 +3666,7 @@ void WebViewImpl::dragTargetDragLeave()
void WebViewImpl::dragTargetDrop(const WebPoint& clientPoint,
const WebPoint& screenPoint,
- int keyModifiers)
+ int modifiers)
{
ASSERT(m_currentDragData);
@@ -3699,7 +3685,7 @@ void WebViewImpl::dragTargetDrop(const WebPoint& clientPoint,
return;
}
- m_currentDragData->setModifierKeyState(webInputEventKeyStateToPlatformEventKeyState(keyModifiers));
+ m_currentDragData->setModifiers(toPlatformMouseEventModifiers(modifiers));
DragData dragData(
m_currentDragData.get(),
clientPoint,
@@ -3737,11 +3723,11 @@ void WebViewImpl::removeSpellingMarkersUnderWords(const WebVector<WebString>& wo
}
}
-WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPoint, const WebPoint& screenPoint, DragAction dragAction, int keyModifiers)
+WebDragOperation WebViewImpl::dragTargetDragEnterOrOver(const WebPoint& clientPoint, const WebPoint& screenPoint, DragAction dragAction, int modifiers)
{
ASSERT(m_currentDragData);
- m_currentDragData->setModifierKeyState(webInputEventKeyStateToPlatformEventKeyState(keyModifiers));
+ m_currentDragData->setModifiers(toPlatformMouseEventModifiers(modifiers));
DragData dragData(
m_currentDragData.get(),
clientPoint,
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | public/web/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698