[webkit-changes] [WebKit/WebKit] fbf817: Avoid scenarios where every element automatically ...

Commit Queue noreply at github.com
Tue Apr 18 09:42:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fbf81751af85bcc9401029fd025e51ed03dfa91c
      https://github.com/WebKit/WebKit/commit/fbf81751af85bcc9401029fd025e51ed03dfa91c
  Author: Etienne Segonzac <sgz at apple.com>
  Date:   2023-04-18 (Tue, 18 Apr 2023)

  Changed paths:
    A LayoutTests/interaction-region/ignore-catch-all-body-expected.txt
    A LayoutTests/interaction-region/ignore-catch-all-body.html
    M LayoutTests/interaction-region/layer-tree-expected.txt
    M Source/WebCore/style/StyleAdjuster.cpp
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm

  Log Message:
  -----------
  Avoid scenarios where every element automatically gets an interaction region
https://bugs.webkit.org/show_bug.cgi?id=255220
<rdar://100421682>

Reviewed by Tim Horton.

We have a corner case where every element on the page gets an
interaction region regardless of its own properties: a body element that
both does event delegation _and_ sets `cursor: pointer;`.
Work around this issue by ignoring the `pointer` in this specific case.

* Source/WebCore/style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):
Detect the corner case and ignore `pointer` on the body.

* LayoutTests/interaction-region/ignore-catch-all-body-expected.txt: Added.
* LayoutTests/interaction-region/ignore-catch-all-body.html: Added.
Add a test case.

* Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm:
(dumpCALayer):
* LayoutTests/interaction-region/layer-tree-expected.txt:
Fix test flakiness by not dumping InteractionRegion layers' sublayers.

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




More information about the webkit-changes mailing list