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

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

Issue 2500253002: scheduler: Handle mouse wheel event disposition correctly
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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 break; 637 break;
638 638
639 case blink::WebInputEvent::MouseMove: 639 case blink::WebInputEvent::MouseMove:
640 // Consider mouse movement with the left button held down (see 640 // Consider mouse movement with the left button held down (see
641 // ShouldPrioritizeInputEvent) similarly to a touch gesture. 641 // ShouldPrioritizeInputEvent) similarly to a touch gesture.
642 AnyThread().last_gesture_was_compositor_driven = 642 AnyThread().last_gesture_was_compositor_driven =
643 input_event_state == InputEventState::EVENT_CONSUMED_BY_COMPOSITOR; 643 input_event_state == InputEventState::EVENT_CONSUMED_BY_COMPOSITOR;
644 AnyThread().awaiting_touch_start_response = false; 644 AnyThread().awaiting_touch_start_response = false;
645 break; 645 break;
646 646
647 case blink::WebInputEvent::MouseWheel:
648 AnyThread().last_gesture_was_compositor_driven =
649 input_event_state == InputEventState::EVENT_CONSUMED_BY_COMPOSITOR;
650 AnyThread().awaiting_touch_start_response = false;
651 // If the event was sent to the main thread, assume the default gesture is
652 // prevented until we see evidence otherwise.
653 AnyThread().default_gesture_prevented =
654 !AnyThread().last_gesture_was_compositor_driven;
655 break;
656
647 case blink::WebInputEvent::Undefined: 657 case blink::WebInputEvent::Undefined:
648 break; 658 break;
649 659
650 default: 660 default:
651 AnyThread().awaiting_touch_start_response = false; 661 AnyThread().awaiting_touch_start_response = false;
652 break; 662 break;
653 } 663 }
654 664
655 // Avoid unnecessary policy updates if the use case did not change. 665 // Avoid unnecessary policy updates if the use case did not change.
656 UseCase use_case = ComputeCurrentUseCase(now, &unused_policy_duration); 666 UseCase use_case = ComputeCurrentUseCase(now, &unused_policy_duration);
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 case v8::PERFORMANCE_LOAD: 1596 case v8::PERFORMANCE_LOAD:
1587 return "load"; 1597 return "load";
1588 default: 1598 default:
1589 NOTREACHED(); 1599 NOTREACHED();
1590 return nullptr; 1600 return nullptr;
1591 } 1601 }
1592 } 1602 }
1593 1603
1594 } // namespace scheduler 1604 } // namespace scheduler
1595 } // namespace blink 1605 } // 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