Commit 957ded84 authored by akling@apple.com's avatar akling@apple.com

CTTE: Autoscroll renderer is always a RenderBox.

<https://webkit.org/b/126884>

Reviewed by Antti Koivisto.

* page/EventHandler.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::autoscrollRenderer):

    Make autoscrollRenderer() return a RenderBox*.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::willBeDestroyed):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::willBeDestroyed):

    Only check if the autoscroll renderer is being torn down
    in RenderBox::willBeDestroyed() since it's not relevant for
    other renderer types.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 0b1aefad
2014-01-13 Andreas Kling <akling@apple.com>
CTTE: Autoscroll renderer is always a RenderBox.
<https://webkit.org/b/126884>
Reviewed by Antti Koivisto.
* page/EventHandler.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::autoscrollRenderer):
Make autoscrollRenderer() return a RenderBox*.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::willBeDestroyed):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::willBeDestroyed):
Only check if the autoscroll renderer is being torn down
in RenderBox::willBeDestroyed() since it's not relevant for
other renderer types.
2014-01-13 László Langó <llango.u-szeged@partner.samsung.com>
Text should be constructable.
......@@ -1023,7 +1023,7 @@ void EventHandler::startPanScrolling(RenderElement* renderer)
#endif // ENABLE(PAN_SCROLLING)
RenderElement* EventHandler::autoscrollRenderer() const
RenderBox* EventHandler::autoscrollRenderer() const
{
return m_autoscrollController->autoscrollRenderer();
}
......
......@@ -86,9 +86,9 @@ class OptionalCursor;
class PlatformKeyboardEvent;
class PlatformTouchEvent;
class PlatformWheelEvent;
class RenderBox;
class RenderElement;
class RenderLayer;
class RenderObject;
class RenderWidget;
class SVGElementInstance;
class Scrollbar;
......@@ -138,7 +138,7 @@ public:
#endif
void stopAutoscrollTimer(bool rendererIsBeingDestroyed = false);
RenderElement* autoscrollRenderer() const;
RenderBox* autoscrollRenderer() const;
void updateAutoscrollRenderer();
bool autoscrollInProgress() const;
bool mouseDownWasInSubframe() const { return m_mouseDownWasInSubframe; }
......
......@@ -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();
......
......@@ -1830,14 +1830,6 @@ inline void RenderObject::clearLayoutRootIfNeeded() const
void RenderObject::willBeDestroyed()
{
// If this renderer is being autoscrolled, stop the autoscroll timer
// FIXME: RenderObject::destroy should not get called with a renderer whose document
// has a null frame, so we assert this. However, we don't want release builds to crash which is why we
// check that the frame is not null.
if (frame().eventHandler().autoscrollRenderer() == this)
frame().eventHandler().stopAutoscrollTimer(true);
// For accessibility management, notify the parent of the imminent change to its child set.
// We do it now, before remove(), while the parent pointer is still available.
if (AXObjectCache* cache = document().existingAXObjectCache())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment