[webkit-changes] [WebKit/WebKit] db2f6b: Unable to scroll results.webkit.org results using ...

Simon Fraser noreply at github.com
Thu Oct 12 09:10:33 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: db2f6b2a047a9f2f493bd20a6f0faff640fd3f8e
      https://github.com/WebKit/WebKit/commit/db2f6b2a047a9f2f493bd20a6f0faff640fd3f8e
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2023-10-12 (Thu, 12 Oct 2023)

  Changed paths:
    A LayoutTests/fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-hit-test-expected.txt
    A LayoutTests/fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-hit-test.html
    M Source/WebCore/rendering/RenderLayer.cpp

  Log Message:
  -----------
  Unable to scroll results.webkit.org results using the scrollbars
https://bugs.webkit.org/show_bug.cgi?id=237308
rdar://89598421

Reviewed by Dan Glastonbury and Richard Robinson.

If an overflow:scroll contained a composited, positioned descendant, then trying to click and drag an
overlay scrollbar that overlapped that descendant would fail to work. This affected results.webkit.org,
where the canvas elements caused the bug.

This happened because when the hit-testing code tested whether the composited layer contained the
point, it would use a backgroundClipRect that was not shrunk for the scrollbar. There was already
a "FIXME" comment on a line of code that explicitly removed the `IncludeOverlayScrollbarSize` option,
and removing this line fixes the bug. The code dates from when composited overflow scrolling was
first implemented (112856 at main). `IncludeOverlayScrollbarSize` is only ever specified when requesting
clip rects for hit-testing, so it seems reasonable to assume the code was wrong.

Do other whitespace cleanup in the hit-testing code, including fixing a line with bad indentation.

* LayoutTests/fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-hit-test-expected.txt: Added.
* LayoutTests/fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-hit-test.html: Added.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTest):
(WebCore::RenderLayer::hitTestLayer):
(WebCore::RenderLayer::hitTestContentsForFragments const):
(WebCore::RenderLayer::calculateClipRects const):

Canonical link: https://commits.webkit.org/269255@main




More information about the webkit-changes mailing list