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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc

Issue 2495593003: scheduler: Handle mouse wheel event disposition correctly (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/scheduler/renderer/renderer_scheduler_impl.h" 5 #include "platform/scheduler/renderer/renderer_scheduler_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 break; 681 break;
682 682
683 case blink::WebInputEvent::MouseMove: 683 case blink::WebInputEvent::MouseMove:
684 // Consider mouse movement with the left button held down (see 684 // Consider mouse movement with the left button held down (see
685 // ShouldPrioritizeInputEvent) similarly to a touch gesture. 685 // ShouldPrioritizeInputEvent) similarly to a touch gesture.
686 AnyThread().last_gesture_was_compositor_driven = 686 AnyThread().last_gesture_was_compositor_driven =
687 input_event_state == InputEventState::EVENT_CONSUMED_BY_COMPOSITOR; 687 input_event_state == InputEventState::EVENT_CONSUMED_BY_COMPOSITOR;
688 AnyThread().awaiting_touch_start_response = false; 688 AnyThread().awaiting_touch_start_response = false;
689 break; 689 break;
690 690
691 case blink::WebInputEvent::MouseWheel:
692 AnyThread().last_gesture_was_compositor_driven =
693 input_event_state == InputEventState::EVENT_CONSUMED_BY_COMPOSITOR;
694 AnyThread().awaiting_touch_start_response = false;
695 // If the event was sent to the main thread, assume the default gesture is
696 // prevented until we see evidence otherwise.
697 AnyThread().default_gesture_prevented =
698 !AnyThread().last_gesture_was_compositor_driven;
699 break;
700
691 case blink::WebInputEvent::Undefined: 701 case blink::WebInputEvent::Undefined:
692 break; 702 break;
693 703
694 default: 704 default:
695 AnyThread().awaiting_touch_start_response = false; 705 AnyThread().awaiting_touch_start_response = false;
696 break; 706 break;
697 } 707 }
698 708
699 // Avoid unnecessary policy updates if the use case did not change. 709 // Avoid unnecessary policy updates if the use case did not change.
700 UseCase use_case = ComputeCurrentUseCase(now, &unused_policy_duration); 710 UseCase use_case = ComputeCurrentUseCase(now, &unused_policy_duration);
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 case v8::PERFORMANCE_LOAD: 1700 case v8::PERFORMANCE_LOAD:
1691 return "load"; 1701 return "load";
1692 default: 1702 default:
1693 NOTREACHED(); 1703 NOTREACHED();
1694 return nullptr; 1704 return nullptr;
1695 } 1705 }
1696 } 1706 }
1697 1707
1698 } // namespace scheduler 1708 } // namespace scheduler
1699 } // namespace blink 1709 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698