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

Side by Side Diff: third_party/WebKit/Source/core/input/ScrollManager.cpp

Issue 2918053002: Move middle-click autoscroll to synthetic fling. (Closed)
Patch Set: Delete redundant cursor shape print Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "core/input/ScrollManager.h" 5 #include "core/input/ScrollManager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "core/dom/DOMNodeIds.h" 8 #include "core/dom/DOMNodeIds.h"
9 #include "core/events/GestureEvent.h" 9 #include "core/events/GestureEvent.h"
10 #include "core/frame/BrowserControls.h" 10 #include "core/frame/BrowserControls.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 bool reset_y = true; 60 bool reset_y = true;
61 page->GetOverscrollController().ResetAccumulated(reset_x, reset_y); 61 page->GetOverscrollController().ResetAccumulated(reset_x, reset_y);
62 } 62 }
63 } 63 }
64 64
65 void ScrollManager::StopAutoscroll() { 65 void ScrollManager::StopAutoscroll() {
66 if (AutoscrollController* controller = GetAutoscrollController()) 66 if (AutoscrollController* controller = GetAutoscrollController())
67 controller->StopAutoscroll(); 67 controller->StopAutoscroll();
68 } 68 }
69 69
70 void ScrollManager::StopMiddleClickAutoscroll() {
71 if (AutoscrollController* controller = GetAutoscrollController())
72 controller->StopMiddleClickAutoscroll(frame_);
73 }
74
70 bool ScrollManager::MiddleClickAutoscrollInProgress() const { 75 bool ScrollManager::MiddleClickAutoscrollInProgress() const {
71 return GetAutoscrollController() && 76 return GetAutoscrollController() &&
72 GetAutoscrollController()->MiddleClickAutoscrollInProgress(); 77 GetAutoscrollController()->MiddleClickAutoscrollInProgress();
73 } 78 }
74 79
75 AutoscrollController* ScrollManager::GetAutoscrollController() const { 80 AutoscrollController* ScrollManager::GetAutoscrollController() const {
76 if (Page* page = frame_->GetPage()) 81 if (Page* page = frame_->GetPage())
77 return &page->GetAutoscrollController(); 82 return &page->GetAutoscrollController();
78 return nullptr; 83 return nullptr;
79 } 84 }
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 &should_update_capture)) { 661 &should_update_capture)) {
657 if (should_update_capture) 662 if (should_update_capture)
658 scrollbar_handling_scroll_gesture_ = scrollbar; 663 scrollbar_handling_scroll_gesture_ = scrollbar;
659 return true; 664 return true;
660 } 665 }
661 } 666 }
662 return false; 667 return false;
663 } 668 }
664 669
665 } // namespace blink 670 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/ScrollManager.h ('k') | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698