[webkit-changes] [WebKit/WebKit] 622bd3: InteractionRegions: refine the visual edge detection

Commit Queue noreply at github.com
Thu May 18 01:22:37 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 622bd3bfe173b244d3cc68f2cb14ebbf987e14dd
      https://github.com/WebKit/WebKit/commit/622bd3bfe173b244d3cc68f2cb14ebbf987e14dd
  Author: Etienne Segonzac <sgz at apple.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M LayoutTests/interaction-region/consolidated-nested-regions.html
    M LayoutTests/interaction-region/inline-link-expected.txt
    M LayoutTests/interaction-region/inline-link.html
    M Source/WebCore/page/InteractionRegion.cpp
    M Source/WebCore/rendering/EventRegion.cpp

  Log Message:
  -----------
  InteractionRegions: refine the visual edge detection
https://bugs.webkit.org/show_bug.cgi?id=256894
<rdar://109412803>

Reviewed by Tim Horton.

Use the more complete `hasVisibleBoxDecorations()` when checking if a
renderer has any visual edge.
This fixes an issue where `border: 0` elements were still considered as
having visual edges.

* Source/WebCore/page/InteractionRegion.cpp:
(WebCore::interactionRegionForRenderedRegion):
Use the `hasVisibleBoxDecorations()` to detect a visual edge.
Expand and clarify the conditions under which we can tweak the region
without causing visual mismatch.
* Source/WebCore/rendering/EventRegion.cpp:
(WebCore::EventRegionContext::shouldConsolidateInteractionRegion):
Use the `hasVisibleBoxDecorations()` to detect a visual edge.

* LayoutTests/interaction-region/consolidated-nested-regions.html:
Add a background to the nested link so that it continues being seen as
having a visual edge (no expectation diff).
* LayoutTests/interaction-region/inline-link-expected.txt:
* LayoutTests/interaction-region/inline-link.html:
Cover the change with new inline link test cases.

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




More information about the webkit-changes mailing list