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

Unified Diff: third_party/WebKit/public/web/WebTouchAction.h

Issue 1422513006: Simplify TouchAction enum to be a simple bit flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix computed style / layout tests and CR feedback Created 5 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
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/web/WebTouchAction.h
diff --git a/third_party/WebKit/public/web/WebTouchAction.h b/third_party/WebKit/public/web/WebTouchAction.h
index e9c3bc12896200d13c3a7b2964495fa39c16a577..d1ee9cb1e45cc1c56b7dad49db6009512714dec7 100644
--- a/third_party/WebKit/public/web/WebTouchAction.h
+++ b/third_party/WebKit/public/web/WebTouchAction.h
@@ -35,19 +35,22 @@ namespace blink {
// Flags for permitted touch actions, specified in http://w3c.github.io/pointerevents/#the-touch-action-css-property.
enum WebTouchAction {
- WebTouchActionAuto = 0x0,
- WebTouchActionNone = 0x1,
- WebTouchActionPanLeft = 0x2,
- WebTouchActionPanRight = 0x4,
+ WebTouchActionNone = 0x0,
+ WebTouchActionPanLeft = 0x1,
+ WebTouchActionPanRight = 0x2,
WebTouchActionPanX = WebTouchActionPanLeft | WebTouchActionPanRight,
- WebTouchActionPanUp = 0x8,
- WebTouchActionPanDown = 0x10,
+ WebTouchActionPanUp = 0x4,
+ WebTouchActionPanDown = 0x8,
WebTouchActionPanY = WebTouchActionPanUp | WebTouchActionPanDown,
- WebTouchActionPinchZoom = 0x20,
+ WebTouchActionPan = WebTouchActionPanX | WebTouchActionPanY,
+ WebTouchActionPinchZoom = 0x10,
+ WebTouchActionManipulation = WebTouchActionPan | WebTouchActionPinchZoom,
+ WebTouchActionDoubleTapZoom = 0x20,
+ WebTouchActionAuto = WebTouchActionManipulation | WebTouchActionDoubleTapZoom
};
-inline WebTouchAction operator| (WebTouchAction a, WebTouchAction b) { return WebTouchAction(int(a) | int(b)); }
+inline WebTouchAction operator| (WebTouchAction a, WebTouchAction b) { return static_cast<WebTouchAction>(int(a) | int(b)); }
inline WebTouchAction& operator|= (WebTouchAction& a, WebTouchAction b) { return a = a | b; }
-inline WebTouchAction operator& (WebTouchAction a, WebTouchAction b) { return WebTouchAction(int(a) & int(b)); }
+inline WebTouchAction operator& (WebTouchAction a, WebTouchAction b) { return static_cast<WebTouchAction>(int(a) & int(b)); }
inline WebTouchAction& operator&= (WebTouchAction& a, WebTouchAction b) { return a = a & b; }
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698