CTTE: Autoscroll renderer is always a RenderBox.
[WebKit-https.git] / Source / WebCore / rendering / RenderBox.cpp
index 1be2f1026b6f60e954031f3c3c148e33a86fc13e..29f32359238804591a5ac1fb2a5bd275a3f59034 100644 (file)
@@ -28,6 +28,7 @@
 #include "Chrome.h"
 #include "ChromeClient.h"
 #include "Document.h"
+#include "EventHandler.h"
 #include "FloatQuad.h"
 #include "Frame.h"
 #include "FrameView.h"
@@ -218,6 +219,9 @@ void RenderBox::clearRenderBoxRegionInfo()
 
 void RenderBox::willBeDestroyed()
 {
+    if (frame().eventHandler().autoscrollRenderer() == this)
+        frame().eventHandler().stopAutoscrollTimer(true);
+
     clearOverrideSize();
     clearContainingBlockOverrideSize();