InteractionRegion for wrapped text has multiple rects instead of one
https://bugs.webkit.org/show_bug.cgi?id=240748
Reviewed by Wenson Hsieh.
* Source/WebCore/page/InteractionRegion.h:
(WebCore::operator==):
(WebCore::InteractionRegion::encode const):
(WebCore::InteractionRegion::decode):
* Source/WebCore/rendering/EventRegion.cpp:
(WebCore::EventRegion::translate):
(WebCore::EventRegion::dump const):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeInteractionRegionLayers.mm:
(WebKit::updateLayersForInteractionRegions):
* Source/WebCore/page/DebugPageOverlays.cpp:
(WebCore::pathsForRegion):
(WebCore::InteractionRegionOverlay::activeRegion):
(WebCore::InteractionRegionOverlay::drawRect):
* Source/WebCore/page/InteractionRegion.cpp:
(WebCore::regionForElement):
Maintain InteractionRegion geometry as a Region instead of a vector of rects,
so that we can smush overlapping rectangles together on a per-InteractionRegion basis.
(WebCore::operator<<):
Add dumping code for InteractionRegion (and adopt it in EventRegion).
* LayoutTests/TestExpectations:
* LayoutTests/interaction-region/click-handler-expected.txt: Added.
* LayoutTests/interaction-region/click-handler.html: Added.
* LayoutTests/interaction-region/inline-link-dark-background-expected.txt: Added.
* LayoutTests/interaction-region/inline-link-dark-background.html: Added.
* LayoutTests/interaction-region/inline-link-expected.txt: Added.
* LayoutTests/interaction-region/inline-link.html: Added.
* LayoutTests/interaction-region/split-inline-link-expected.txt: Added.
* LayoutTests/interaction-region/split-inline-link.html: Added.
* LayoutTests/interaction-region/wrapped-inline-link-expected.txt: Added.
* LayoutTests/interaction-region/wrapped-inline-link.html: Added.
Add some basic interaction region tests, currently disabled by default
because they can only be run if you turn on the build-time flag.
"wrapped-inline-link.html" covers the case we are fixing by adopting Region;
the others are more generic tests that we should have had before.
link: https://commits.webkit.org/250840@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294614
268f45cc-cd09-0410-ab3c-
d52691b4dbfc