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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
208 } | 208 } |
209 #else | 209 #else |
210 bool AutoscrollController::panScrollInProgress() const | 210 bool AutoscrollController::panScrollInProgress() const |
211 { | 211 { |
212 return false; | 212 return false; |
213 } | 213 } |
214 #endif | 214 #endif |
215 | 215 |
216 // FIXME: This would get get better animation fidelity if it used the monotonicF rameBeginTime instead | 216 // FIXME: This would get get better animation fidelity if it used the monotonicF rameBeginTime instead |
217 // of WTF::currentTime(). | 217 // of WTF::currentTime(). |
218 void AutoscrollController::animate(double) | 218 void AutoscrollController::animate(blink::WebFrameTime frameTime) |
219 { | 219 { |
220 if (!m_autoscrollRenderer) { | 220 if (!m_autoscrollRenderer) { |
221 stopAutoscroll(); | 221 stopAutoscroll(); |
222 return; | 222 return; |
223 } | 223 } |
224 | 224 |
225 EventHandler& eventHandler = m_autoscrollRenderer->frame()->eventHandler(); | 225 EventHandler& eventHandler = m_autoscrollRenderer->frame()->eventHandler(); |
226 switch (m_autoscrollType) { | 226 switch (m_autoscrollType) { |
227 case AutoscrollForDragAndDrop: | 227 case AutoscrollForDragAndDrop: |
228 if (WTF::currentTime() - m_dragAndDropAutoscrollStartTime > autoscrollDe lay) | 228 if (frameTime.displayFrameTime - m_dragAndDropAutoscrollStartTime > auto scrollDelay) |
picksi
2014/06/24 10:10:26
Not sure on the rules as to why WebFrametime is a
mithro-old
2014/07/01 06:04:41
See my previous comments.
| |
229 m_autoscrollRenderer->autoscroll(m_dragAndDropAutoscrollReferencePos ition); | 229 m_autoscrollRenderer->autoscroll(m_dragAndDropAutoscrollReferencePos ition); |
230 break; | 230 break; |
231 case AutoscrollForSelection: | 231 case AutoscrollForSelection: |
232 if (!eventHandler.mousePressed()) { | 232 if (!eventHandler.mousePressed()) { |
233 stopAutoscroll(); | 233 stopAutoscroll(); |
234 return; | 234 return; |
235 } | 235 } |
236 eventHandler.updateSelectionForMouseDrag(); | 236 eventHandler.updateSelectionForMouseDrag(); |
237 m_autoscrollRenderer->autoscroll(eventHandler.lastKnownMousePosition()); | 237 m_autoscrollRenderer->autoscroll(eventHandler.lastKnownMousePosition()); |
238 break; | 238 break; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
290 } else if (east) | 290 } else if (east) |
291 view->setCursor(eastPanningCursor()); | 291 view->setCursor(eastPanningCursor()); |
292 else if (west) | 292 else if (west) |
293 view->setCursor(westPanningCursor()); | 293 view->setCursor(westPanningCursor()); |
294 else | 294 else |
295 view->setCursor(middlePanningCursor()); | 295 view->setCursor(middlePanningCursor()); |
296 } | 296 } |
297 #endif | 297 #endif |
298 | 298 |
299 } // namespace WebCore | 299 } // namespace WebCore |
OLD | NEW |