[webkit-changes] [WebKit/WebKit] 9754b3: InteractionRegions grouped together should not ove...

Commit Queue noreply at github.com
Mon Mar 27 02:50:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9754b3656efb55b786edb512082216d48d3b2ee2
      https://github.com/WebKit/WebKit/commit/9754b3656efb55b786edb512082216d48d3b2ee2
  Author: Etienne Segonzac <sgz at apple.com>
  Date:   2023-03-27 (Mon, 27 Mar 2023)

  Changed paths:
    A LayoutTests/interaction-region/overlap-same-group-expected.txt
    A LayoutTests/interaction-region/overlap-same-group.html
    M LayoutTests/interaction-region/wrapped-inline-link-expected.txt
    M Source/WebCore/rendering/EventRegion.cpp
    M Source/WebCore/rendering/EventRegion.h

  Log Message:
  -----------
  InteractionRegions grouped together should not overlap
https://bugs.webkit.org/show_bug.cgi?id=254435
<rdar://107135607>

Reviewed by Tim Horton.

De-duplicate overlapping rects for InteractionRegions that have the same
element identifier.

* Source/WebCore/rendering/EventRegion.h:
Store discovered `Region`s instead of `IntRect`s.
* Source/WebCore/rendering/EventRegion.cpp:
(WebCore::EventRegionContext::uniteInteractionRegions):
(WebCore::EventRegionContext::shouldConsolidateInteractionRegion):
Keep track of the full united region per element.
Subtract the known region from the new InteractionRegion's
`regionInLayerCoordinates` to avoid overlap.

* LayoutTests/interaction-region/overlap-same-group-expected.txt: Copied from LayoutTests/interaction-region/wrapped-inline-link-expected.txt.
* LayoutTests/interaction-region/overlap-same-group.html: Added.
Add a new test covering the change.
* LayoutTests/interaction-region/wrapped-inline-link-expected.txt:
Update text expectation now that inline fragments don't overlap.

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




More information about the webkit-changes mailing list