Commit f0842dc1 authored by Sahel Sharify's avatar Sahel Sharify Committed by Commit Bot

Reland "Send GSB before switching to mainthread scrolling in smooth scroll path."

This reverts commit 0a6d8978.

Reason for revert: touchpad-scroll-impl-to-main.html is a flaky test
that I changed it in the original cl and removed the tests expectations to see if the flake is fixed or not. Changing the test expectations caused unexpected test failure. In this reland I left the test expectations for touchpad-scroll-impl-to-main.html unchanged.

Original change's description:
> Revert "Send GSB before switching to mainthread scrolling in smooth scroll path."
>
> This reverts commit 5d5a062f.
>
> Reason for revert: added a failing test https://ci.chromium.org/buildbot/chromium.webkit/WebKit%20Win10/32246 see issue 822386
>
> bug: 822386
>
> Original change's description:
> > Send GSB before switching to mainthread scrolling in smooth scroll path.
> >
> > This cl is the equivalent of https://codereview.chromium.org/2854683002 fix for smooth scrolling
> > path,if the compositor handles the GSB and during the scrolling we have to switch to main thread
> > since the compositor cannot handle a GSU a GSB must be sent to the main thread since the original
> > GSB was handled on the compositor rather than being sent to the main thread.
> >
> > touchpad-scroll-impl-to-main.html is the test that forces switch from compositor thread to main
> > thread in the middle of scrolling. It used to get executed with --disable-smooth-scrolling
> > in this cl I've moved the test to a new virtual test suite that has default scroll animation
> > value.
> >
> > I have removed the test expectations since I have changed the test and this might fix the flake.
> >
> > subpixel-accumulation.html needs scroll animation to be disabled and that's why I had to move it to
> > a new test suite.
> >
> > Bug: 820979, 708499, 757165, 800840
> > Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> > Change-Id: I21b1f4285897d74559f6827e6a232f007dc897b0
> > Reviewed-on: https://chromium-review.googlesource.com/961264
> > Commit-Queue: Sahel Sharifymoghaddam <sahel@chromium.org>
> > Reviewed-by: Timothy Dresser <tdresser@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#543425}
>
> TBR=tdresser@chromium.org,sahel@chromium.org
>
> Change-Id: I3c5253d96d011c9723063effac91c969ee352305
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 820979, 708499, 757165, 800840
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Reviewed-on: https://chromium-review.googlesource.com/963388
> Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
> Commit-Queue: Caleb Rouleau <crouleau@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#543467}

TBR=tdresser@chromium.org,crouleau@chromium.org

