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 | 3 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights |
4 * reserved. | 4 * reserved. |
5 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 6 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 const LayoutBox* layoutObject) const { | 70 const LayoutBox* layoutObject) const { |
71 return m_autoscrollLayoutObject == layoutObject; | 71 return m_autoscrollLayoutObject == layoutObject; |
72 } | 72 } |
73 | 73 |
74 void AutoscrollController::startAutoscrollForSelection( | 74 void AutoscrollController::startAutoscrollForSelection( |
75 LayoutObject* layoutObject) { | 75 LayoutObject* layoutObject) { |
76 // We don't want to trigger the autoscroll or the middleClickAutoscroll if | 76 // We don't want to trigger the autoscroll or the middleClickAutoscroll if |
77 // it's already active. | 77 // it's already active. |
78 if (m_autoscrollType != NoAutoscroll) | 78 if (m_autoscrollType != NoAutoscroll) |
79 return; | 79 return; |
| 80 if (layoutObject) |
| 81 layoutObject->frameView()->updateAllLifecyclePhasesExceptPaint(); |
80 LayoutBox* scrollable = LayoutBox::findAutoscrollable(layoutObject); | 82 LayoutBox* scrollable = LayoutBox::findAutoscrollable(layoutObject); |
81 if (!scrollable) | 83 if (!scrollable) |
82 scrollable = | 84 scrollable = |
83 layoutObject->isListBox() ? toLayoutListBox(layoutObject) : nullptr; | 85 layoutObject->isListBox() ? toLayoutListBox(layoutObject) : nullptr; |
84 if (!scrollable) | 86 if (!scrollable) |
85 return; | 87 return; |
86 | 88 |
87 m_pressedLayoutObject = layoutObject && layoutObject->isBox() | 89 m_pressedLayoutObject = layoutObject && layoutObject->isBox() |
88 ? toLayoutBox(layoutObject) | 90 ? toLayoutBox(layoutObject) |
89 : nullptr; | 91 : nullptr; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 if (!dropTargetNode || !dropTargetNode->layoutObject()) { | 158 if (!dropTargetNode || !dropTargetNode->layoutObject()) { |
157 stopAutoscroll(); | 159 stopAutoscroll(); |
158 return; | 160 return; |
159 } | 161 } |
160 | 162 |
161 if (m_autoscrollLayoutObject && | 163 if (m_autoscrollLayoutObject && |
162 m_autoscrollLayoutObject->frame() != | 164 m_autoscrollLayoutObject->frame() != |
163 dropTargetNode->layoutObject()->frame()) | 165 dropTargetNode->layoutObject()->frame()) |
164 return; | 166 return; |
165 | 167 |
| 168 dropTargetNode->layoutObject() |
| 169 ->frameView() |
| 170 ->updateAllLifecyclePhasesExceptPaint(); |
| 171 |
166 LayoutBox* scrollable = | 172 LayoutBox* scrollable = |
167 LayoutBox::findAutoscrollable(dropTargetNode->layoutObject()); | 173 LayoutBox::findAutoscrollable(dropTargetNode->layoutObject()); |
168 if (!scrollable) { | 174 if (!scrollable) { |
169 stopAutoscroll(); | 175 stopAutoscroll(); |
170 return; | 176 return; |
171 } | 177 } |
172 | 178 |
173 Page* page = scrollable->frame() ? scrollable->frame()->page() : nullptr; | 179 Page* page = scrollable->frame() ? scrollable->frame()->page() : nullptr; |
174 if (!page) { | 180 if (!page) { |
175 stopAutoscroll(); | 181 stopAutoscroll(); |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 } else if (east) { | 411 } else if (east) { |
406 view->setCursor(eastPanningCursor()); | 412 view->setCursor(eastPanningCursor()); |
407 } else if (west) { | 413 } else if (west) { |
408 view->setCursor(westPanningCursor()); | 414 view->setCursor(westPanningCursor()); |
409 } else { | 415 } else { |
410 view->setCursor(middlePanningCursor()); | 416 view->setCursor(middlePanningCursor()); |
411 } | 417 } |
412 } | 418 } |
413 | 419 |
414 } // namespace blink | 420 } // namespace blink |
OLD | NEW |