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

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

Issue 2319623004: Add UMA for selection drag autoscroll. (Closed)
Patch Set: Change the test for MAC and merge with the master Created 4 years, 3 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 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 stopAutoscroll(); 173 stopAutoscroll();
174 return; 174 return;
175 } 175 }
176 176
177 m_dragAndDropAutoscrollReferencePosition = eventPosition + offset; 177 m_dragAndDropAutoscrollReferencePosition = eventPosition + offset;
178 178
179 if (m_autoscrollType == NoAutoscroll) { 179 if (m_autoscrollType == NoAutoscroll) {
180 m_autoscrollType = AutoscrollForDragAndDrop; 180 m_autoscrollType = AutoscrollForDragAndDrop;
181 m_autoscrollLayoutObject = scrollable; 181 m_autoscrollLayoutObject = scrollable;
182 m_dragAndDropAutoscrollStartTime = eventTime; 182 m_dragAndDropAutoscrollStartTime = eventTime;
183 UseCounter::count(m_page->mainFrame(), UseCounter::DragAndDropScrollStar t);
183 startAutoscroll(); 184 startAutoscroll();
184 } else if (m_autoscrollLayoutObject != scrollable) { 185 } else if (m_autoscrollLayoutObject != scrollable) {
185 m_dragAndDropAutoscrollStartTime = eventTime; 186 m_dragAndDropAutoscrollStartTime = eventTime;
186 m_autoscrollLayoutObject = scrollable; 187 m_autoscrollLayoutObject = scrollable;
187 } 188 }
188 } 189 }
189 190
190 #if OS(WIN) 191 #if OS(WIN)
191 void AutoscrollController::handleMouseReleaseForPanScrolling(LocalFrame* frame, const PlatformMouseEvent& mouseEvent) 192 void AutoscrollController::handleMouseReleaseForPanScrolling(LocalFrame* frame, const PlatformMouseEvent& mouseEvent)
192 { 193 {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 view->setCursor(eastPanningCursor()); 310 view->setCursor(eastPanningCursor());
310 } else if (west) { 311 } else if (west) {
311 view->setCursor(westPanningCursor()); 312 view->setCursor(westPanningCursor());
312 } else { 313 } else {
313 view->setCursor(middlePanningCursor()); 314 view->setCursor(middlePanningCursor());
314 } 315 }
315 } 316 }
316 #endif 317 #endif
317 318
318 } // namespace blink 319 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698