diff --git a/cc/input/threaded_input_handler.cc b/cc/input/threaded_input_handler.cc index 3ff2adbd01ede3..cd33cfe948aad8 100644 --- a/cc/input/threaded_input_handler.cc +++ b/cc/input/threaded_input_handler.cc @@ -1842,7 +1842,6 @@ ScrollNode* ThreadedInputHandler::FindNodeToLatch(ScrollState* scroll_state, ui::ScrollInputType type) { ScrollTree& scroll_tree = GetScrollTree(); ScrollNode* scroll_node = nullptr; - ScrollNode* first_scrollable_node = nullptr; for (ScrollNode* cur_node = starting_node; cur_node; cur_node = scroll_tree.parent(cur_node)) { if (GetViewport().ShouldScroll(*cur_node)) { @@ -1856,11 +1855,10 @@ ScrollNode* ThreadedInputHandler::FindNodeToLatch(ScrollState* scroll_state, if (!cur_node->scrollable) continue; - if (!first_scrollable_node) { - first_scrollable_node = cur_node; - } - - if (CanConsumeDelta(*scroll_state, *cur_node)) { + // For UX reasons, autoscrolling should always latch to the top-most + // scroller, even if it can't scroll in the initial direction. + if (type == ui::ScrollInputType::kAutoscroll || + CanConsumeDelta(*scroll_state, *cur_node)) { scroll_node = cur_node; break; } @@ -1882,13 +1880,6 @@ ScrollNode* ThreadedInputHandler::FindNodeToLatch(ScrollState* scroll_state, } } - // If the root scroller can not consume delta in an autoscroll, latch on - // to the top most autoscrollable scroller. See https://crbug.com/969150 - if ((type == ui::ScrollInputType::kAutoscroll) && first_scrollable_node && - !CanConsumeDelta(*scroll_state, *scroll_node)) { - scroll_node = first_scrollable_node; - } - return scroll_node; } diff --git a/third_party/blink/renderer/core/input/event_handler.cc b/third_party/blink/renderer/core/input/event_handler.cc index d659acb14ed6ba..92990159fea2b1 100644 --- a/third_party/blink/renderer/core/input/event_handler.cc +++ b/third_party/blink/renderer/core/input/event_handler.cc @@ -299,10 +299,8 @@ void EventHandler::StartMiddleClickAutoscroll(LayoutObject* layout_object) { AutoscrollController* controller = scroll_manager_->GetAutoscrollController(); if (!controller) return; - LayoutBox* scrollable = LayoutBox::FindAutoscrollable( layout_object, /*is_middle_click_autoscroll*/ true); - controller->StartMiddleClickAutoscroll( layout_object->GetFrame(), scrollable, LastKnownMousePositionInRootFrame(), diff --git a/third_party/blink/renderer/core/input/scroll_manager.cc b/third_party/blink/renderer/core/input/scroll_manager.cc index 03f663a7b86d50..8fb4fb4f96c509 100644 --- a/third_party/blink/renderer/core/input/scroll_manager.cc +++ b/third_party/blink/renderer/core/input/scroll_manager.cc @@ -133,20 +133,8 @@ AutoscrollController* ScrollManager::GetAutoscrollController() const { return nullptr; } -ScrollPropagationDirection ScrollManager::ComputePropagationDirection( - const ScrollState& scroll_state) { - if (scroll_state.deltaXHint() == 0 && scroll_state.deltaYHint() != 0) - return ScrollPropagationDirection::kVertical; - if (scroll_state.deltaXHint() != 0 && scroll_state.deltaYHint() == 0) - return ScrollPropagationDirection::kHorizontal; - if (scroll_state.deltaXHint() != 0 && scroll_state.deltaYHint() != 0) - return ScrollPropagationDirection::kBoth; - return ScrollPropagationDirection::kNone; -} - -bool ScrollManager::CanPropagate(const LayoutBox* layout_box, - ScrollPropagationDirection direction) { - ScrollableArea* scrollable_area = layout_box->GetScrollableArea(); +static bool CanPropagate(const ScrollState& scroll_state, const Node& node) { + ScrollableArea* scrollable_area = node.GetLayoutBox()->GetScrollableArea(); if (!scrollable_area) return true; @@ -154,106 +142,54 @@ bool ScrollManager::CanPropagate(const LayoutBox* layout_box, !scrollable_area->UserInputScrollable(kVerticalScrollbar)) return true; - switch (direction) { - case ScrollPropagationDirection::kBoth: - return ((layout_box->StyleRef().OverscrollBehaviorX() == - EOverscrollBehavior::kAuto) && - (layout_box->StyleRef().OverscrollBehaviorY() == - EOverscrollBehavior::kAuto)); - case ScrollPropagationDirection::kVertical: - return layout_box->StyleRef().OverscrollBehaviorY() == - EOverscrollBehavior::kAuto; - case ScrollPropagationDirection::kHorizontal: - return layout_box->StyleRef().OverscrollBehaviorX() == - EOverscrollBehavior::kAuto; - case ScrollPropagationDirection::kNone: - return true; - default: - NOTREACHED(); - } + return (scroll_state.deltaXHint() == 0 || + node.GetComputedStyle()->OverscrollBehaviorX() == + EOverscrollBehavior::kAuto) && + (scroll_state.deltaYHint() == 0 || + node.GetComputedStyle()->OverscrollBehaviorY() == + EOverscrollBehavior::kAuto); } void ScrollManager::RecomputeScrollChain(const Node& start_node, const ScrollState& scroll_state, - Deque& scroll_chain, - bool is_autoscroll) { + Deque& scroll_chain) { DCHECK(scroll_chain.IsEmpty()); scroll_chain.clear(); DCHECK(start_node.GetLayoutObject()); + LayoutBox* cur_box = start_node.GetLayoutObject()->EnclosingBox(); - if (is_autoscroll) { - // Propagate the autoscroll along the layout object chain, and - // append only the first node which is able to consume the scroll delta. - // The scroll node is computed differently to regular scrolls in order to - // maintain consistency with the autoscroll controller. - LayoutBox* autoscrollable = LayoutBox::FindAutoscrollable( - start_node.GetLayoutObject(), is_autoscroll); - if (autoscrollable) { - Node* cur_node = autoscrollable->GetNode(); - LayoutObject* layout_object = cur_node->GetLayoutObject(); - while (layout_object && - !CanScroll(scroll_state, *cur_node, is_autoscroll)) { - ScrollPropagationDirection direction = - ComputePropagationDirection(scroll_state); - - if (!CanPropagate(cur_node->GetLayoutBox(), direction)) - break; - - if (!layout_object->Parent() && - layout_object->GetNode() == layout_object->GetDocument() && - layout_object->GetDocument().LocalOwner()) { - layout_object = - layout_object->GetDocument().LocalOwner()->GetLayoutObject(); - } else { - layout_object = layout_object->Parent(); - } - LayoutBox* new_autoscrollable = - LayoutBox::FindAutoscrollable(layout_object, is_autoscroll); - if (new_autoscrollable) - cur_node = new_autoscrollable->GetNode(); - } - scroll_chain.push_front(DOMNodeIds::IdForNode(cur_node)); - } - } else { - LayoutBox* cur_box = start_node.GetLayoutObject()->EnclosingBox(); + // Scrolling propagates along the containing block chain and ends at the + // RootScroller node. The RootScroller node will have a custom applyScroll + // callback that performs scrolling as well as associated "root" actions like + // browser control movement and overscroll glow. + while (cur_box) { + Node* cur_node = cur_box->GetNode(); - // Scrolling propagates along the containing block chain and ends at the - // RootScroller node. The RootScroller node will have a custom applyScroll - // callback that performs scrolling as well as associated "root" actions - // like browser control movement and overscroll glow. - while (cur_box) { - Node* cur_node = cur_box->GetNode(); + if (cur_node) { + if (CanScroll(scroll_state, *cur_node)) + scroll_chain.push_front(DOMNodeIds::IdForNode(cur_node)); - if (cur_node) { - if (CanScroll(scroll_state, *cur_node, /* for_autoscroll */ false)) - scroll_chain.push_front(DOMNodeIds::IdForNode(cur_node)); + if (cur_node->IsEffectiveRootScroller()) + break; - if (cur_node->IsEffectiveRootScroller()) - break; - - ScrollPropagationDirection direction = - ComputePropagationDirection(scroll_state); - if (!CanPropagate(cur_node->GetLayoutBox(), direction)) { - // We should add the first node with non-auto overscroll-behavior to - // the scroll chain regardlessly, as it's the only node we can latch - // to. - if (scroll_chain.empty() || - scroll_chain.front() != DOMNodeIds::IdForNode(cur_node)) { - scroll_chain.push_front(DOMNodeIds::IdForNode(cur_node)); - } - break; + if (!CanPropagate(scroll_state, *cur_node)) { + // We should add the first node with non-auto overscroll-behavior to + // the scroll chain regardlessly, as it's the only node we can latch to. + if (scroll_chain.empty() || + scroll_chain.front() != DOMNodeIds::IdForNode(cur_node)) { + scroll_chain.push_front(DOMNodeIds::IdForNode(cur_node)); } + break; } - - cur_box = cur_box->ContainingBlock(); } + + cur_box = cur_box->ContainingBlock(); } } bool ScrollManager::CanScroll(const ScrollState& scroll_state, - const Node& current_node, - bool for_autoscroll) { + const Node& current_node) { LayoutBox* scrolling_box = current_node.GetLayoutBox(); if (auto* element = DynamicTo(current_node)) scrolling_box = element->GetLayoutBoxForScrolling(); @@ -262,9 +198,8 @@ bool ScrollManager::CanScroll(const ScrollState& scroll_state, // We need to always add the global root scroller even if it isn't scrollable // since we can always pinch-zoom and scroll as well as for overscroll - // effects. If autoscrolling, ignore this condition because we latch on - // to the deepest autoscrollable node. - if (scrolling_box->IsGlobalRootScroller() && !for_autoscroll) + // effects. + if (scrolling_box->IsGlobalRootScroller()) return true; // If this is the main LayoutView, and it's not the root scroller, that means @@ -272,10 +207,9 @@ bool ScrollManager::CanScroll(const ScrollState& scroll_state, // scroll the LayoutView should cause panning of the visual viewport as well // so ensure it gets added to the scroll chain. See LTHI::ApplyScroll for the // equivalent behavior in CC. Node::NativeApplyScroll contains a special - // handler for this case. If autoscrolling, ignore this condition because we - // latch on to the deepest autoscrollable node. + // handler for this case. if (IsA(scrolling_box) && - current_node.GetDocument().GetFrame()->IsMainFrame() && !for_autoscroll) { + current_node.GetDocument().GetFrame()->IsMainFrame()) { return true; } @@ -339,8 +273,7 @@ bool ScrollManager::LogicalScroll(mojom::blink::ScrollDirection direction, std::make_unique(); auto* scroll_state = MakeGarbageCollected(std::move(scroll_state_data)); - RecomputeScrollChain(*node, *scroll_state, scroll_chain, - /* is_autoscroll */ false); + RecomputeScrollChain(*node, *scroll_state, scroll_chain); while (!scroll_chain.IsEmpty()) { Node* scroll_chain_node = DOMNodeIds::NodeForId(scroll_chain.TakeLast()); @@ -564,11 +497,21 @@ WebInputEventResult ScrollManager::HandleGestureScrollBegin( delta_consumed_for_scroll_sequence_; auto* scroll_state = MakeGarbageCollected(std::move(scroll_state_data)); - - RecomputeScrollChain( - *scroll_gesture_handling_node_.Get(), *scroll_state, - current_scroll_chain_, - gesture_event.SourceDevice() == WebGestureDevice::kSyntheticAutoscroll); + // For middle click autoscroll, only scrollable area for + // |scroll_gesture_handling_node_| should receive and handle all scroll + // events. It should not bubble up to the ancestor. + if (gesture_event.SourceDevice() == WebGestureDevice::kSyntheticAutoscroll) { + LayoutBox* scrollable = LayoutBox::FindAutoscrollable( + scroll_gesture_handling_node_->GetLayoutObject(), + /*is_middle_click_autoscroll*/ true); + if (scrollable) { + Node* scrollable_node = scrollable->GetNode(); + current_scroll_chain_.push_back(DOMNodeIds::IdForNode(scrollable_node)); + } + } else { + RecomputeScrollChain(*scroll_gesture_handling_node_.Get(), *scroll_state, + current_scroll_chain_); + } TRACE_EVENT_INSTANT1("input", "Computed Scroll Chain", TRACE_EVENT_SCOPE_THREAD, "length", diff --git a/third_party/blink/renderer/core/input/scroll_manager.h b/third_party/blink/renderer/core/input/scroll_manager.h index 7ea7463b17bdbe..dd372e742e7535 100644 --- a/third_party/blink/renderer/core/input/scroll_manager.h +++ b/third_party/blink/renderer/core/input/scroll_manager.h @@ -34,10 +34,6 @@ class Scrollbar; class ScrollState; class WebGestureEvent; -// Scroll directions used to check whether propagation is possible in a given -// direction. Used in CanPropagate. -enum class ScrollPropagationDirection { kHorizontal, kVertical, kBoth, kNone }; - // This class takes care of scrolling and resizing and the related states. The // user action that causes scrolling or resizing is determined in other *Manager // classes and they call into this class for doing the work. @@ -112,13 +108,6 @@ class CORE_EXPORT ScrollManager : public GarbageCollected, void AnimateSnapFling(base::TimeTicks monotonic_time); - // Determines whether the scroll-chain should be propagated upwards given a - // scroll direction. - static bool CanPropagate(const LayoutBox* layout_box, - ScrollPropagationDirection direction); - static ScrollPropagationDirection ComputePropagationDirection( - const ScrollState&); - private: Node* NodeTargetForScrollableAreaElementId( CompositorElementId scrollable_area_element_id) const; @@ -144,11 +133,8 @@ class CORE_EXPORT ScrollManager : public GarbageCollected, void RecomputeScrollChain(const Node& start_node, const ScrollState&, - Deque& scroll_chain, - bool is_autoscroll); - bool CanScroll(const ScrollState&, - const Node& current_node, - bool for_autoscroll); + Deque& scroll_chain); + bool CanScroll(const ScrollState&, const Node& current_node); // scroller_size is set only when scrolling non root scroller. void ComputeScrollRelatedMetrics( diff --git a/third_party/blink/renderer/core/page/autoscroll_controller.cc b/third_party/blink/renderer/core/page/autoscroll_controller.cc index 9e4206cc450aaa..84e4f01a35c92f 100644 --- a/third_party/blink/renderer/core/page/autoscroll_controller.cc +++ b/third_party/blink/renderer/core/page/autoscroll_controller.cc @@ -29,13 +29,11 @@ #include "third_party/blink/renderer/core/page/autoscroll_controller.h" -#include "third_party/blink/renderer/core/dom/node_computed_style.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h" #include "third_party/blink/renderer/core/frame/visual_viewport.h" #include "third_party/blink/renderer/core/html/html_frame_owner_element.h" #include "third_party/blink/renderer/core/input/event_handler.h" -#include "third_party/blink/renderer/core/input/scroll_manager.h" #include "third_party/blink/renderer/core/layout/hit_test_result.h" #include "third_party/blink/renderer/core/layout/layout_box.h" #include "third_party/blink/renderer/core/page/chrome_client.h" @@ -252,16 +250,7 @@ void AutoscrollController::HandleMouseMoveForMiddleClickAutoscroll( if (!MiddleClickAutoscrollInProgress()) return; - bool horizontal_autoscroll_possible = - horizontal_autoscroll_layout_box_ && - horizontal_autoscroll_layout_box_->GetNode(); - bool vertical_autoscroll_possible = - vertical_autoscroll_layout_box_ && - vertical_autoscroll_layout_box_->GetNode(); - if (horizontal_autoscroll_possible && - !horizontal_autoscroll_layout_box_->CanBeScrolledAndHasScrollableArea() && - vertical_autoscroll_possible && - !vertical_autoscroll_layout_box_->CanBeScrolledAndHasScrollableArea()) { + if (!autoscroll_layout_object_->CanBeScrolledAndHasScrollableArea()) { StopMiddleClickAutoscroll(frame); return; } @@ -288,17 +277,11 @@ void AutoscrollController::HandleMouseMoveForMiddleClickAutoscroll( pow(fabs(distance.Height()), kExponent) * kMultiplier * y_signum); bool can_scroll_vertically = - vertical_autoscroll_possible - ? CanScrollDirection(vertical_autoscroll_layout_box_, - frame->GetPage(), - ScrollOrientation::kVerticalScroll) - : false; + CanScrollDirection(autoscroll_layout_object_, frame->GetPage(), + ScrollOrientation::kVerticalScroll); bool can_scroll_horizontally = - horizontal_autoscroll_possible - ? CanScrollDirection(horizontal_autoscroll_layout_box_, - frame->GetPage(), - ScrollOrientation::kHorizontalScroll) - : false; + CanScrollDirection(autoscroll_layout_object_, frame->GetPage(), + ScrollOrientation::kHorizontalScroll); if (velocity != last_velocity_) { last_velocity_ = velocity; @@ -355,68 +338,17 @@ void AutoscrollController::StartMiddleClickAutoscroll( if (autoscroll_type_ != kNoAutoscroll) return; + autoscroll_layout_object_ = scrollable; autoscroll_type_ = kAutoscrollForMiddleClick; middle_click_mode_ = kMiddleClickInitial; middle_click_autoscroll_start_pos_global_ = position_global; - bool can_scroll_vertically = false; - bool can_scroll_horizontally = false; - - // Scroll propagation can be prevented in either direction independently. - // We check whether autoscroll can be prevented in either direction after - // checking whether the layout box can be scrolled. If propagation is not - // allowed, we do not perform further checks for whether parents can be - // scrolled in that direction. - bool can_propagate_vertically = true; - bool can_propagate_horizontally = true; - - LayoutObject* layout_object = scrollable->GetNode()->GetLayoutObject(); - - while (layout_object && !(can_scroll_horizontally && can_scroll_vertically)) { - LayoutBox* layout_box; - - if (layout_object->IsBox()) { - layout_box = To(layout_object); - // Check whether the layout box can be scrolled and has horizontal - // scrollable area. - if (can_propagate_vertically && - CanScrollDirection(layout_box, frame->GetPage(), - ScrollOrientation::kVerticalScroll) && - !vertical_autoscroll_layout_box_) { - vertical_autoscroll_layout_box_ = layout_box; - can_scroll_vertically = true; - } - // Check whether the layout box can be scrolled and has vertical - // scrollable area. - if (can_propagate_horizontally && - CanScrollDirection(layout_box, frame->GetPage(), - ScrollOrientation::kHorizontalScroll) && - !horizontal_autoscroll_layout_box_) { - horizontal_autoscroll_layout_box_ = layout_box; - can_scroll_horizontally = true; - } - } - - can_propagate_vertically = ScrollManager::CanPropagate( - layout_box, ScrollPropagationDirection::kVertical); - can_propagate_horizontally = ScrollManager::CanPropagate( - layout_box, ScrollPropagationDirection::kHorizontal); - - // Exit loop if we can't propagate to the parent in any direction or if - // layout boxes have been found for both directions. - if ((!can_propagate_vertically && !can_propagate_horizontally) || - (can_scroll_horizontally && can_scroll_vertically)) - break; - - if (!layout_object->Parent() && - layout_object->GetNode() == layout_object->GetDocument() && - layout_object->GetDocument().LocalOwner()) { - layout_object = - layout_object->GetDocument().LocalOwner()->GetLayoutObject(); - } else { - layout_object = layout_object->Parent(); - } - } + bool can_scroll_vertically = + CanScrollDirection(autoscroll_layout_object_, frame->GetPage(), + ScrollOrientation::kVerticalScroll); + bool can_scroll_horizontally = + CanScrollDirection(autoscroll_layout_object_, frame->GetPage(), + ScrollOrientation::kHorizontalScroll); UseCounter::Count(frame->GetDocument(), WebFeature::kMiddleClickAutoscrollStart); diff --git a/third_party/blink/renderer/core/page/autoscroll_controller.h b/third_party/blink/renderer/core/page/autoscroll_controller.h index 0b0a7118604989..7e04c417625bb4 100644 --- a/third_party/blink/renderer/core/page/autoscroll_controller.h +++ b/third_party/blink/renderer/core/page/autoscroll_controller.h @@ -84,7 +84,7 @@ class CORE_EXPORT AutoscrollController final // Middle-click autoscroll. void StartMiddleClickAutoscroll(LocalFrame*, - LayoutBox* scrollable, + LayoutBox*, const FloatPoint& position, const FloatPoint& position_global); void HandleMouseMoveForMiddleClickAutoscroll( @@ -102,17 +102,15 @@ class CORE_EXPORT AutoscrollController final Member page_; AutoscrollType autoscroll_type_ = kNoAutoscroll; + LayoutBox* autoscroll_layout_object_ = nullptr; // Selection and drag-and-drop autoscroll. void ScheduleMainThreadAnimation(); - LayoutBox* autoscroll_layout_object_ = nullptr; LayoutBox* pressed_layout_object_ = nullptr; PhysicalOffset drag_and_drop_autoscroll_reference_position_; base::TimeTicks drag_and_drop_autoscroll_start_time_; // Middle-click autoscroll. - LayoutBox* horizontal_autoscroll_layout_box_ = nullptr; - LayoutBox* vertical_autoscroll_layout_box_ = nullptr; FloatPoint middle_click_autoscroll_start_pos_global_; gfx::Vector2dF last_velocity_; MiddleClickMode middle_click_mode_ = kMiddleClickInitial; @@ -122,9 +120,6 @@ class CORE_EXPORT AutoscrollController final FRIEND_TEST_ALL_PREFIXES(AutoscrollControllerTest, ContinueAutoscrollAfterMouseLeaveEvent); FRIEND_TEST_ALL_PREFIXES(AutoscrollControllerTest, StopAutoscrollOnResize); - FRIEND_TEST_ALL_PREFIXES(AutoscrollControllerTest, AutoscrollIsNotPropagated); - FRIEND_TEST_ALL_PREFIXES(AutoscrollControllerTest, - AutoscrollIsPropagatedInYDirection); }; } // namespace blink diff --git a/third_party/blink/renderer/core/page/autoscroll_controller_test.cc b/third_party/blink/renderer/core/page/autoscroll_controller_test.cc index ddd6816847b865..d24da0e3c3607d 100644 --- a/third_party/blink/renderer/core/page/autoscroll_controller_test.cc +++ b/third_party/blink/renderer/core/page/autoscroll_controller_test.cc @@ -182,102 +182,4 @@ TEST_F(AutoscrollControllerTest, StopAutoscrollOnResize) { EXPECT_TRUE(controller.IsAutoscrolling()); } -// Ensure that middle click autoscroll is not propagated in a direction when -// propagation is not allowed. -TEST_F(AutoscrollControllerTest, AutoscrollIsNotPropagated) { - SimRequest request("https://example.com/test.html", "text/html"); - LoadURL("https://example.com/test.html"); - request.Complete(R"HTML( - - - - - - -
-
-
- - - )HTML"); - - Compositor().BeginFrame(); - - AutoscrollController& controller = GetAutoscrollController(); - - EXPECT_FALSE(controller.IsAutoscrolling()); - - LocalFrame* frame = GetDocument().GetFrame(); - LayoutBox* scrollable = - GetDocument().getElementById("scrollable")->GetLayoutBox(); - - controller.StartMiddleClickAutoscroll( - frame, scrollable, FloatPoint(15.0, 15.0), FloatPoint(15.0, 15.0)); - - EXPECT_TRUE(controller.IsAutoscrolling()); - EXPECT_TRUE(controller.horizontal_autoscroll_layout_box_); - EXPECT_FALSE(controller.vertical_autoscroll_layout_box_); -} - -// Ensure that middle click autoscroll is propagated in a direction when -// overscroll-behavior is set to auto for a that direction. -TEST_F(AutoscrollControllerTest, AutoscrollIsPropagatedInYDirection) { - SimRequest request("https://example.com/test.html", "text/html"); - LoadURL("https://example.com/test.html"); - request.Complete(R"HTML( - - - - - - -
-
-
- - - )HTML"); - - Compositor().BeginFrame(); - - AutoscrollController& controller = GetAutoscrollController(); - - EXPECT_FALSE(controller.IsAutoscrolling()); - - LocalFrame* frame = GetDocument().GetFrame(); - LayoutBox* scrollable = - GetDocument().getElementById("scrollable")->GetLayoutBox(); - - controller.StartMiddleClickAutoscroll( - frame, scrollable, FloatPoint(15.0, 15.0), FloatPoint(15.0, 15.0)); - - EXPECT_TRUE(controller.IsAutoscrolling()); - EXPECT_TRUE(controller.vertical_autoscroll_layout_box_); - EXPECT_TRUE(controller.horizontal_autoscroll_layout_box_); -} - } // namespace blink diff --git a/third_party/blink/web_tests/fast/scroll-behavior/middleclick-autoscroll-nested-elements.html b/third_party/blink/web_tests/fast/scroll-behavior/middleclick-autoscroll-nested-elements.html deleted file mode 100644 index aa82bb5458cc38..00000000000000 --- a/third_party/blink/web_tests/fast/scroll-behavior/middleclick-autoscroll-nested-elements.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - -
-
-
- - \ No newline at end of file diff --git a/third_party/blink/web_tests/fast/scrolling/autoscroll-iframe-no-scrolling.html b/third_party/blink/web_tests/fast/scrolling/autoscroll-iframe-no-scrolling.html index 1d68352ccdb915..7e76fbf6915a0b 100644 --- a/third_party/blink/web_tests/fast/scrolling/autoscroll-iframe-no-scrolling.html +++ b/third_party/blink/web_tests/fast/scrolling/autoscroll-iframe-no-scrolling.html @@ -86,14 +86,15 @@ // Autoscroll over the inner scroller. await autoScroll(startX, startY, endX, endY); await waitForAnimationEndTimeBased( () => { return window.scrollY; } ); - assert_equals(frames[0].window.scrollY, 0, "Iframe frame should not scroll"); + assert_equals(window.scrollY, 0, "Main frame should not scroll"); // Autoscroll over the iframe. startX = rect.right - 20; endX = startX; await autoScroll(startX, startY, endX, endY); await waitForAnimationEndTimeBased( () => { return window.scrollY; } ); - assert_true(window.scrollY > 0, "Main frame should not scroll"); + assert_equals(window.scrollY, 0, "Main frame should not scroll"); + assert_equals(frames[0].window.scrollY, 0, "IFrame must NOT scroll."); }); }); diff --git a/third_party/blink/web_tests/fast/scrolling/autoscroll-latch-clicked-node-if-parent-unscrollable.html b/third_party/blink/web_tests/fast/scrolling/autoscroll-latch-clicked-node-if-parent-unscrollable.html deleted file mode 100644 index 2e5a335bf74517..00000000000000 --- a/third_party/blink/web_tests/fast/scrolling/autoscroll-latch-clicked-node-if-parent-unscrollable.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - -
    -
  1. Middle-click inside the <div> with the red border below to activate autoscroll.
  2. -
  3. First, move the mouse such that you scroll the <div> in unavailable scroll direction and then in scrollable direction.
  4. -
  5. If bug repros, it won't scroll in available direction.
  6. -
-
-
-
- - \ No newline at end of file