| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 void AutoscrollController::startAutoscroll() | 258 void AutoscrollController::startAutoscroll() |
| 259 { | 259 { |
| 260 m_page.chrome().scheduleAnimation(); | 260 m_page.chrome().scheduleAnimation(); |
| 261 } | 261 } |
| 262 | 262 |
| 263 #if OS(WIN) | 263 #if OS(WIN) |
| 264 void AutoscrollController::updatePanScrollState(FrameView* view, const IntPoint&
lastKnownMousePosition) | 264 void AutoscrollController::updatePanScrollState(FrameView* view, const IntPoint&
lastKnownMousePosition) |
| 265 { | 265 { |
| 266 // At the original click location we draw a 4 arrowed icon. Over this icon t
here won't be any scroll | 266 // At the original click location we draw a 4 arrowed icon. Over this icon t
here won't be any scroll |
| 267 // So we don't want to change the cursor over this area | 267 // So we don't want to change the cursor over this area |
| 268 bool east = m_panScrollStartPos.x() < (lastKnownMousePosition.x() - ScrollVi
ew::noPanScrollRadius); | 268 bool east = m_panScrollStartPos.x() < (lastKnownMousePosition.x() - FrameVie
w::noPanScrollRadius); |
| 269 bool west = m_panScrollStartPos.x() > (lastKnownMousePosition.x() + ScrollVi
ew::noPanScrollRadius); | 269 bool west = m_panScrollStartPos.x() > (lastKnownMousePosition.x() + FrameVie
w::noPanScrollRadius); |
| 270 bool north = m_panScrollStartPos.y() > (lastKnownMousePosition.y() + ScrollV
iew::noPanScrollRadius); | 270 bool north = m_panScrollStartPos.y() > (lastKnownMousePosition.y() + FrameVi
ew::noPanScrollRadius); |
| 271 bool south = m_panScrollStartPos.y() < (lastKnownMousePosition.y() - ScrollV
iew::noPanScrollRadius); | 271 bool south = m_panScrollStartPos.y() < (lastKnownMousePosition.y() - FrameVi
ew::noPanScrollRadius); |
| 272 | 272 |
| 273 if (m_autoscrollType == AutoscrollForPan && (east || west || north || south)
) | 273 if (m_autoscrollType == AutoscrollForPan && (east || west || north || south)
) |
| 274 m_autoscrollType = AutoscrollForPanCanStop; | 274 m_autoscrollType = AutoscrollForPanCanStop; |
| 275 | 275 |
| 276 if (north) { | 276 if (north) { |
| 277 if (east) | 277 if (east) |
| 278 view->setCursor(northEastPanningCursor()); | 278 view->setCursor(northEastPanningCursor()); |
| 279 else if (west) | 279 else if (west) |
| 280 view->setCursor(northWestPanningCursor()); | 280 view->setCursor(northWestPanningCursor()); |
| 281 else | 281 else |
| 282 view->setCursor(northPanningCursor()); | 282 view->setCursor(northPanningCursor()); |
| 283 } else if (south) { | 283 } else if (south) { |
| 284 if (east) | 284 if (east) |
| 285 view->setCursor(southEastPanningCursor()); | 285 view->setCursor(southEastPanningCursor()); |
| 286 else if (west) | 286 else if (west) |
| 287 view->setCursor(southWestPanningCursor()); | 287 view->setCursor(southWestPanningCursor()); |
| 288 else | 288 else |
| 289 view->setCursor(southPanningCursor()); | 289 view->setCursor(southPanningCursor()); |
| 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 blink | 299 } // namespace blink |
| OLD | NEW |