[webkit-changes] [WebKit/WebKit] 21a87c: REGRESSION(r262728): elementsFromPoint misses elem...

mattwoodrow noreply at github.com
Wed Apr 12 18:18:00 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 21a87c5807185504fea14651253b804a318c4c07
      https://github.com/WebKit/WebKit/commit/21a87c5807185504fea14651253b804a318c4c07
  Author: Matt Woodrow <mattwoodrow at apple.com>
  Date:   2023-04-12 (Wed, 12 Apr 2023)

  Changed paths:
    A LayoutTests/fast/dom/elementsFromPoint-z-index-expected.txt
    A LayoutTests/fast/dom/elementsFromPoint-z-index.html
    M Source/WebCore/rendering/RenderLayer.cpp

  Log Message:
  -----------
  REGRESSION(r262728): elementsFromPoint misses elements if they are in different paint passes.
https://bugs.webkit.org/show_bug.cgi?id=255266
<rdar://problem/107862197>

Reviewed by Simon Fraser.

https://commits.webkit.org/262728@main changed the behaviour such that we only write to the HitTestResult if we hit a layer in that paint behaviour pass.

For elementsFromPoint we don't record a single hit layer, and we to append to the HitTestResult for each element that we intersected.

This change always appends to the final HitTestResult if resultIsElementList(), which matches the logic in hitTestList.

This doesn't fix the problem that these appends are done in normal paint order, not 3d depth sorted order (if transform-style is preserve-3d), which is bug 255265.

* LayoutTests/fast/dom/elementsFromPoint-z-index-expected.txt: Added.
* LayoutTests/fast/dom/elementsFromPoint-z-index.html: Added.
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTestLayer):

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




More information about the webkit-changes mailing list