Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 96deabf28dd062279a8949990fa8f42b215714d7 https://github.com/WebKit/WebKit/commit/96deabf28dd062279a8949990fa8f42b215714d7 Author: Simon Fraser <simon.fra...@apple.com> Date: 2023-01-25 (Wed, 25 Jan 2023)
Changed paths: A LayoutTests/fast/scrolling/mac/event-region-clip-path-expected.txt A LayoutTests/fast/scrolling/mac/event-region-clip-path.html M Source/WebCore/rendering/EventRegion.cpp M Source/WebCore/rendering/EventRegion.h M Source/WebCore/rendering/RenderLayer.cpp M Source/WebCore/rendering/RenderLayer.h Log Message: ----------- Scroll through content hidden with clip-path does not propagate below https://bugs.webkit.org/show_bug.cgi?id=233084 rdar://85634077 Reviewed by Antti Koivisto. Failing to take clip-path into account for event region building results in async scrolling failing to find the right target in some configurations. This is an initial fix which uses the clip path bounding-box to clip the event region, for non-reference clip-paths. RenderLayer::setupClipPath() is enhanced to apply the event-region clip, passing a EventRegionContextStateSaver to correctly pop the clip. EventRegion and EventRegionContextStateSaver gain `pushClip(const Path&, WindRule)`, which for now just use the bounding box of the path. Rasterizing the path into a Region is complex code which will have to be done later. * LayoutTests/fast/scrolling/mac/event-region-clip-path-expected.txt: Added. * LayoutTests/fast/scrolling/mac/event-region-clip-path.html: Added. * Source/WebCore/rendering/EventRegion.cpp: (WebCore::EventRegionContext::pushClip): * Source/WebCore/rendering/EventRegion.h: (WebCore::EventRegionContextStateSaver::pushClip): * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::RenderLayer::setupClipPath): (WebCore::RenderLayer::paintLayerContents): (WebCore::RenderLayer::collectEventRegionForFragments): (WebCore::RenderLayer::calculateClipRects const): * Source/WebCore/rendering/RenderLayer.h: Canonical link: https://commits.webkit.org/259368@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes