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

Side by Side Diff: Source/web/WebViewImpl.cpp

Issue 208853006: Drop event should generate user gesture. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/events/drop-generate-user-gesture-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 #include "platform/Cursor.h" 129 #include "platform/Cursor.h"
130 #include "platform/KeyboardCodes.h" 130 #include "platform/KeyboardCodes.h"
131 #include "platform/NotImplemented.h" 131 #include "platform/NotImplemented.h"
132 #include "platform/OverscrollTheme.h" 132 #include "platform/OverscrollTheme.h"
133 #include "platform/PlatformGestureEvent.h" 133 #include "platform/PlatformGestureEvent.h"
134 #include "platform/PlatformKeyboardEvent.h" 134 #include "platform/PlatformKeyboardEvent.h"
135 #include "platform/PlatformMouseEvent.h" 135 #include "platform/PlatformMouseEvent.h"
136 #include "platform/PlatformWheelEvent.h" 136 #include "platform/PlatformWheelEvent.h"
137 #include "platform/PopupMenuClient.h" 137 #include "platform/PopupMenuClient.h"
138 #include "platform/TraceEvent.h" 138 #include "platform/TraceEvent.h"
139 #include "platform/UserGestureIndicator.h"
139 #include "platform/exported/WebActiveGestureAnimation.h" 140 #include "platform/exported/WebActiveGestureAnimation.h"
140 #include "platform/fonts/FontCache.h" 141 #include "platform/fonts/FontCache.h"
141 #include "platform/graphics/Color.h" 142 #include "platform/graphics/Color.h"
142 #include "platform/graphics/Image.h" 143 #include "platform/graphics/Image.h"
143 #include "platform/graphics/ImageBuffer.h" 144 #include "platform/graphics/ImageBuffer.h"
144 #include "platform/scroll/ScrollbarTheme.h" 145 #include "platform/scroll/ScrollbarTheme.h"
145 #include "platform/weborigin/SchemeRegistry.h" 146 #include "platform/weborigin/SchemeRegistry.h"
146 #include "public/platform/Platform.h" 147 #include "public/platform/Platform.h"
147 #include "public/platform/WebDragData.h" 148 #include "public/platform/WebDragData.h"
148 #include "public/platform/WebFloatPoint.h" 149 #include "public/platform/WebFloatPoint.h"
(...skipping 3012 matching lines...) Expand 10 before | Expand all | Expand 10 after
3161 return; 3162 return;
3162 } 3163 }
3163 3164
3164 m_currentDragData->setModifierKeyState(webInputEventKeyStateToPlatformEventK eyState(keyModifiers)); 3165 m_currentDragData->setModifierKeyState(webInputEventKeyStateToPlatformEventK eyState(keyModifiers));
3165 DragData dragData( 3166 DragData dragData(
3166 m_currentDragData.get(), 3167 m_currentDragData.get(),
3167 clientPoint, 3168 clientPoint,
3168 screenPoint, 3169 screenPoint,
3169 static_cast<DragOperation>(m_operationsAllowed)); 3170 static_cast<DragOperation>(m_operationsAllowed));
3170 3171
3172 UserGestureIndicator gesture(DefinitelyProcessingNewUserGesture);
3171 m_page->dragController().performDrag(&dragData); 3173 m_page->dragController().performDrag(&dragData);
3172 3174
3173 m_dragOperation = WebDragOperationNone; 3175 m_dragOperation = WebDragOperationNone;
3174 m_currentDragData = nullptr; 3176 m_currentDragData = nullptr;
3175 } 3177 }
3176 3178
3177 void WebViewImpl::spellingMarkers(WebVector<uint32_t>* markers) 3179 void WebViewImpl::spellingMarkers(WebVector<uint32_t>* markers)
3178 { 3180 {
3179 Vector<uint32_t> result; 3181 Vector<uint32_t> result;
3180 for (LocalFrame* frame = m_page->mainFrame(); frame; frame = frame->tree().t raverseNext()) { 3182 for (LocalFrame* frame = m_page->mainFrame(); frame; frame = frame->tree().t raverseNext()) {
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
3995 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 3997 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
3996 3998
3997 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 3999 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
3998 return false; 4000 return false;
3999 4001
4000 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4002 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4001 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4003 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4002 } 4004 }
4003 4005
4004 } // namespace blink 4006 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/drop-generate-user-gesture-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698