overflowchanged event could cause a crash
https://bugs.webkit.org/show_bug.cgi?id=125978

Reviewed by Tim Horton.

Source/WebCore: 

Made the event asynchrnous by re-using Document's event queuing ability. Also removed
the infrastructure to queue up events in FrameView.

Test: fast/events/overflowchanged-inside-selection-collapse-crash.html

* dom/Document.cpp:
(WebCore::Document::recalcStyle):
(WebCore::Document::enqueueOverflowEvent):
* dom/Document.h:
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::~FrameView):
(WebCore::FrameView::layout):
(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::updateOverflowStatus):
* page/FrameView.h:
* rendering/RenderBlock.cpp:
(WebCore::OverflowEventDispatcher::~OverflowEventDispatcher):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollRectToVisible):
* rendering/RenderMarquee.cpp:
(WebCore::RenderMarquee::start):

LayoutTests: 

Add a regression test.

* fast/events/overflowchanged-inside-selection-collapse-crash-expected.txt: Added.
* fast/events/overflowchanged-inside-selection-collapse-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
11 files changed