[root-scroller] Don't promote descendant of clip
Promoting an element with a clipping ancestor leads to a broken UX for users and so we should detect and prevent this case. The break occurs when the user hides the URL bar. Unless the page explicitly resizes the clipping element (which is difficult for us to detect), the clip will be smaller than the viewport and so it will block out the bottom region of the scroller. To the user, this appears as an inability to scroll to the bottom of the content. We already prevent promoting an element if it has a scrolling ancestor. This CL simply generalizes that check to check for clipping and masking (since scrollers will necessarily have an overflow clip). The exception here is the LayoutView (i.e. viewport). The viewport always has an overflow clip but we use the frame's bounds to clip (which accounts for the URL bar) so in that case we simply check for scrollability. Bug: 903273 Change-Id: I44b21a619052bcf6e4c08fa6369814f31bfb35cf Reviewed-on: https://chromium-review.googlesource.com/c/1351563 Commit-Queue: David Bokan <bokan@chromium.org> Reviewed-by:Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/master@{#611831}
Showing
Please register or sign in to comment