-
eric.carlson@apple.com authored
Reviewed by Adele Peterson. Possible crashes when mouse clicks not dispatched because range input destroyed while thumb is being dragged (e.g. scrub to end of movie) <rdar://problem/7037494> https://bugs.webkit.org/show_bug.cgi?id=27101 Some shadow nodes "capture" all mouse events from mouseDown to mouseUp so they continue to get mouse events even when the mouse is moved outside of the node. This is done by putting EventHandler into a mode where it sends all mouse events to the node regardless of the actual mouse position. The mode is set on mouseDown and cleared on mouseUp but if the node is deleted while in this mode, the mouseUp is never sent and EventHandler continues to try to send events to the deleted node. This sometimes results in a crash, and sometimes in a page that doesn't respond to click events. Tests: fast/forms/search-delete-while-cancel-button-clicked.html fast/forms/slider-delete-while-dragging-thumb.html media/audio-delete-while-slider-thumb-clicked.html media/audio-delete-while-step-button-clicked.html * rendering/MediaControlElements.cpp: (WebCore::MediaControlSeekButtonElement::detach): New, call setCapturingMouseEventsNode if capturing mouse events. * rendering/MediaControlElements.h: Declare detach(). * rendering/RenderSlider.cpp: (WebCore::SliderThumbElement::detach): New, call setCapturingMouseEventsNode if capturing mouse events. * rendering/TextControlInnerElements.cpp: (WebCore::SearchFieldCancelButtonElement::detach): New, call setCapturingMouseEventsNode if capturing mouse events. * rendering/TextControlInnerElements.h: Declare detach(). 2009-07-09 Eric Carlson <eric.carlson@apple.com> Reviewed by Adele Peterson. Possible crashes when mouse clicks not dispatched because range input destroyed while thumb is being dragged (e.g. scrub to end of movie) <rdar://problem/7037494> https://bugs.webkit.org/show_bug.cgi?id=27101 Tests deleting a control while capturing mouse events. * fast/forms/search-delete-while-cancel-button-clicked-expected.txt: Added. * fast/forms/search-delete-while-cancel-button-clicked.html: Added. * fast/forms/slider-delete-while-dragging-thumb-expected.txt: Added. * fast/forms/slider-delete-while-dragging-thumb.html: Added. * media/audio-delete-while-slider-thumb-clicked-expected.txt: Added. * media/audio-delete-while-slider-thumb-clicked.html: Added. * media/audio-delete-while-step-button-clicked-expected.txt: Added. * media/audio-delete-while-step-button-clicked.html: Added. * platform/mac-snowleopard/Skipped: Skip the new media controller tests until <rdar://problem/6502936> is fixed. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ad61dae4