[webkit-changes] [WebKit/WebKit] ac3d70: Refine the grouped InteractionRegions' geometry

Commit Queue noreply at github.com
Mon Apr 24 14:51:18 PDT 2023


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

  Changed paths:
    M LayoutTests/interaction-region/border-radii-expected.txt
    M LayoutTests/interaction-region/consolidated-nested-regions-expected.txt
    M LayoutTests/interaction-region/layer-tree-expected.txt
    M LayoutTests/interaction-region/overlap-expected.txt
    M LayoutTests/interaction-region/overlap-same-group-expected.txt
    M LayoutTests/interaction-region/overlap-same-group.html
    M LayoutTests/interaction-region/paused-video-regions-expected.txt
    M LayoutTests/interaction-region/tiny-regions-expected.txt
    M LayoutTests/interaction-region/wrapped-inline-link-expected.txt
    M LayoutTests/interaction-region/wrapped-inline-link.html
    M Source/WebCore/page/InteractionRegion.cpp
    M Source/WebCore/rendering/EventRegion.cpp
    M Source/WebCore/rendering/EventRegion.h

  Log Message:
  -----------
  Refine the grouped InteractionRegions' geometry
https://bugs.webkit.org/show_bug.cgi?id=255654
<rdar://107760442>

Reviewed by Tim Horton.

Use masked corners to "shrink wrap" grouped InteractionRegions. And
make them fit the element's visual style better.

* Source/WebCore/page/InteractionRegion.cpp:
(WebCore::interactionRegionForRenderedRegion):
Lookup the `borderRadius` on the region's renderer and not the renderer of
the matched element.
Only apply inline bounds inflation and minimum border radius to
renderers without a visual edge.

* Source/WebCore/rendering/EventRegion.cpp:
* Source/WebCore/rendering/EventRegion.h:
(WebCore::EventRegionContext::shrinkWrapInteractionRegions):
(WebCore::EventRegionContext::copyInteractionRegionsToEventRegion):
Introduce a new method to edit the masked corners on grouped
InteractionRegions and make them more visually pleasing.

* LayoutTests/interaction-region/overlap-same-group-expected.txt:
* LayoutTests/interaction-region/overlap-same-group.html:
* LayoutTests/interaction-region/wrapped-inline-link-expected.txt:
* LayoutTests/interaction-region/wrapped-inline-link.html:
Test updates covering the masked corners changes.

* LayoutTests/interaction-region/border-radii-expected.txt:
* LayoutTests/interaction-region/consolidated-nested-regions-expected.txt:
* LayoutTests/interaction-region/overlap-expected.txt:
* LayoutTests/interaction-region/tiny-regions-expected.txt:
Test updates now showing the element's real border radius.

* LayoutTests/interaction-region/layer-tree-expected.txt:
* LayoutTests/interaction-region/paused-video-regions-expected.txt:
Test updates.

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




More information about the webkit-changes mailing list