-
pierre.rossi@gmail.com authored
https://bugs.webkit.org/show_bug.cgi?id=91006 Reviewed by Ryosuke Niwa. Source/WebCore: The rationale here is that the client doesn't need to know about the touch event handler count. needTouchEvents was already used for that purpose. Test: fast/events/touch/touch-handler-count.html * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::didAddTouchEventHandler): Only notify the client if needed. (WebCore::Document::didRemoveTouchEventHandler): Ditto. Also unset the TOUCH_LISTENER flag for the document if we reach a count of zero. The rationale being that hasListenerType() is relied upon in other places in combination with TOUCH_LISTENER for the same purpose. * dom/Document.h: (Document): (WebCore::Document::touchEventHandlerCount): * loader/EmptyClients.h: * page/ChromeClient.h: (ChromeClient): * page/Frame.cpp: Removed notifyChromeClientTouchEventHandlerCountChanged. (WebCore::Frame::setDocument): call needsTouchEvents directly. * page/Frame.h: Ditto. (Frame): * testing/Internals.cpp: (WebCore::Internals::hasTouchEventListener): expose Document::hasListenerType indirectly for additional testing. (WebCore): * testing/Internals.h: (Internals): * testing/Internals.idl: Source/WebKit/blackberry: Removed numTouchEventHandlersChanged stub. * WebCoreSupport/ChromeClientBlackBerry.h: Source/WebKit/chromium: Rename the functions to follow a more boolean logic. * public/WebViewClient.h: (WebKit::WebViewClient::hasTouchEventHandlers): * src/ChromeClientImpl.cpp: (WebKit): (WebKit::ChromeClientImpl::needTouchEvents): * src/ChromeClientImpl.h: (ChromeClientImpl): * src/WebViewImpl.cpp: (WebKit::WebViewImpl::hasTouchEventHandlers): * src/WebViewImpl.h: (WebViewImpl): Source/WebKit/efl: Removed numTouchEventHandlersChanged stub. * WebCoreSupport/ChromeClientEfl.h: Source/WebKit/gtk: Remove numTouchEventHandlersChanged stub. * WebCoreSupport/ChromeClientGtk.h: Source/WebKit/mac: Remove numTouchEventHandlersChanged stub. * WebCoreSupport/WebChromeClient.h: Source/WebKit/qt: Remove numTouchEventHandlersChanged stub. * WebCoreSupport/ChromeClientQt.h: Source/WebKit/win: Remove numTouchEventHandlersChanged stub. * WebCoreSupport/WebChromeClient.h: Source/WebKit/wince: Remove numTouchEventHandlersChanged stub. * WebCoreSupport/ChromeClientWinCE.h: Source/WebKit/wx: Remove numTouchEventHandlersChanged stub. * WebKitSupport/ChromeClientWx.h: Source/WebKit2: Remove numTouchEventHandlersChanged stub. * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): LayoutTests: Extend the touch-handler-count test to also cover the hasListenerType logic. * fast/events/touch/touch-handler-count-expected.txt: * fast/events/touch/touch-handler-count.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123354 268f45cc-cd09-0410-ab3c-d52691b4dbfc
81b05961