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

Unified Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 2401123002: UserGestureIndicator is a mess. Clean it up. (Closed)
Patch Set: Callback cleanup, comments Created 4 years, 2 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
Index: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
index 33d59be9752b67cdf5ef4058a415333bb8f82468..8f8ca8444e13102b3b8c81a8f059096fd023147c 100644
--- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
+++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
@@ -351,8 +351,8 @@ WebInputEventResult WebFrameWidgetImpl::handleInputEvent(
break;
case WebInputEvent::MouseDown:
eventType = EventTypeNames::mousedown;
- gestureIndicator = wrapUnique(
- new UserGestureIndicator(DefinitelyProcessingNewUserGesture));
+ gestureIndicator = wrapUnique(new UserGestureIndicator(
+ UserGestureToken::create(UserGestureToken::NewGesture)));
m_mouseCaptureGestureToken = gestureIndicator->currentToken();
break;
case WebInputEvent::MouseUp:
@@ -525,7 +525,8 @@ bool WebFrameWidgetImpl::setComposition(
if (m_suppressNextKeypressEvent && !inputMethodController.hasComposition())
return text.isEmpty();
- UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
+ UserGestureIndicator gestureIndicator(
+ UserGestureToken::create(UserGestureToken::NewGesture));
// When the range of composition underlines overlap with the range between
// selectionStart and selectionEnd, WebKit somehow won't paint the selection
@@ -542,7 +543,8 @@ bool WebFrameWidgetImpl::setComposition(
// This code needs to be refactored (http://crbug.com/629721).
bool WebFrameWidgetImpl::commitText(const WebString& text,
int relativeCaretPosition) {
- UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture);
+ UserGestureIndicator gestureIndicator(
+ UserGestureToken::create(UserGestureToken::NewGesture));
LocalFrame* focused = focusedLocalFrameAvailableForIme();
if (!focused)
return false;
« no previous file with comments | « third_party/WebKit/Source/web/SuspendableScriptExecutor.cpp ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698