| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 4 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 5 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 #if OS(WIN) | 125 #if OS(WIN) |
| 126 HitTestResult hitTest = layoutObject->frame()->eventHandler().hitTestResultA
tPoint(m_panScrollStartPos, HitTestRequest::ReadOnly | HitTestRequest::Active); | 126 HitTestResult hitTest = layoutObject->frame()->eventHandler().hitTestResultA
tPoint(m_panScrollStartPos, HitTestRequest::ReadOnly | HitTestRequest::Active); |
| 127 | 127 |
| 128 if (Node* nodeAtPoint = hitTest.innerNode()) | 128 if (Node* nodeAtPoint = hitTest.innerNode()) |
| 129 layoutObject = nodeAtPoint->layoutObject(); | 129 layoutObject = nodeAtPoint->layoutObject(); |
| 130 #endif | 130 #endif |
| 131 | 131 |
| 132 while (layoutObject && !(layoutObject->isBox() && toLayoutBox(layoutObject)-
>canAutoscroll())) | 132 while (layoutObject && !(layoutObject->isBox() && toLayoutBox(layoutObject)-
>canAutoscroll())) |
| 133 layoutObject = layoutObject->parent(); | 133 layoutObject = layoutObject->parent(); |
| 134 m_autoscrollLayoutObject = layoutObject && layoutObject->isBox() ? toLayoutB
ox(layoutObject) : nullptr; | 134 |
| 135 LayoutBox* autoscrollLayoutObject = layoutObject && layoutObject->isBox() ?
toLayoutBox(layoutObject) : nullptr; |
| 136 if (m_autoscrollLayoutObject && !autoscrollLayoutObject) |
| 137 stopAutoscrollIfNeeded(m_autoscrollLayoutObject); |
| 138 |
| 139 m_autoscrollLayoutObject = autoscrollLayoutObject; |
| 135 } | 140 } |
| 136 | 141 |
| 137 void AutoscrollController::updateDragAndDrop(Node* dropTargetNode, const IntPoin
t& eventPosition, double eventTime) | 142 void AutoscrollController::updateDragAndDrop(Node* dropTargetNode, const IntPoin
t& eventPosition, double eventTime) |
| 138 { | 143 { |
| 139 if (!dropTargetNode || !dropTargetNode->layoutObject()) { | 144 if (!dropTargetNode || !dropTargetNode->layoutObject()) { |
| 140 stopAutoscroll(); | 145 stopAutoscroll(); |
| 141 return; | 146 return; |
| 142 } | 147 } |
| 143 | 148 |
| 144 if (m_autoscrollLayoutObject && m_autoscrollLayoutObject->frame() != dropTar
getNode->layoutObject()->frame()) | 149 if (m_autoscrollLayoutObject && m_autoscrollLayoutObject->frame() != dropTar
getNode->layoutObject()->frame()) |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 view->setCursor(eastPanningCursor()); | 303 view->setCursor(eastPanningCursor()); |
| 299 } else if (west) { | 304 } else if (west) { |
| 300 view->setCursor(westPanningCursor()); | 305 view->setCursor(westPanningCursor()); |
| 301 } else { | 306 } else { |
| 302 view->setCursor(middlePanningCursor()); | 307 view->setCursor(middlePanningCursor()); |
| 303 } | 308 } |
| 304 } | 309 } |
| 305 #endif | 310 #endif |
| 306 | 311 |
| 307 } // namespace blink | 312 } // namespace blink |
| OLD | NEW |