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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyleConstants.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
Index: third_party/WebKit/Source/core/style/ComputedStyleConstants.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
index fb72adffadc8c319be866003a1d936e4db5d80a9..6b758cdfbfd1f1c3385d5bcb11043726459b0ecd 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
@@ -463,19 +463,22 @@ enum DraggableRegionMode { DraggableRegionNone, DraggableRegionDrag, DraggableRe
static const size_t TouchActionBits = 6;
enum TouchAction {
- TouchActionAuto = 0x0,
- TouchActionNone = 0x1,
- TouchActionPanLeft = 0x2,
- TouchActionPanRight = 0x4,
+ TouchActionNone = 0x0,
+ TouchActionPanLeft = 0x1,
+ TouchActionPanRight = 0x2,
TouchActionPanX = TouchActionPanLeft | TouchActionPanRight,
- TouchActionPanUp = 0x8,
- TouchActionPanDown = 0x10,
+ TouchActionPanUp = 0x4,
+ TouchActionPanDown = 0x8,
TouchActionPanY = TouchActionPanUp | TouchActionPanDown,
- TouchActionPinchZoom = 0x20,
+ TouchActionPan = TouchActionPanX | TouchActionPanY,
+ TouchActionPinchZoom = 0x10,
+ TouchActionManipulation = TouchActionPan | TouchActionPinchZoom,
+ TouchActionDoubleTapZoom = 0x20,
+ TouchActionAuto = TouchActionManipulation | TouchActionDoubleTapZoom
};
-inline TouchAction operator| (TouchAction a, TouchAction b) { return TouchAction(int(a) | int(b)); }
+inline TouchAction operator| (TouchAction a, TouchAction b) { return static_cast<TouchAction>(int(a) | int(b)); }
inline TouchAction& operator|= (TouchAction& a, TouchAction b) { return a = a | b; }
-inline TouchAction operator& (TouchAction a, TouchAction b) { return TouchAction(int(a) & int(b)); }
+inline TouchAction operator& (TouchAction a, TouchAction b) { return static_cast<TouchAction>(int(a) & int(b)); }
inline TouchAction& operator&= (TouchAction& a, TouchAction b) { return a = a & b; }
enum EIsolation { IsolationAuto, IsolationIsolate };
« no previous file with comments | « third_party/WebKit/Source/core/input/TouchActionUtil.cpp ('k') | third_party/WebKit/Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698