OLD | NEW |
---|---|
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/dom/NodeComputedStyle.h" | 9 #include "core/dom/NodeComputedStyle.h" |
10 #include "core/events/GestureEvent.h" | 10 #include "core/events/GestureEvent.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 } | 80 } |
81 | 81 |
82 AutoscrollController* ScrollManager::GetAutoscrollController() const { | 82 AutoscrollController* ScrollManager::GetAutoscrollController() const { |
83 if (Page* page = frame_->GetPage()) | 83 if (Page* page = frame_->GetPage()) |
84 return &page->GetAutoscrollController(); | 84 return &page->GetAutoscrollController(); |
85 return nullptr; | 85 return nullptr; |
86 } | 86 } |
87 | 87 |
88 static bool CanPropagate(const ScrollState& scroll_state, | 88 static bool CanPropagate(const ScrollState& scroll_state, |
89 const Element& element) { | 89 const Element& element) { |
90 if (!element.GetLayoutBox()->GetScrollableArea()) | |
chrishtr
2017/08/25 20:55:06
Why did you need to change this?
sunyunjia
2017/08/25 21:19:44
This is a bug in the previous patch--the scroll-ch
| |
91 return true; | |
92 | |
90 return (scroll_state.deltaXHint() == 0 || | 93 return (scroll_state.deltaXHint() == 0 || |
91 element.GetComputedStyle()->ScrollBoundaryBehaviorX() == | 94 element.GetComputedStyle()->ScrollBoundaryBehaviorX() == |
92 EScrollBoundaryBehavior::kAuto) && | 95 EScrollBoundaryBehavior::kAuto) && |
93 (scroll_state.deltaYHint() == 0 || | 96 (scroll_state.deltaYHint() == 0 || |
94 element.GetComputedStyle()->ScrollBoundaryBehaviorY() == | 97 element.GetComputedStyle()->ScrollBoundaryBehaviorY() == |
95 EScrollBoundaryBehavior::kAuto); | 98 EScrollBoundaryBehavior::kAuto); |
96 } | 99 } |
97 | 100 |
98 void ScrollManager::RecomputeScrollChain(const Node& start_node, | 101 void ScrollManager::RecomputeScrollChain(const Node& start_node, |
99 const ScrollState& scroll_state, | 102 const ScrollState& scroll_state, |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
713 &should_update_capture)) { | 716 &should_update_capture)) { |
714 if (should_update_capture) | 717 if (should_update_capture) |
715 scrollbar_handling_scroll_gesture_ = scrollbar; | 718 scrollbar_handling_scroll_gesture_ = scrollbar; |
716 return true; | 719 return true; |
717 } | 720 } |
718 } | 721 } |
719 return false; | 722 return false; |
720 } | 723 } |
721 | 724 |
722 } // namespace blink | 725 } // namespace blink |
OLD | NEW |