This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overlay scrollbars should always use the whole contents
https://bugs.webkit.org/show_bug.cgi?id=153352 Reviewed by Michael Catanzaro. In case of having both horizontal and vertical scrollbars, the scrollbars respect the scroll corner. That looks good for legacy scrollbars that show the track, but with the overlay indicators it looks weird that the indicator stops so early before the end of the contents, giving the impression that there's something else to scroll. This happens because the scroll corner is transparent, so it's not obvious that's the scroll corner. It also happens with the text areas having a resizer. Legacy scrollbars take into account the resizer, which is good, but I expect overlay scrollbars to be rendered also over the resizer. The resizer takes precedence so you can still click and drag to resize the text area. In the case of main frame scrollbars we are indeed returning an empty rectangle from ScrollView::scrollCornerRect() when using overlay scrollbars, but when calculating the size of the scrollbars we are using the actual width/height instead of the occupied with/height. For other scrollbars RenderLayer::scrollCornerRect() is not checking whether scrollbars are overlay or not and we are always returning a scroll corner rectangle when scrollbars are present. * platform/ScrollView.cpp: (WebCore::ScrollView::updateScrollbars): Use the occupied width/height when calculating the space the one scrollbar should leave for the other. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::scrollCornerRect): Return an empty rectangle when using overlay scrollbars. Canonical link: https://commits.webkit.org/171607@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing 3 changed files with 43 additions and 7 deletions.