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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 UseCounter::count(m_page->mainFrame(), UseCounter::DragAndDropScrollStart); | 196 UseCounter::count(m_page->mainFrame(), UseCounter::DragAndDropScrollStart); |
197 startAutoscroll(); | 197 startAutoscroll(); |
198 } else if (m_autoscrollLayoutObject != scrollable) { | 198 } else if (m_autoscrollLayoutObject != scrollable) { |
199 m_dragAndDropAutoscrollStartTime = eventTime; | 199 m_dragAndDropAutoscrollStartTime = eventTime; |
200 m_autoscrollLayoutObject = scrollable; | 200 m_autoscrollLayoutObject = scrollable; |
201 } | 201 } |
202 } | 202 } |
203 | 203 |
204 void AutoscrollController::handleMouseReleaseForMiddleClickAutoscroll( | 204 void AutoscrollController::handleMouseReleaseForMiddleClickAutoscroll( |
205 LocalFrame* frame, | 205 LocalFrame* frame, |
206 const PlatformMouseEvent& mouseEvent) { | 206 const WebMouseEvent& mouseEvent) { |
207 DCHECK(RuntimeEnabledFeatures::middleClickAutoscrollEnabled()); | 207 DCHECK(RuntimeEnabledFeatures::middleClickAutoscrollEnabled()); |
208 if (!frame->isMainFrame()) | 208 if (!frame->isMainFrame()) |
209 return; | 209 return; |
210 switch (m_autoscrollType) { | 210 switch (m_autoscrollType) { |
211 case AutoscrollForMiddleClick: | 211 case AutoscrollForMiddleClick: |
212 if (mouseEvent.pointerProperties().button == | 212 if (mouseEvent.button == WebPointerProperties::Button::Middle) |
213 WebPointerProperties::Button::Middle) | |
214 m_autoscrollType = AutoscrollForMiddleClickCanStop; | 213 m_autoscrollType = AutoscrollForMiddleClickCanStop; |
215 break; | 214 break; |
216 case AutoscrollForMiddleClickCanStop: | 215 case AutoscrollForMiddleClickCanStop: |
217 stopAutoscroll(); | 216 stopAutoscroll(); |
218 break; | 217 break; |
219 case AutoscrollForDragAndDrop: | 218 case AutoscrollForDragAndDrop: |
220 case AutoscrollForSelection: | 219 case AutoscrollForSelection: |
221 case NoAutoscroll: | 220 case NoAutoscroll: |
222 // Nothing to do. | 221 // Nothing to do. |
223 break; | 222 break; |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 } else if (east) { | 408 } else if (east) { |
410 view->setCursor(eastPanningCursor()); | 409 view->setCursor(eastPanningCursor()); |
411 } else if (west) { | 410 } else if (west) { |
412 view->setCursor(westPanningCursor()); | 411 view->setCursor(westPanningCursor()); |
413 } else { | 412 } else { |
414 view->setCursor(middlePanningCursor()); | 413 view->setCursor(middlePanningCursor()); |
415 } | 414 } |
416 } | 415 } |
417 | 416 |
418 } // namespace blink | 417 } // namespace blink |
OLD | NEW |