#include "core/page/Page.h"
#include "core/rendering/HitTestResult.h"
#include "core/rendering/RenderBox.h"
+#include "core/rendering/RenderListBox.h"
#include "wtf/CurrentTime.h"
namespace WebCore {
return;
RenderBox* scrollable = RenderBox::findAutoscrollable(renderer);
if (!scrollable)
+ scrollable = renderer->isListBox() ? toRenderListBox(renderer) : 0;
+ if (!scrollable)
return;
m_autoscrollType = AutoscrollForSelection;
m_autoscrollRenderer = scrollable;
#if OS(WIN)
void AutoscrollController::handleMouseReleaseForPanScrolling(Frame* frame, const PlatformMouseEvent& mouseEvent)
{
- Page* page = frame->page();
- if (!page || page->mainFrame() != frame)
+ if (!frame->isMainFrame())
return;
switch (m_autoscrollType) {
case AutoscrollForPan: