diff options
author | lanwei <lanwei@chromium.org> | 2015-02-03 17:08:41 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-04 01:09:58 +0000 |
commit | 220483d0c533c2fa938fd5b150ab03ff77b195a7 (patch) | |
tree | 05850f615f05b2e669ca35525d519997d5b09166 /content | |
parent | c908eaf46fcefe22181ea25761c175518bb1fa4b (diff) | |
download | chromium_src-220483d0c533c2fa938fd5b150ab03ff77b195a7.zip chromium_src-220483d0c533c2fa938fd5b150ab03ff77b195a7.tar.gz chromium_src-220483d0c533c2fa938fd5b150ab03ff77b195a7.tar.bz2 |
Remove touch-scrolling-mode flag
Because now we are using throttled async touch model for scroll only,
we will remove touch-scrolling-mode related code.
BUG=350430
Review URL: https://codereview.chromium.org/886563005
Cr-Commit-Position: refs/heads/master@{#314456}
Diffstat (limited to 'content')
7 files changed, 17 insertions, 296 deletions
diff --git a/content/browser/renderer_host/input/input_router_config_helper.cc b/content/browser/renderer_host/input/input_router_config_helper.cc index 57ad49e..3ed530f 100644 --- a/content/browser/renderer_host/input/input_router_config_helper.cc +++ b/content/browser/renderer_host/input/input_router_config_helper.cc @@ -95,28 +95,12 @@ TouchEventQueue::Config GetTouchEventQueueConfig() { #endif -TouchEventQueue::TouchScrollingMode GetTouchScrollingMode() { - std::string modeString = - base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( - switches::kTouchScrollingMode); - if (modeString == switches::kTouchScrollingModeAsyncTouchmove) - return TouchEventQueue::TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE; - if (modeString == switches::kTouchScrollingModeSyncTouchmove) - return TouchEventQueue::TOUCH_SCROLLING_MODE_SYNC_TOUCHMOVE; - if (modeString == switches::kTouchScrollingModeTouchcancel) - return TouchEventQueue::TOUCH_SCROLLING_MODE_TOUCHCANCEL; - if (!modeString.empty()) - LOG(ERROR) << "Invalid --touch-scrolling-mode option: " << modeString; - return TouchEventQueue::TOUCH_SCROLLING_MODE_DEFAULT; -} - } // namespace InputRouterImpl::Config GetInputRouterConfigForPlatform() { InputRouterImpl::Config config; config.gesture_config = GetGestureEventQueueConfig(); config.touch_config = GetTouchEventQueueConfig(); - config.touch_config.touch_scrolling_mode = GetTouchScrollingMode(); return config; } diff --git a/content/browser/renderer_host/input/touch_action_browsertest.cc b/content/browser/renderer_host/input/touch_action_browsertest.cc index ea4649e..38718b3 100644 --- a/content/browser/renderer_host/input/touch_action_browsertest.cc +++ b/content/browser/renderer_host/input/touch_action_browsertest.cc @@ -179,14 +179,8 @@ IN_PROC_BROWSER_TEST_F(TouchActionBrowserTest, DISABLED_DefaultAuto) { EXPECT_EQ(1, ExecuteScriptAndExtractInt("eventCounts.touchstart")); EXPECT_EQ(1, ExecuteScriptAndExtractInt("eventCounts.touchmove")); - if (TouchEventQueue::TOUCH_SCROLLING_MODE_DEFAULT == - TouchEventQueue::TOUCH_SCROLLING_MODE_TOUCHCANCEL) { - EXPECT_EQ(0, ExecuteScriptAndExtractInt("eventCounts.touchend")); - EXPECT_EQ(1, ExecuteScriptAndExtractInt("eventCounts.touchcancel")); - } else { - EXPECT_EQ(1, ExecuteScriptAndExtractInt("eventCounts.touchend")); - EXPECT_EQ(0, ExecuteScriptAndExtractInt("eventCounts.touchcancel")); - } + EXPECT_EQ(1, ExecuteScriptAndExtractInt("eventCounts.touchend")); + EXPECT_EQ(0, ExecuteScriptAndExtractInt("eventCounts.touchcancel")); } // Verify that touching a touch-action: none region disables scrolling and diff --git a/content/browser/renderer_host/input/touch_event_queue.cc b/content/browser/renderer_host/input/touch_event_queue.cc index 013ddd0..6ac63ce 100644 --- a/content/browser/renderer_host/input/touch_event_queue.cc +++ b/content/browser/renderer_host/input/touch_event_queue.cc @@ -357,8 +357,7 @@ class CoalescedWebTouchEvent { }; TouchEventQueue::Config::Config() - : touch_scrolling_mode(TOUCH_SCROLLING_MODE_DEFAULT), - touch_ack_timeout_delay(base::TimeDelta::FromMilliseconds(200)), + : touch_ack_timeout_delay(base::TimeDelta::FromMilliseconds(200)), touch_ack_timeout_supported(false) { } @@ -371,8 +370,7 @@ TouchEventQueue::TouchEventQueue(TouchEventQueueClient* client, drop_remaining_touches_in_sequence_(false), touchmove_slop_suppressor_(new TouchMoveSlopSuppressor), send_touch_events_async_(false), - last_sent_touch_timestamp_sec_(0), - touch_scrolling_mode_(config.touch_scrolling_mode) { + last_sent_touch_timestamp_sec_(0) { DCHECK(client); if (config.touch_ack_timeout_supported) { timeout_handler_.reset( @@ -541,8 +539,7 @@ void TouchEventQueue::OnGestureScrollEvent( DCHECK(!touchmove_slop_suppressor_->suppressing_touchmoves()) << "A touch handler should be offered a touchmove before scrolling."; } - if (touch_scrolling_mode_ == TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE && - !drop_remaining_touches_in_sequence_ && + if (!drop_remaining_touches_in_sequence_ && touch_consumer_states_.is_empty()) { // If no touch points have a consumer, prevent all subsequent touch events // received during the scroll from reaching the renderer. This ensures @@ -552,60 +549,26 @@ void TouchEventQueue::OnGestureScrollEvent( drop_remaining_touches_in_sequence_ = true; } - if (touch_scrolling_mode_ == TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE) - pending_async_touchmove_.reset(); + pending_async_touchmove_.reset(); return; } - if (gesture_event.event.type != blink::WebInputEvent::GestureScrollUpdate) - return; - - if (touch_scrolling_mode_ == TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE) + if (gesture_event.event.type == blink::WebInputEvent::GestureScrollUpdate) send_touch_events_async_ = true; - - if (touch_scrolling_mode_ != TOUCH_SCROLLING_MODE_TOUCHCANCEL) - return; - - // We assume that scroll events are generated synchronously from - // dispatching a touch event ack. This allows us to generate a synthetic - // cancel event that has the same touch ids as the touch event that - // is being acked. Otherwise, we don't perform the touch-cancel optimization. - if (!dispatching_touch_ack_) - return; - - if (drop_remaining_touches_in_sequence_) - return; - - drop_remaining_touches_in_sequence_ = true; - - // Fake a TouchCancel to cancel the touch points of the touch event - // that is currently being acked. - // Note: |dispatching_touch_ack_| is non-null when we reach here, meaning we - // are in the scope of PopTouchEventToClient() and that no touch event - // in the queue is waiting for ack from renderer. So we can just insert - // the touch cancel at the beginning of the queue. - touch_queue_.push_front(new CoalescedWebTouchEvent( - ObtainCancelEventForTouchEvent( - dispatching_touch_ack_->coalesced_event()), true)); } void TouchEventQueue::OnGestureEventAck( const GestureEventWithLatencyInfo& event, InputEventAckState ack_result) { - if (touch_scrolling_mode_ != TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE) - return; - - if (event.event.type != blink::WebInputEvent::GestureScrollUpdate) - return; - // Throttle sending touchmove events as long as the scroll events are handled. // Note that there's no guarantee that this ACK is for the most recent // gesture event (or even part of the current sequence). Worst case, the // delay in updating the absorption state will result in minor UI glitches. // A valid |pending_async_touchmove_| will be flushed when the next event is // forwarded. - send_touch_events_async_ = (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED); + if (event.event.type == blink::WebInputEvent::GestureScrollUpdate) + send_touch_events_async_ = (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED); } void TouchEventQueue::OnHasTouchEventHandlers(bool has_handlers) { @@ -774,10 +737,9 @@ void TouchEventQueue::UpdateTouchConsumerStates(const WebTouchEvent& event, touch_consumer_states_.clear_bit(point.id); } } else if (event.type == WebInputEvent::TouchStart) { - if (touch_scrolling_mode_ == TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE && - ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) { + if (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) send_touch_events_async_ = false; - } + for (unsigned i = 0; i < event.touchesLength; ++i) { const WebTouchPoint& point = event.touches[i]; if (point.state == WebTouchPoint::StatePressed) { diff --git a/content/browser/renderer_host/input/touch_event_queue.h b/content/browser/renderer_host/input/touch_event_queue.h index cdd5d29..584935f 100644 --- a/content/browser/renderer_host/input/touch_event_queue.h +++ b/content/browser/renderer_host/input/touch_event_queue.h @@ -38,31 +38,9 @@ class CONTENT_EXPORT TouchEventQueueClient { // A queue for throttling and coalescing touch-events. class CONTENT_EXPORT TouchEventQueue { public: - // Different ways of dealing with touch events during scrolling. - // TODO(rbyers): Remove this once we're confident that touch move absorption - // is OK. http://crbug.com/350430 - enum TouchScrollingMode { - // Send a touchcancel on scroll start and no further touch events for the - // duration of the scroll. Chrome Android's traditional behavior. - TOUCH_SCROLLING_MODE_TOUCHCANCEL, - // Send touchmove events throughout a scroll, blocking on each ACK and - // using the disposition to determine whether a scroll update should be - // sent. Mobile Safari's default overflow scroll behavior. - TOUCH_SCROLLING_MODE_SYNC_TOUCHMOVE, - // Send touchmove events throughout a scroll, but throttle sending and - // ignore the ACK as long as scrolling remains possible. Unconsumed scroll - // events return touchmove events to being dispatched synchronously. - TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE, - TOUCH_SCROLLING_MODE_DEFAULT = TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE - }; - struct CONTENT_EXPORT Config { Config(); - // Determines the type of touch scrolling. - // Defaults to TouchEventQueue:::TOUCH_SCROLLING_MODE_DEFAULT. - TouchEventQueue::TouchScrollingMode touch_scrolling_mode; - // Controls whether touch ack timeouts will trigger touch cancellation. // Defaults to 200ms. base::TimeDelta touch_ack_timeout_delay; @@ -212,8 +190,7 @@ class CONTENT_EXPORT TouchEventQueue { // this is a stricter condition than an empty |touch_consumer_states_|, as it // also prevents forwarding of touchstart events for new pointers in the // current sequence. This is only used when the event is synthetically - // cancelled after a touch timeout, or after a scroll event when the - // mode is TOUCH_SCROLLING_MODE_TOUCHCANCEL. + // cancelled after a touch timeout. bool drop_remaining_touches_in_sequence_; // Optional handler for timed-out touch event acks. @@ -232,11 +209,6 @@ class CONTENT_EXPORT TouchEventQueue { scoped_ptr<TouchEventWithLatencyInfo> pending_async_touchmove_; double last_sent_touch_timestamp_sec_; - // How touch events are handled during scrolling. For now this is a global - // setting for experimentation, but we may evolve it into an app-controlled - // mode. - const TouchScrollingMode touch_scrolling_mode_; - // Event is saved to compare pointer positions for new touchmove events. scoped_ptr<blink::WebTouchEvent> last_sent_touchevent_; diff --git a/content/browser/renderer_host/input/touch_event_queue_unittest.cc b/content/browser/renderer_host/input/touch_event_queue_unittest.cc index afdc436..5af6743 100644 --- a/content/browser/renderer_host/input/touch_event_queue_unittest.cc +++ b/content/browser/renderer_host/input/touch_event_queue_unittest.cc @@ -37,13 +37,14 @@ class TouchEventQueueTest : public testing::Test, : sent_event_count_(0), acked_event_count_(0), last_acked_event_state_(INPUT_EVENT_ACK_STATE_UNKNOWN), - slop_length_dips_(0), - touch_scrolling_mode_(TouchEventQueue::TOUCH_SCROLLING_MODE_DEFAULT) {} + slop_length_dips_(0) {} ~TouchEventQueueTest() override {} // testing::Test - void SetUp() override { ResetQueueWithConfig(CreateConfig()); } + void SetUp() override { + ResetQueueWithConfig(TouchEventQueue::Config()); + } void TearDown() override { queue_.reset(); } @@ -78,23 +79,12 @@ class TouchEventQueueTest : public testing::Test, } protected: - TouchEventQueue::Config CreateConfig() { - TouchEventQueue::Config config; - config.touch_scrolling_mode = touch_scrolling_mode_; - return config; - } - - void SetTouchScrollingMode(TouchEventQueue::TouchScrollingMode mode) { - touch_scrolling_mode_ = mode; - ResetQueueWithConfig(CreateConfig()); - } - void SetUpForTouchMoveSlopTesting(double slop_length_dips) { slop_length_dips_ = slop_length_dips; } void SetUpForTimeoutTesting(base::TimeDelta timeout_delay) { - TouchEventQueue::Config config = CreateConfig(); + TouchEventQueue::Config config; config.touch_ack_timeout_delay = timeout_delay; config.touch_ack_timeout_supported = true; ResetQueueWithConfig(config); @@ -304,7 +294,6 @@ class TouchEventQueueTest : public testing::Test, scoped_ptr<InputEventAckState> sync_ack_result_; double slop_length_dips_; gfx::PointF anchor_; - TouchEventQueue::TouchScrollingMode touch_scrolling_mode_; base::MessageLoopForUI message_loop_; }; @@ -988,140 +977,6 @@ TEST_F(TouchEventQueueTest, NoTouchBasic) { EXPECT_EQ(1U, GetAndResetAckedEventCount()); } -// Tests that no TouchEvents are sent to renderer during scrolling. -TEST_F(TouchEventQueueTest, TouchCancelOnScroll) { - SetTouchScrollingMode(TouchEventQueue::TOUCH_SCROLLING_MODE_TOUCHCANCEL); - // Queue a TouchStart. - PressTouchPoint(0, 1); - EXPECT_EQ(1U, GetAndResetSentEventCount()); - SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - - MoveTouchPoint(0, 20, 5); - EXPECT_EQ(1U, queued_event_count()); - EXPECT_EQ(1U, GetAndResetSentEventCount()); - - MoveTouchPoint(0, 30, 15); - EXPECT_EQ(2U, queued_event_count()); - EXPECT_EQ(0U, GetAndResetSentEventCount()); - - // Queue another TouchStart. - PressTouchPoint(20, 20); - EXPECT_EQ(3U, queued_event_count()); - EXPECT_EQ(0U, GetAndResetSentEventCount()); - EXPECT_EQ(WebInputEvent::TouchStart, latest_event().type); - - WebGestureEvent followup_scroll; - followup_scroll.type = WebInputEvent::GestureScrollBegin; - SetFollowupEvent(followup_scroll); - SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); - EXPECT_EQ(1U, GetAndResetSentEventCount()); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - EXPECT_EQ(2U, queued_event_count()); - EXPECT_TRUE(sent_event().cancelable); - EXPECT_EQ(WebInputEvent::TouchMove, sent_event().type); - - // GestureScrollUpdate inserts a synthetic TouchCancel before the TouchStart. - followup_scroll.type = WebInputEvent::GestureScrollUpdate; - SetFollowupEvent(followup_scroll); - SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); - EXPECT_EQ(1U, GetAndResetSentEventCount()); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - EXPECT_EQ(2U, queued_event_count()); - EXPECT_EQ(WebInputEvent::TouchCancel, sent_event().type); - EXPECT_FALSE(sent_event().cancelable); - EXPECT_EQ(WebInputEvent::TouchStart, latest_event().type); - - // Acking the TouchCancel will result in dispatch of the next TouchStart. - SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); - // The synthetic TouchCancel should not reach client, only the TouchStart. - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - EXPECT_EQ(0U, GetAndResetSentEventCount()); - EXPECT_EQ(WebInputEvent::TouchStart, acked_event().type); - - // TouchMove should not be sent to the renderer. - MoveTouchPoint(0, 30, 5); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - EXPECT_EQ(0U, GetAndResetSentEventCount()); - EXPECT_EQ(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, acked_event_state()); - - // GestureScrollUpdates should not change affect touch forwarding. - SendGestureEvent(WebInputEvent::GestureScrollUpdate); - - // TouchEnd should not be sent to the renderer. - ReleaseTouchPoint(0); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - EXPECT_EQ(0U, GetAndResetSentEventCount()); - EXPECT_EQ(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, acked_event_state()); - - ReleaseTouchPoint(0); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - EXPECT_EQ(0U, GetAndResetSentEventCount()); - EXPECT_EQ(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, acked_event_state()); - - // Touch events from a new gesture sequence should be forwarded normally. - PressTouchPoint(80, 10); - EXPECT_EQ(1U, GetAndResetSentEventCount()); - SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - - MoveTouchPoint(0, 80, 20); - EXPECT_EQ(1U, GetAndResetSentEventCount()); - SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - - ReleaseTouchPoint(0); - EXPECT_EQ(1U, GetAndResetSentEventCount()); - SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); -} - -// Tests that a scroll event will not insert a synthetic TouchCancel if there -// was no consumer for the current touch sequence. -TEST_F(TouchEventQueueTest, NoTouchCancelOnScrollIfNoConsumer) { - SetTouchScrollingMode(TouchEventQueue::TOUCH_SCROLLING_MODE_TOUCHCANCEL); - - // Queue a TouchStart. - PressTouchPoint(0, 1); - EXPECT_EQ(1U, GetAndResetSentEventCount()); - SendTouchEventAck(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - EXPECT_EQ(WebInputEvent::TouchStart, sent_event().type); - - // Queue a TouchMove that turns into a GestureScrollBegin. - WebGestureEvent followup_scroll; - followup_scroll.type = WebInputEvent::GestureScrollBegin; - SetFollowupEvent(followup_scroll); - MoveTouchPoint(0, 20, 5); - - // The TouchMove has no consumer, and should be ack'ed immediately. However, - // *no* synthetic TouchCancel should be inserted as the touch sequence - // had no consumer. - EXPECT_EQ(0U, queued_event_count()); - EXPECT_EQ(0U, GetAndResetSentEventCount()); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - EXPECT_EQ(0U, queued_event_count()); - EXPECT_EQ(WebInputEvent::TouchStart, sent_event().type); - - // Subsequent TouchMove's should not be sent to the renderer. - MoveTouchPoint(0, 30, 5); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - EXPECT_EQ(0U, GetAndResetSentEventCount()); - EXPECT_EQ(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, acked_event_state()); - - // TouchEnd should not be sent to the renderer. - ReleaseTouchPoint(0); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - EXPECT_EQ(0U, GetAndResetSentEventCount()); - EXPECT_EQ(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, acked_event_state()); - - // Touch events from a new gesture sequence should be forwarded normally. - PressTouchPoint(80, 10); - EXPECT_EQ(1U, GetAndResetSentEventCount()); - SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); -} - // Tests that IsTouchStartPendingAck works correctly. TEST_F(TouchEventQueueTest, PendingStart) { @@ -1714,31 +1569,7 @@ TEST_F(TouchEventQueueTest, NoForwardingAfterScrollWithNoTouchConsumers) { EXPECT_EQ(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, acked_event_state()); } -TEST_F(TouchEventQueueTest, SyncTouchMoveDoesntCancelTouchOnScroll) { - SetTouchScrollingMode(TouchEventQueue::TOUCH_SCROLLING_MODE_SYNC_TOUCHMOVE); - // Queue a TouchStart. - PressTouchPoint(0, 1); - EXPECT_EQ(1U, GetAndResetSentEventCount()); - SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - - MoveTouchPoint(0, 20, 5); - EXPECT_EQ(1U, queued_event_count()); - EXPECT_EQ(1U, GetAndResetSentEventCount()); - - // GestureScrollBegin doesn't insert a synthetic TouchCancel. - WebGestureEvent followup_scroll; - followup_scroll.type = WebInputEvent::GestureScrollBegin; - SetFollowupEvent(followup_scroll); - SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); - EXPECT_EQ(0U, GetAndResetSentEventCount()); - EXPECT_EQ(1U, GetAndResetAckedEventCount()); - EXPECT_EQ(0U, queued_event_count()); -} - TEST_F(TouchEventQueueTest, AsyncTouch) { - SetTouchScrollingMode(TouchEventQueue::TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE); - // Queue a TouchStart. PressTouchPoint(0, 1); EXPECT_EQ(1U, GetAndResetSentEventCount()); @@ -1770,8 +1601,6 @@ TEST_F(TouchEventQueueTest, AsyncTouch) { // Ensure that touchmove's are appropriately throttled during a typical // scroll sequences that transitions between scrolls consumed and unconsumed. TEST_F(TouchEventQueueTest, AsyncTouchThrottledAfterScroll) { - SetTouchScrollingMode(TouchEventQueue::TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE); - // Process a TouchStart PressTouchPoint(0, 1); EXPECT_EQ(1U, GetAndResetSentEventCount()); @@ -1967,8 +1796,6 @@ TEST_F(TouchEventQueueTest, AsyncTouchThrottledAfterScroll) { } TEST_F(TouchEventQueueTest, AsyncTouchFlushedByTouchEnd) { - SetTouchScrollingMode(TouchEventQueue::TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE); - PressTouchPoint(0, 0); SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); EXPECT_EQ(1U, GetAndResetSentEventCount()); @@ -2024,7 +1851,6 @@ TEST_F(TouchEventQueueTest, AsyncTouchFlushedByTouchEnd) { // Ensure that async touch dispatch and touch ack timeout interactions work // appropriately. TEST_F(TouchEventQueueTest, AsyncTouchWithAckTimeout) { - SetTouchScrollingMode(TouchEventQueue::TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE); SetUpForTimeoutTesting(DefaultTouchTimeoutDelay()); // The touchstart should start the timeout. @@ -2107,8 +1933,6 @@ TEST_F(TouchEventQueueTest, AsyncTouchWithAckTimeout) { // Ensure that if the touch ack for an async touchmove triggers a follow-up // touch event, that follow-up touch will be forwarded appropriately. TEST_F(TouchEventQueueTest, AsyncTouchWithTouchCancelAfterAck) { - SetTouchScrollingMode(TouchEventQueue::TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE); - PressTouchPoint(0, 0); EXPECT_EQ(1U, GetAndResetSentEventCount()); SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); @@ -2162,8 +1986,6 @@ TEST_F(TouchEventQueueTest, AsyncTouchWithTouchCancelAfterAck) { // Ensure that the async touch is fully reset if the touch sequence restarts // without properly terminating. TEST_F(TouchEventQueueTest, AsyncTouchWithHardTouchStartReset) { - SetTouchScrollingMode(TouchEventQueue::TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE); - PressTouchPoint(0, 0); EXPECT_EQ(1U, GetAndResetSentEventCount()); SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); @@ -2201,8 +2023,6 @@ TEST_F(TouchEventQueueTest, AsyncTouchWithHardTouchStartReset) { } TEST_F(TouchEventQueueTest, TouchAbsorptionWithConsumedFirstMove) { - SetTouchScrollingMode(TouchEventQueue::TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE); - // Queue a TouchStart. PressTouchPoint(0, 1); SendTouchEventAck(INPUT_EVENT_ACK_STATE_NOT_CONSUMED); @@ -2242,8 +2062,6 @@ TEST_F(TouchEventQueueTest, TouchAbsorptionWithConsumedFirstMove) { } TEST_F(TouchEventQueueTest, TouchStartCancelableDuringScroll) { - SetTouchScrollingMode(TouchEventQueue::TOUCH_SCROLLING_MODE_ASYNC_TOUCHMOVE); - // Queue a touchstart and touchmove that go unconsumed, transitioning to an // active scroll sequence. PressTouchPoint(0, 1); diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index eeeae6a..85083ae 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc @@ -752,11 +752,6 @@ const char kTestingFixedHttpsPort[] = "testing-fixed-https-port"; // Type of the current test harness ("browser" or "ui"). const char kTestType[] = "test-type"; -const char kTouchScrollingMode[] = "touch-scrolling-mode"; -const char kTouchScrollingModeAsyncTouchmove[] = "async-touchmove"; -const char kTouchScrollingModeSyncTouchmove[] = "sync-touchmove"; -const char kTouchScrollingModeTouchcancel[] = "touchcancel"; - // Causes TRACE_EVENT flags to be recorded beginning with shutdown. Optionally, // can specify the specific trace categories to include (e.g. // --trace-shutdown=base,net) otherwise, all events are recorded. diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index 77693b3..fd66188 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h @@ -212,10 +212,6 @@ CONTENT_EXPORT extern const char kTabCaptureUpscaleQuality[]; CONTENT_EXPORT extern const char kTestingFixedHttpPort[]; CONTENT_EXPORT extern const char kTestingFixedHttpsPort[]; CONTENT_EXPORT extern const char kTestType[]; -CONTENT_EXPORT extern const char kTouchScrollingMode[]; -CONTENT_EXPORT extern const char kTouchScrollingModeAsyncTouchmove[]; -CONTENT_EXPORT extern const char kTouchScrollingModeSyncTouchmove[]; -CONTENT_EXPORT extern const char kTouchScrollingModeTouchcancel[]; CONTENT_EXPORT extern const char kTraceShutdown[]; extern const char kTraceShutdownFile[]; extern const char kTraceStartup[]; |