Touch event handler count is not updated when adding handlers to the window.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Mar 2012 18:28:40 +0000 (18:28 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Mar 2012 18:28:40 +0000 (18:28 +0000)
commit3844dea35a21d8ee6cd8593976c5667f59abdd2b
tree51b24bde443bc1745687220357d35d720da1d0d0
parentf8746cf616a7a09351c19e586c0d9683233ff135
Touch event handler count is not updated when adding handlers to the window.
https://bugs.webkit.org/show_bug.cgi?id=80756

Source/WebCore:

Touch event handlers added to the window needs to be included when counting the number of touch event
handlers. This makes touch event handler counting identical to wheel event handler counting.

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-03-12
Reviewed by Anders Carlsson.

Test: fast/events/touch/touch-handler-count.html

* dom/EventNames.h:
(EventNames):
(WebCore::EventNames::isTouchEventType):
* dom/Node.cpp:
(WebCore):
(WebCore::tryAddEventListener):
(WebCore::tryRemoveEventListener):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::addEventListener):
(WebCore::DOMWindow::removeEventListener):
* testing/Internals.cpp:
(WebCore::Internals::touchEventHandlerCount):
(WebCore):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

LayoutTests:

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-03-12
Reviewed by Anders Carlsson.

The new layout tests add and remove touch event handlers on the window, document, and a div in the
document, and tests that the count is updated correctly when handlers are added and/or removed.

* fast/events/touch/touch-handler-count-expected.txt: Added.
* fast/events/touch/touch-handler-count.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/touch/touch-handler-count-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/touch-handler-count.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/EventNames.h
Source/WebCore/dom/Node.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl