Do not send touch events to the slider's thumb when it does not have a renderer.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jun 2015 17:42:00 +0000 (17:42 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Jun 2015 17:42:00 +0000 (17:42 +0000)
commitc1285644f8adfcc7a5f5d737dbb94374f24a6879
tree1e233b7a21e1f011abdca174ed50fdb4c766cf99
parenta7652f3b136535053d5c5e707b9751187db54545
Do not send touch events to the slider's thumb when it does not have a renderer.
https://bugs.webkit.org/show_bug.cgi?id=146307
rdar://problem/21539399

Reviewed by Simon Fraser.

Bail out early if either the touch target or the renderer() is null.

Source/WebCore:

Test: fast/events/touch/input-range-with-thumb-display-none-crash.html

* html/shadow/SliderThumbElement.cpp:
(WebCore::findTouchWithIdentifier):
(WebCore::SliderThumbElement::handleTouchStart):
(WebCore::SliderThumbElement::handleTouchMove):
(WebCore::SliderThumbElement::handleTouchEndAndCancel):

LayoutTests:

* fast/events/touch/input-range-with-thumb-display-none-crash-expected.txt: Added.
* fast/events/touch/input-range-with-thumb-display-none-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185955 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/ios-simulator/ios/touch/input-range-with-thumb-display-none-crash-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios-simulator/ios/touch/input-range-with-thumb-display-none-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/shadow/SliderThumbElement.cpp