| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 didPanScrollStop(); | 96 didPanScrollStop(); |
| 97 #endif | 97 #endif |
| 98 | 98 |
| 99 RenderBox* scrollable = m_autoscrollRenderer; | 99 RenderBox* scrollable = m_autoscrollRenderer; |
| 100 m_autoscrollTimer.stop(); | 100 m_autoscrollTimer.stop(); |
| 101 m_autoscrollRenderer = 0; | 101 m_autoscrollRenderer = 0; |
| 102 | 102 |
| 103 if (!scrollable) | 103 if (!scrollable) |
| 104 return; | 104 return; |
| 105 | 105 |
| 106 EventHandler* eventHandler = m_frame->eventHandler(); | 106 HANDLE(EventHandler) eventHandler = m_frame->eventHandler(); |
| 107 if (autoscrollInProgress() && eventHandler->mouseDownWasInSubframe()) { | 107 if (autoscrollInProgress() && eventHandler->mouseDownWasInSubframe()) { |
| 108 if (Frame* subframe = eventHandler->subframeForTargetNode(eventHandler->
mousePressNode())) | 108 if (Frame* subframe = eventHandler->subframeForTargetNode(eventHandler->
mousePressNode())) |
| 109 subframe->eventHandler()->stopAutoscrollTimer(rendererIsBeingDestroy
ed); | 109 subframe->eventHandler()->stopAutoscrollTimer(rendererIsBeingDestroy
ed); |
| 110 return; | 110 return; |
| 111 } | 111 } |
| 112 | 112 |
| 113 if (!rendererIsBeingDestroyed) | 113 if (!rendererIsBeingDestroyed) |
| 114 scrollable->stopAutoscroll(); | 114 scrollable->stopAutoscroll(); |
| 115 #if ENABLE(PAN_SCROLLING) | 115 #if ENABLE(PAN_SCROLLING) |
| 116 if (m_autoscrollType == AutoscrollForPanCanStop || m_autoscrollType == Autos
crollForPan) { | 116 if (m_autoscrollType == AutoscrollForPanCanStop || m_autoscrollType == Autos
crollForPan) { |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 stopAutoscrollTimer(); | 251 stopAutoscrollTimer(); |
| 252 return; | 252 return; |
| 253 } | 253 } |
| 254 | 254 |
| 255 switch (m_autoscrollType) { | 255 switch (m_autoscrollType) { |
| 256 case AutoscrollForDragAndDrop: | 256 case AutoscrollForDragAndDrop: |
| 257 if (WTF::currentTime() - m_dragAndDropAutoscrollStartTime > autoscrollDe
lay) | 257 if (WTF::currentTime() - m_dragAndDropAutoscrollStartTime > autoscrollDe
lay) |
| 258 m_autoscrollRenderer->autoscroll(m_dragAndDropAutoscrollReferencePos
ition); | 258 m_autoscrollRenderer->autoscroll(m_dragAndDropAutoscrollReferencePos
ition); |
| 259 break; | 259 break; |
| 260 case AutoscrollForSelection: { | 260 case AutoscrollForSelection: { |
| 261 EventHandler* eventHandler = m_frame->eventHandler(); | 261 HANDLE(EventHandler) eventHandler = m_frame->eventHandler(); |
| 262 if (!eventHandler->mousePressed()) { | 262 if (!eventHandler->mousePressed()) { |
| 263 stopAutoscrollTimer(); | 263 stopAutoscrollTimer(); |
| 264 return; | 264 return; |
| 265 } | 265 } |
| 266 eventHandler->updateSelectionForMouseDrag(); | 266 eventHandler->updateSelectionForMouseDrag(); |
| 267 m_autoscrollRenderer->autoscroll(eventHandler->lastKnownMousePosition())
; | 267 m_autoscrollRenderer->autoscroll(eventHandler->lastKnownMousePosition())
; |
| 268 break; | 268 break; |
| 269 } | 269 } |
| 270 case NoAutoscroll: | 270 case NoAutoscroll: |
| 271 break; | 271 break; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 } else if (east) | 319 } else if (east) |
| 320 view->setCursor(eastPanningCursor()); | 320 view->setCursor(eastPanningCursor()); |
| 321 else if (west) | 321 else if (west) |
| 322 view->setCursor(westPanningCursor()); | 322 view->setCursor(westPanningCursor()); |
| 323 else | 323 else |
| 324 view->setCursor(middlePanningCursor()); | 324 view->setCursor(middlePanningCursor()); |
| 325 } | 325 } |
| 326 #endif | 326 #endif |
| 327 | 327 |
| 328 } // namespace WebCore | 328 } // namespace WebCore |
| OLD | NEW |