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

Unified Diff: public/web/WebInputEvent.h

Issue 490783003: Reduce hit test on ShowPress by moving event targeting to WebViewImpl (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove unnecessary headers Created 6 years, 4 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: public/web/WebInputEvent.h
diff --git a/public/web/WebInputEvent.h b/public/web/WebInputEvent.h
index 58c4a0bb39e1d8230b7d4ec08ad94a54f7d0dde5..38b281837feef004c5bbb77e8c6ab092158b6cd8 100644
--- a/public/web/WebInputEvent.h
+++ b/public/web/WebInputEvent.h
@@ -477,6 +477,35 @@ public:
{
memset(&data, 0, sizeof(data));
}
+
+ bool isScrollEvent() const
+ {
+ switch (type) {
+ case GestureScrollBegin:
+ case GestureScrollEnd:
+ case GestureScrollUpdate:
+ case GestureScrollUpdateWithoutPropagation:
+ case GestureFlingStart:
+ case GestureFlingCancel:
+ case GesturePinchBegin:
+ case GesturePinchEnd:
+ case GesturePinchUpdate:
+ return true;
+ case GestureShowPress:
+ case GestureTap:
+ case GestureTapUnconfirmed:
+ case GestureTapDown:
+ case GestureTapCancel:
+ case GestureDoubleTap:
+ case GestureTwoFingerTap:
+ case GestureLongPress:
+ case GestureLongTap:
+ return false;
+ default:
+ BLINK_ASSERT_NOT_REACHED();
+ return false;
+ }
+ }
};
// WebTouchEvent --------------------------------------------------------------
« Source/web/tests/LinkHighlightTest.cpp ('K') | « Source/web/tests/LinkHighlightTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698