Change-Id: I460ff89a12c94772564c77418f2c1e58c72314a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 820979, 708499, 757165, 800840
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/964809
Commit-Queue: Sahel Sharifymoghaddam <sahel@chromium.org>
Reviewed-by: default avatarSahel Sharifymoghaddam <sahel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543498}
parent edcb9adc
......@@ -2705,7 +2705,7 @@ crbug.com/749738 [ Win7 Debug ] http/tests/devtools/editor/text-editor-word-jump
crbug.com/749738 [ Win7 Debug ] http/tests/devtools/console/console-format-es6-2.js [ Timeout ]
# Sheriff failure 2017-08-07
crbug.com/708499 [ Linux ] virtual/wheelscrolllatching/fast/compositor-wheel-scroll-latching/touchpad-scroll-impl-to-main.html [ Failure Pass ]
crbug.com/708499 [ Linux ] virtual/wheelscrolllatching/fast/compositor-wheel-scroll-latching/animated-scroll/touchpad-scroll-impl-to-main.html [ Failure Pass ]
# Sheriff failure 2017-08-29
crbug.com/727252 [ Win7 ] external/wpt/media-source/mediasource-endofstream.html [ Pass Timeout ]
......@@ -2890,7 +2890,7 @@ crbug.com/757165 [ Win ] paint/invalidation/scroll/scrollbar-damage-and-full-vie
crbug.com/757165 [ Win ] virtual/gpu/fast/canvas/canvas-filter-modified-save-restore.html [ Skip ]
crbug.com/757165 [ Win ] virtual/gpu/fast/canvas/canvas-filter-modified.html [ Skip ]
crbug.com/757165 [ Win ] virtual/threaded/animations/svg/animated-filter-svg-element.html [ Skip ]
crbug.com/757165 [ Win ] virtual/wheelscrolllatching/fast/compositor-wheel-scroll-latching/touchpad-scroll-impl-to-main.html [ Skip ]
crbug.com/757165 [ Win ] virtual/wheelscrolllatching/fast/compositor-wheel-scroll-latching/animated-scroll/touchpad-scroll-impl-to-main.html [ Skip ]
crbug.com/757165 [ Win ] virtual/gpu/fast/canvas/canvas-blending-clipping.html [ Skip ]
crbug.com/757165 [ Win ] virtual/gpu/fast/canvas/canvas-blending-color-over-color.html [ Skip ]
crbug.com/757165 [ Win ] virtual/gpu/fast/canvas/canvas-blending-color-over-gradient.html [ Skip ]
......@@ -3191,7 +3191,7 @@ crbug.com/799814 [ Android ] fast/beacon/beacon-basic.html [ Pass Failure ]
crbug.com/800078 [ Win7 ] http/tests/devtools/console/console-link-to-snippet.js [ Pass Failure ]
# This test is flaking (failing, crashing) on mac_chromium_rel_ng.
crbug.com/800840 [ Mac ] virtual/wheelscrolllatching/fast/compositor-wheel-scroll-latching/touchpad-scroll-impl-to-main.html [ Skip ]
crbug.com/800840 [ Mac ] virtual/wheelscrolllatching/fast/compositor-wheel-scroll-latching/animated-scroll/touchpad-scroll-impl-to-main.html [ Skip ]
# Sheriff failures 2018-01-19
# This test is failing regularly on Win 7 (dgb), WebKit Mac10.11 (dgb),
......
......@@ -1061,7 +1061,7 @@ crbug.com/778875 virtual/threaded/fast/animationworklet/animation-worklet-scroll
crbug.com/692310 virtual/threaded/animations/composited-animations-rotate-zero-degrees.html [ Pass Failure Timeout ]
# This test uses internal call to initiate smooth scrolling on impl-thread.
crbug.com/667946 fast/compositor-wheel-scroll-latching/touchpad-scroll-impl-to-main.html [ Failure ]
crbug.com/667946 fast/compositor-wheel-scroll-latching/animated-scroll/touchpad-scroll-impl-to-main.html [ Failure ]
# virtual/threaded variants of sub-directories and tests already skipped or marked as failing above.
......
......@@ -2764,7 +2764,7 @@ crbug.com/749738 [ Win7 Debug ] http/tests/devtools/editor/text-editor-word-jump
crbug.com/626703 [ Win7 Release ] external/wpt/html/semantics/tabular-data/processing-model-1/span-limits.html [ Timeout ]
# Sheriff failure 2017-08-07
crbug.com/708499 [ Linux ] virtual/wheelscrolllatching/fast/compositor-wheel-scroll-latching/touchpad-scroll-impl-to-main.html [ Failure Pass ]
crbug.com/708499 [ Linux ] virtual/wheelscrolllatching/fast/compositor-wheel-scroll-latching/animated-scroll/touchpad-scroll-impl-to-main.html [ Failure Pass ]
crbug.com/731018 [ Mac ] sensor/accelerometer.html [ Failure Pass Crash ]
crbug.com/731018 [ Mac ] sensor/ambient-light-sensor.html [ Failure Pass Crash ]
......@@ -2947,7 +2947,7 @@ crbug.com/757165 [ Win ] paint/invalidation/scroll/scrollbar-damage-and-full-vie
crbug.com/757165 [ Win ] virtual/gpu/fast/canvas/canvas-filter-modified-save-restore.html [ Skip ]
crbug.com/757165 [ Win ] virtual/gpu/fast/canvas/canvas-filter-modified.html [ Skip ]
crbug.com/757165 [ Win ] virtual/threaded/animations/svg/animated-filter-svg-element.html [ Skip ]
crbug.com/757165 [ Win ] virtual/wheelscrolllatching/fast/compositor-wheel-scroll-latching/touchpad-scroll-impl-to-main.html [ Skip ]
crbug.com/757165 [ Win ] virtual/wheelscrolllatching/fast/compositor-wheel-scroll-latching/animated-scroll/touchpad-scroll-impl-to-main.html [ Skip ]
crbug.com/757165 [ Win ] virtual/gpu/fast/canvas/canvas-blending-clipping.html [ Skip ]
crbug.com/757165 [ Win ] virtual/gpu/fast/canvas/canvas-blending-color-over-color.html [ Skip ]
crbug.com/757165 [ Win ] virtual/gpu/fast/canvas/canvas-blending-color-over-gradient.html [ Skip ]
......@@ -3247,7 +3247,7 @@ crbug.com/804682 [ Mac ] external/wpt/service-workers/service-worker/navigation-
crbug.com/799137 [ Mac ] virtual/modern-media-controls/media/controls/modern/doubletap-to-jump-backwards-at-start.html [ Pass Timeout ]
# This test is flaking (failing, crashing) on mac_chromium_rel_ng.
crbug.com/800840 [ Mac ] virtual/wheelscrolllatching/fast/compositor-wheel-scroll-latching/touchpad-scroll-impl-to-main.html [ Skip ]
crbug.com/800840 [ Mac ] virtual/wheelscrolllatching/fast/compositor-wheel-scroll-latching/animated-scroll/touchpad-scroll-impl-to-main.html [ Skip ]
# Sheriff failures 2018-01-23
# Flaking on linux_chromium_rel_ng
......
......@@ -319,7 +319,13 @@
},
{
"prefix": "wheelscrolllatching",
"base": "fast/compositor-wheel-scroll-latching",
"base": "fast/compositor-wheel-scroll-latching/animated-scroll",
"args": ["--enable-features=TouchpadAndWheelScrollLatching",
"--enable-threaded-compositing"]
},
{
"prefix": "wheelscrolllatching",
"base": "fast/compositor-wheel-scroll-latching/non-animated-scroll",
"args": ["--enable-features=TouchpadAndWheelScrollLatching",
"--enable-threaded-compositing",
"--disable-smooth-scrolling"]
......
<!DOCTYPE HTML>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<style>
body {
margin: 0px;
......@@ -29,21 +29,21 @@ var rect = div.getBoundingClientRect();
const GESTURE_SOURCE_TYPE = 2; // MOUSE_INPUT from synthetic_gesture_params.h
function changeStyleToScrollOnMain() {
if(div.scrollTop > 150)
if(div.scrollTop > 100)
div.style = "border-radius:40px; position:fixed;";
}
div.addEventListener("scroll", changeStyleToScrollOnMain, {passive: true});
div.addEventListener("wheel", changeStyleToScrollOnMain, {passive: true});
const MAX_RAF = 1000;
let last_scroll_offset = div.scrollTop;
var last_changed_count = 0;
var raf_count = 0;
function waitForAnimationEnd() {
return new Promise((resolve, reject) => {
function tick() {
// We requestAnimationFrame either for 1000 frames or until 20 frames with
// no change have been observed.
if (raf_count >= MAX_RAF || raf_count - last_changed_count > 20) {
// We requestAnimationFrame until either 70 frames with no change observed
// or the div is fully scrolled.
if (raf_count - last_changed_count > 70 ||
div.scrollTop == div.scrollHeight - div.clientHeight) {
resolve();
} else {
if (div.scrollTop != last_scroll_offset) {
......@@ -66,7 +66,7 @@ promise_test(() => {
(rect.top + rect.bottom) / 2,
GESTURE_SOURCE_TYPE,
'down',
4000);
2000);
}).then(waitForAnimationEnd)
.then(() => {
assert_equals(div.scrollTop, div.scrollHeight - div.clientHeight,
......
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script>
let t;
if (window.internals && chrome && chrome.gpuBenchmarking) {
......
This suite runs the tests in fast/compositor-wheel-scroll-latching/animated-scroll with
# --enable-features=TouchpadAndWheelScrollLatching --enable-threaded-compositing
This suite runs the tests in fast/compositor-wheel-scroll-latching with
This suite runs the tests in fast/compositor-wheel-scroll-latching/non-animated-scroll with
# --enable-features=TouchpadAndWheelScrollLatching --enable-threaded-compositing --disable-smooth-scrolling
......@@ -765,7 +765,12 @@ InputHandlerProxy::HandleGestureScrollUpdate(
return DID_HANDLE;
case cc::InputHandler::SCROLL_IGNORED:
return DROP_EVENT;
default:
case cc::InputHandler::SCROLL_ON_MAIN_THREAD:
case cc::InputHandler::SCROLL_UNKNOWN:
if (input_handler_->ScrollingShouldSwitchtoMainThread()) {
gesture_scroll_on_impl_thread_ = false;
client_->GenerateScrollBeginAndSendToMainThread(gesture_event);
}
return DID_NOT_HANDLE;
}
}
......
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