Index: third_party/WebKit/Source/core/page/AutoscrollController.cpp |
diff --git a/third_party/WebKit/Source/core/page/AutoscrollController.cpp b/third_party/WebKit/Source/core/page/AutoscrollController.cpp |
index 34620a291a0f193b9ce7d0e5e8744a84ed516de0..2721ae0b8c0981cb89d71bba4cb9e82763a93c65 100644 |
--- a/third_party/WebKit/Source/core/page/AutoscrollController.cpp |
+++ b/third_party/WebKit/Source/core/page/AutoscrollController.cpp |
@@ -241,19 +241,21 @@ void AutoscrollController::animate(double) |
return; |
} |
- EventHandler& eventHandler = m_autoscrollLayoutObject->frame()->eventHandler(); |
dtapuska
2016/09/08 14:13:20
I was kind of anticipating a change like
LocalFra
|
switch (m_autoscrollType) { |
case AutoscrollForDragAndDrop: |
if (WTF::currentTime() - m_dragAndDropAutoscrollStartTime > autoscrollDelay) |
m_autoscrollLayoutObject->autoscroll(m_dragAndDropAutoscrollReferencePosition); |
break; |
case AutoscrollForSelection: |
- if (!eventHandler.mousePressed()) { |
- stopAutoscroll(); |
- return; |
+ if (LocalFrame* frame = m_autoscrollLayoutObject->frame()) { |
+ EventHandler& eventHandler = frame->eventHandler(); |
+ if (!eventHandler.mousePressed()) { |
+ stopAutoscroll(); |
+ return; |
+ } |
+ eventHandler.updateSelectionForMouseDrag(); |
+ m_autoscrollLayoutObject->autoscroll(eventHandler.lastKnownMousePosition()); |
} |
- eventHandler.updateSelectionForMouseDrag(); |
- m_autoscrollLayoutObject->autoscroll(eventHandler.lastKnownMousePosition()); |
break; |
case NoAutoscroll: |
break; |
@@ -264,8 +266,12 @@ void AutoscrollController::animate(double) |
stopAutoscroll(); |
return; |
} |
- if (FrameView* view = m_autoscrollLayoutObject->frame()->view()) |
- updatePanScrollState(view, eventHandler.lastKnownMousePosition()); |
+ if (LocalFrame* frame = m_autoscrollLayoutObject->frame()) { |
+ if (FrameView* view = frame->view()) { |
+ EventHandler& eventHandler = frame->eventHandler(); |
+ updatePanScrollState(view, eventHandler.lastKnownMousePosition()); |
+ } |
+ } |
m_autoscrollLayoutObject->panScroll(m_panScrollStartPos); |
break; |
#endif |