Crash at WebCore::Document::absoluteRegionForEventTargets
https://bugs.webkit.org/show_bug.cgi?id=144426
rdar://problem/20502166
Reviewed by Tim Horton.
Source/WebCore:
When a frame had wheel event handlers, we would register the document itself
as a handler in its parent document. This is problematic, because there's not
code path that removes it when the frame is destroyed.
It turns out we don't need to do this at all; the non-fast scrollable region
already takes handlers in subframes into account.
Tests: fast/events/wheelevent-in-frame.html
fast/events/wheelevent-in-reattached-frame.html
* dom/Document.cpp:
(WebCore::Document::didAddWheelEventHandler):
(WebCore::Document::didRemoveWheelEventHandler):
LayoutTests:
Test that disconnects a frame with a wheel event handler then GCs, and one that
disconnects are reconnects. In both case, the parent document should have zero
wheel event handlers registered on it.
* fast/events/wheelevent-in-frame-expected.txt: Added.
* fast/events/wheelevent-in-frame.html: Added.
* fast/events/wheelevent-in-reattached-frame-expected.txt: Added.
* fast/events/wheelevent-in-reattached-frame.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@183614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
8 files changed