Adopt the iOS TouchEventHandler API for cases that must have synchronous dispatch
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jun 2016 01:13:53 +0000 (01:13 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jun 2016 01:13:53 +0000 (01:13 +0000)
commitf6caa9b5c2de7be010a9e4638aee16f8a3cd27ef
tree31483ef1d17607146b143205fa52a3ad00bb495f
parent855f58ca8aafc13e3f55a9ade947e40b24db3a44
Adopt the iOS TouchEventHandler API for cases that must have synchronous dispatch
https://bugs.webkit.org/show_bug.cgi?id=159179
rdar://problem/27006387

Reviewed by Simon Fraser.

Source/WebCore:

Tests: fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state.html
       fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state.html
       fast/events/touch/ios/block-without-overflow-scroll-scrolling-state.html
       fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-block.html
       fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-document.html
       fast/events/touch/ios/drag-block-without-overflow-scroll.html

* dom/Document.cpp:
(WebCore::Document::prepareForDestruction):
(WebCore::Document::removeAllEventListeners):
* dom/Node.cpp:
(WebCore::Node::willBeDeletedFrom):
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::registerForTouchEvents):
(WebCore::SliderThumbElement::unregisterForTouchEvents):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::registerAsTouchEventListenerForScrolling):
(WebCore::RenderLayer::unregisterAsTouchEventListenerForScrolling):

LayoutTests:

Several of those tests expose existing bugs with overflow scrolling.
They are not using PASS/FAIL at the moment, just dump the called listeners.

* fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state-expected.txt: Added.
* fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state.html: Added.
* fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state-expected.txt: Added.
* fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state.html: Added.
* fast/events/touch/ios/block-without-overflow-scroll-scrolling-state-expected.txt: Added.
* fast/events/touch/ios/block-without-overflow-scroll-scrolling-state.html: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-block-expected.txt: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-block.html: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-document-expected.txt: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-document.html: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll-expected.txt: Added.
* fast/events/touch/ios/drag-block-without-overflow-scroll.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-block-scrolling-state.html [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/block-without-overflow-scroll-and-passive-observer-on-document-scrolling-state.html [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/block-without-overflow-scroll-scrolling-state-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/block-without-overflow-scroll-scrolling-state.html [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-block-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-block.html [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-document-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/drag-block-without-overflow-scroll-and-passive-observer-on-document.html [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/drag-block-without-overflow-scroll-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/drag-block-without-overflow-scroll.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Node.cpp
Source/WebCore/html/shadow/SliderThumbElement.cpp
Source/WebCore/rendering/RenderLayer.cpp