Main-thread and impl-thread hit testing are inconsistent regarding border |
|||
Issue descriptionChrome Version: ToT OS: All What steps will reproduce the problem? (1) Goto https://output.jsbin.com/cakomeqiko/quiet (2) Scroll by mouse wheel or drag gesture, on the thick black border. (3) Use inspector to remove will-change:transform on the inner scroller (4) Repeat (2) What is the expected result? Behavior for (2) and (4) should match. What happens instead? Doing (2) scrolls the outer scroller, while (4) scrolls the inner scroller. Most likely not a new regression. I think the bug was as old as we introduced impl-side scrolling. So far there are no complaints from the real world, but need to think about what to do for SPv2 nevertheless. More context: https://chromium-review.googlesource.com/c/602927/3/third_party%252FWebKit%252FSource%252Fcore%252Fpaint%252FPaintPropertyTreeBuilder.cpp#971
,
Aug 7 2017
iOS Safari also has the exact same inconsistency when off-thread scrolling is activated via "-webkit-overflow-scrolling: touch". Tested with http://jsbin.com/kayutiv/ on my iPod touch. Desktop Safari and Firefox consistently use the main-thread style. I'll try to remember to check Edge when I get back to my Windows machine. This question is related to the separation of graphics data structures from hit-testing data structures on the impl thread. If we decide to change impl-thread behavior to match main thread, it should be blocked on that refactoring. +cc rjkroege on that.
,
Aug 8 2017
,
Aug 9 2017
Since scrollbars are drawn inside the border box, it seems strange to me that mouse wheels outside the inner edge of the border box would produce scrolling. Perhaps we should just fix main-thread scrolling to behave like CC? In any case, this has been around forever without any complaint so I'm not sure its worth significant effort to fix in the current form. With slimming paint, CC should be able to tell that the hit display item is part of the border/background of the scrolling Element, right? It should be easy enough to decide whether the border should cause scrolling or not in that case.
,
Aug 9 2017
In SPv2 we are going to generate hit-testing layers that doesn't draw, but added for the sole purpose of handling scroll events. We found this bug when we tried to figure out what size the hit-testing layer should be. (Implies we can easily implement either behavior.) +1 IMO the composited behavior, i.e. not including the border, is more intuitive. I only worry that the spec might require otherwise. The main thread behavior also kind of makes sense because DOM event handling is element-based. The sequence of event roughly goes like this: touch down event --> hit testing --> subsequent event pinned to the element --> touch move event --> deliver to the same element --> no touch handler, default converts to drag gesture --> deliver to the same element --> no gesture handler, default converts to scroll --> deliver to the same element --> scroll Because the hit-testing was done before we even know it eventually will become a scroll, and once converted to a scroll, we no longer have the context to determine whether the scroll was applied on the border.
,
Aug 9 2017
I tested Edge on http://jsbin.com/kayutiv/ on Surface Pro: it behaves the same as Firefox. > (Implies we can easily implement either behavior.) If it's perfectly easy and clean then I think we should go with the spec behavior. Working in all browsers the exact same way is more important to developers than "intuitive". That leaves iOS Safari with "-webkit-overflow-scrolling: touch" as the outlier, but they have that property specifically because they want to ignore interop. However, I also think this issue is minor enough that it's not worth paying more than an epsilon of implementation pain or architectural cruft to meet the spec, so it had better be *really* clean.
,
May 3 2018
|
|||
►
Sign in to add a comment |
|||
Comment 1 by pdr@chromium.org
, Aug 7 2017