Source/WebCore:
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Aug 2019 19:26:22 +0000 (19:26 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 Aug 2019 19:26:22 +0000 (19:26 +0000)
commitb4bb7bd6c6a198ce55b8f8321524561be2c42ab8
treec47fb183e15eaf73ebdf2de9c274ed2b4356e078
parent6496934dac6af612318e98e880355276917bd56a
Source/WebCore:
Event region collection should take clipping into account
https://bugs.webkit.org/show_bug.cgi?id=200668
<rdar://problem/53826561>

Reviewed by Simon Fraser.

Test: pointerevents/ios/touch-action-region-clip-and-transform.html

* rendering/EventRegion.cpp:
(WebCore::EventRegionContext::pushClip):
(WebCore::EventRegionContext::popClip):

Maintain clip rect stack.

(WebCore::EventRegionContext::unite):

Apply both transforms and clipping.

* rendering/EventRegion.h:
* rendering/RenderBlock.cpp:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::pushContentsClip):
(WebCore::RenderBox::popContentsClip):

Update clip for non-self-painting layers.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):
(WebCore::RenderLayer::restoreClip):

Update clip for self-painting layers.

LayoutTests:
Event regions collection should take clipping into account
https://bugs.webkit.org/show_bug.cgi?id=200668
<rdar://problem/53826561>

Reviewed by Simon Fraser.

* pointerevents/ios/touch-action-region-clip-and-transform-expected.txt: Added.
* pointerevents/ios/touch-action-region-clip-and-transform.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/pointerevents/ios/touch-action-region-clip-and-transform-expected.txt [new file with mode: 0644]
LayoutTests/pointerevents/ios/touch-action-region-clip-and-transform.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/EventRegion.cpp
Source/WebCore/rendering/EventRegion.h
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderLayer.cpp