Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c370b1baf0b3aeaa9f813dd557a60a403bf63e73
https://github.com/WebKit/WebKit/commit/c370b1baf0b3aeaa9f813dd557a60a403bf63e73
Author: Etienne Segonzac <[email protected]>
Date: 2023-03-13 (Mon, 13 Mar 2023)
Changed paths:
A LayoutTests/interaction-region/overlap-expected.txt
A LayoutTests/interaction-region/overlap.html
M LayoutTests/interaction-region/split-inline-link-expected.txt
M LayoutTests/interaction-region/wrapped-inline-link-expected.txt
M Source/WebCore/rendering/EventRegion.cpp
M Source/WebCore/rendering/EventRegion.h
M
Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeInteractionRegionLayers.mm
Log Message:
-----------
The InteractionRegion layers' order should match the paint order
https://bugs.webkit.org/show_bug.cgi?id=253678
<rdar://105700167>
Reviewed by Tim Horton.
Propagate the Interaction Regions creation's order (which matches the
paint order) all the way to the RemoteLayerTree.
The content process is now in charge of ordering/deduping the regions.
And we don't do per-element region uniting anymore.
* Source/WebCore/rendering/EventRegion.h:
Remove the InteractionRegionByElement HashMap.
Add HashSets to dedupe regions by bounds.
* Source/WebCore/rendering/EventRegion.cpp:
(WebCore::EventRegionContext::uniteInteractionRegions):
(WebCore::EventRegionContext::copyInteractionRegionsToEventRegion):
Use a vector to accumulate interaction regions in order.
Prevent duplicated bounds.
(WebCore::EventRegion::dump const):
Remove the test-only ordering code so existing tests cover the actual order.
*
Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeInteractionRegionLayers.mm:
(WebKit::insertInteractionRegionLayersForLayer):
Break when the first non-InteractionRegion-layer is encountered.
(They always come first.)
(WebKit::updateLayersForInteractionRegions):
Update the sublayers while maintaining the order we get from the event
region. Reuse existing layers when the bounds match.
* LayoutTests/interaction-region/overlap-expected.txt: Added.
* LayoutTests/interaction-region/overlap.html: Added.
Add a test covering the content-side deduplication.
* LayoutTests/interaction-region/split-inline-link-expected.txt:
* LayoutTests/interaction-region/wrapped-inline-link-expected.txt:
Update test after the per-element uniting removal.
Canonical link: https://commits.webkit.org/261578@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes