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

Unified Diff: content/renderer/render_widget.cc

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 | « content/common/input/touch_action.h ('k') | third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 2ece7075add91125890a1c8b7bdfb2b73940e1b4..bef6bde469755900a93a60a6b5bac16f8349ab6c 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -2262,13 +2262,6 @@ void RenderWidget::hasTouchEventHandlers(bool has_handlers) {
static_assert(int(blink::WebTouchAction##a) == int(TOUCH_ACTION_##b), \
"mismatching enums: " #a)
-inline content::TouchAction& operator|=(content::TouchAction& a,
- content::TouchAction b) {
- a = static_cast<content::TouchAction>(static_cast<int>(a) |
- static_cast<int>(b));
- return a;
-}
-
void RenderWidget::setTouchAction(
blink::WebTouchAction web_touch_action) {
@@ -2278,7 +2271,6 @@ void RenderWidget::setTouchAction(
return;
// Verify the same values are used by the types so we can cast between them.
- STATIC_ASSERT_WTI_ENUM_MATCH(Auto, AUTO);
STATIC_ASSERT_WTI_ENUM_MATCH(None, NONE);
STATIC_ASSERT_WTI_ENUM_MATCH(PanLeft, PAN_LEFT);
STATIC_ASSERT_WTI_ENUM_MATCH(PanRight, PAN_RIGHT);
@@ -2286,7 +2278,11 @@ void RenderWidget::setTouchAction(
STATIC_ASSERT_WTI_ENUM_MATCH(PanUp, PAN_UP);
STATIC_ASSERT_WTI_ENUM_MATCH(PanDown, PAN_DOWN);
STATIC_ASSERT_WTI_ENUM_MATCH(PanY, PAN_Y);
+ STATIC_ASSERT_WTI_ENUM_MATCH(Pan, PAN);
STATIC_ASSERT_WTI_ENUM_MATCH(PinchZoom, PINCH_ZOOM);
+ STATIC_ASSERT_WTI_ENUM_MATCH(Manipulation, MANIPULATION);
+ STATIC_ASSERT_WTI_ENUM_MATCH(DoubleTapZoom, DOUBLE_TAP_ZOOM);
+ STATIC_ASSERT_WTI_ENUM_MATCH(Auto, AUTO);
content::TouchAction content_touch_action =
static_cast<content::TouchAction>(web_touch_action);
« no previous file with comments | « content/common/input/touch_action.h ('k') | third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698