Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: third_party/WebKit/Source/core/page/AutoscrollController.cpp

Issue 2650403006: Remove PlatformMouseEvent and use WebMouseEvent instead (Closed)
Patch Set: Fix nits Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698