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

Unified Diff: third_party/WebKit/Source/core/events/TouchEvent.cpp

Issue 2863693003: Unify TouchAction classes (Closed)
Patch Set: add cstdlib Created 3 years, 7 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/events/TouchEvent.cpp
diff --git a/third_party/WebKit/Source/core/events/TouchEvent.cpp b/third_party/WebKit/Source/core/events/TouchEvent.cpp
index e4e77680ff2cd9b1c650e4d877b2152278b657f7..481207383cb7f484320e39fe3800b1b9ebfefe15 100644
--- a/third_party/WebKit/Source/core/events/TouchEvent.cpp
+++ b/third_party/WebKit/Source/core/events/TouchEvent.cpp
@@ -200,7 +200,7 @@ void LogTouchTargetHistogram(EventTarget* event_target,
TouchEvent::TouchEvent()
: default_prevented_before_current_target_(false),
- current_touch_action_(kTouchActionAuto) {}
+ current_touch_action_(TouchAction::kTouchActionAuto) {}
TouchEvent::TouchEvent(const WebTouchEvent& event,
TouchList* touches,
@@ -236,7 +236,7 @@ TouchEvent::TouchEvent(const AtomicString& type,
touches_(TouchList::Create(initializer.touches())),
target_touches_(TouchList::Create(initializer.targetTouches())),
changed_touches_(TouchList::Create(initializer.changedTouches())),
- current_touch_action_(kTouchActionAuto) {}
+ current_touch_action_(TouchAction::kTouchActionAuto) {}
TouchEvent::~TouchEvent() {}
@@ -296,7 +296,7 @@ void TouchEvent::preventDefault() {
// Only enable the warning when the current touch action is auto because
// an author may use touch action but call preventDefault for interop with
// browsers that don't support touch-action.
- if (current_touch_action_ == kTouchActionAuto) {
+ if (current_touch_action_ == TouchAction::kTouchActionAuto) {
message_source = kInterventionMessageSource;
warning_message =
"Unable to preventDefault inside passive event listener due to "
@@ -318,7 +318,7 @@ void TouchEvent::preventDefault() {
if ((type() == EventTypeNames::touchstart ||
type() == EventTypeNames::touchmove) &&
view() && view()->GetFrame() &&
- current_touch_action_ == kTouchActionAuto) {
+ current_touch_action_ == TouchAction::kTouchActionAuto) {
switch (HandlingPassive()) {
case PassiveMode::kNotPassiveDefault:
UseCounter::Count(view()->GetFrame(),
« no previous file with comments | « third_party/WebKit/Source/core/events/TouchEvent.h ('k') | third_party/WebKit/Source/core/events/TouchEventTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698