Update touch-action region on property changes
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Apr 2019 20:32:53 +0000 (20:32 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 Apr 2019 20:32:53 +0000 (20:32 +0000)
commit3452e007cd0e04bdd2d904e805b594c3a6cae5e1
tree5c5b6659b7a01d1e17a5d55dcb95fce0bdb325be
parent30a9ad47549f6006fd861a935de96c327e8426e2
Update touch-action region on property changes
https://bugs.webkit.org/show_bug.cgi?id=196608

Reviewed by Simon Fraser.

Source/WebCore:

Test: pointerevents/ios/touch-action-region-dynamic.html

* rendering/EventRegion.cpp:
(WebCore::EventRegion::touchActionsForPoint const):

Correctly return 'auto' when nothing is found from the regions (this code is not used yet).

* rendering/RenderElement.cpp:
(WebCore::RenderElement::styleWillChange):

React to 'touch-action' property changes, similarly to 'pointer-events'.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::invalidateEventRegion):

Test if need to invalidate.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setContentsNeedDisplay):
(WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):

Call invalidateEventRegion explicitly instead of relying on compositing update. This ensures
that we update the top level event region correctly when we have touch-actions.

LayoutTests:

* pointerevents/ios/touch-action-region-dynamic-expected.txt: Added.
* pointerevents/ios/touch-action-region-dynamic.html: Added.

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