Commit 1a737994 authored by Alexey Baskakov's avatar Alexey Baskakov Committed by Commit Bot

Revert "Reland "Keep scroll by keyboard after child focused node is removed""

This reverts commit 22e874da.

Reason for revert: WebKit Linux Leak failures
https://crbug.com/968811

Original change's description:
> Reland "Keep scroll by keyboard after child focused node is removed"
>
> This CL re-lands
> https://chromium-review.googlesource.com/c/chromium/src/+/1611620,
> which is reverted because the test is flaky on Chrome Dev on upstream
> WPT. We should land the code first, once the code reaches to Chrome
> Dev, I will enable the test.
>
> Bug: 493078
> Change-Id: I34f23e4fb47b8d781a8459471fd69740da25792e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1632795
> Reviewed-by: David Bokan <bokan@chromium.org>
> Commit-Queue: Lan Wei <lanwei@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#664838}

TBR=bokan@chromium.org,lanwei@chromium.org

Change-Id: Id7b327b4f1cacc38ff7b61982d9af8b3b33b90d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1638198Reviewed-by: default avatarAlexey Baskakov <loyso@chromium.org>
Reviewed-by: default avatarHiroshige Hayashizaki <hiroshige@chromium.org>
Commit-Queue: Alexey Baskakov <loyso@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665043}
parent 1cfb6494
...@@ -94,7 +94,6 @@ void ScrollManager::Trace(blink::Visitor* visitor) { ...@@ -94,7 +94,6 @@ void ScrollManager::Trace(blink::Visitor* visitor) {
visitor->Trace(previous_gesture_scrolled_node_); visitor->Trace(previous_gesture_scrolled_node_);
visitor->Trace(scrollbar_handling_scroll_gesture_); visitor->Trace(scrollbar_handling_scroll_gesture_);
visitor->Trace(resize_scrollable_area_); visitor->Trace(resize_scrollable_area_);
visitor->Trace(last_logical_scrolled_node_);
} }
void ScrollManager::ClearGestureScrollState() { void ScrollManager::ClearGestureScrollState() {
...@@ -237,11 +236,6 @@ bool ScrollManager::LogicalScroll(ScrollDirection direction, ...@@ -237,11 +236,6 @@ bool ScrollManager::LogicalScroll(ScrollDirection direction,
if (!node) if (!node)
node = mouse_press_node; node = mouse_press_node;
if ((!node || !node->GetLayoutObject()) &&
(last_logical_scrolled_node_ &&
last_logical_scrolled_node_->GetLayoutObject()))
node = last_logical_scrolled_node_;
if ((!node || !node->GetLayoutObject()) && frame_->View() && if ((!node || !node->GetLayoutObject()) && frame_->View() &&
frame_->View()->GetLayoutView()) frame_->View()->GetLayoutView())
node = frame_->View()->GetLayoutView()->GetNode(); node = frame_->View()->GetLayoutView()->GetNode();
...@@ -325,10 +319,8 @@ bool ScrollManager::LogicalScroll(ScrollDirection direction, ...@@ -325,10 +319,8 @@ bool ScrollManager::LogicalScroll(ScrollDirection direction,
ScrollResult result = scrollable_area->UserScroll( ScrollResult result = scrollable_area->UserScroll(
granularity, ToScrollDelta(physical_direction, 1)); granularity, ToScrollDelta(physical_direction, 1));
if (result.DidScroll()) { if (result.DidScroll())
last_logical_scrolled_node_ = scroll_chain_node;
return true; return true;
}
} }
return false; return false;
......
...@@ -153,8 +153,6 @@ class CORE_EXPORT ScrollManager ...@@ -153,8 +153,6 @@ class CORE_EXPORT ScrollManager
Member<Node> scroll_gesture_handling_node_; Member<Node> scroll_gesture_handling_node_;
Member<Node> last_logical_scrolled_node_;
bool last_gesture_scroll_over_embedded_content_view_; bool last_gesture_scroll_over_embedded_content_view_;
// The most recent Node to scroll natively during this scroll // The most recent Node to scroll natively during this scroll
......
...@@ -2788,7 +2788,6 @@ crbug.com/893490 [ Mac ] external/wpt/css/css-text/white-space/control-chars-09F ...@@ -2788,7 +2788,6 @@ crbug.com/893490 [ Mac ] external/wpt/css/css-text/white-space/control-chars-09F
# needs implementation of test_driver_internal.action_sequence # needs implementation of test_driver_internal.action_sequence
crbug.com/893480 external/wpt/infrastructure/testdriver/actions/elementTiming.html [ Timeout ] crbug.com/893480 external/wpt/infrastructure/testdriver/actions/elementTiming.html [ Timeout ]
crbug.com/893480 external/wpt/infrastructure/testdriver/actions/multiDevice.html [ Failure Timeout ] crbug.com/893480 external/wpt/infrastructure/testdriver/actions/multiDevice.html [ Failure Timeout ]
crbug.com/893480 external/wpt/dom/nodes/keyboard-scroll-removed-node.html [ Failure Timeout ]
crbug.com/893480 external/wpt/pointerevents/pointerevent_touch-action-keyboard.html [ Failure Timeout ] crbug.com/893480 external/wpt/pointerevents/pointerevent_touch-action-keyboard.html [ Failure Timeout ]
# Hit a DCHECK # Hit a DCHECK
......
[scrollchain.html]
expected:
if product == "chrome": FAIL
if product == "safari": ERROR
<!DOCTYPE html>
<meta charset="utf-8">
<title>Keyboard scroll removed node</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<style>
ul {
width: 30vw;
height: 40vh;
overflow-y: scroll;
}
li {
width: 95%;
height: 10vh;
border: 1px solid black;
}
#target {
background-color: grey;
}
</style>
</head>
<body>
<ul id="list">
<li>ITEM 1</li>
<li>ITEM 2</li>
<li id="target">TARGET ITEM 3</li>
<li>ITEM 4</li>
<li>ITEM 5</li>
<li>ITEM 6</li>
<li>ITEM 7</li>
</ul>
</body>
<script>
async_test(t => {
let listElement = document.getElementById("list");
let targetElement = document.getElementById("target");
let firstScrollTop, secondScrollTop;
let ArrowDownKey = "\uE015";
let firstActions = new test_driver.Actions()
.pointerMove(10, 10, { origin: targetElement })
.pointerDown()
.pointerUp()
.addTick()
.keyDown(ArrowDownKey)
.keyUp(ArrowDownKey)
.send()
.then(() => {
firstScrollTop = listElement.scrollTop;
targetElement.remove();
let secondAction = new test_driver.Actions()
.keyDown(ArrowDownKey)
.keyUp(ArrowDownKey)
.send()
.then(() => {
secondScrollTop = listElement.scrollTop;
assert_greater_than(secondScrollTop, firstScrollTop);
t.done();
})
.catch(e => t.step_func(() => assert_unreached("Second actions sequence failed " + e)));
})
.catch(e => t.step_func(() => assert_unreached("First actions sequence failed " + e)));
}, "Keyboard scrolls, after clicked element is removed, continue to affect previous scroller");
</script>
</html>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment