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

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

Issue 931423003: Rename rendering/RenderList* to layout/LayoutList* (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove spurious LayoutLayerModelObject reference Created 5 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
« no previous file with comments | « Source/core/layout/line/InlineFlowBox.cpp ('k') | Source/core/paint/ListItemPainter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 14 matching lines...) Expand all
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "config.h" 29 #include "config.h"
30 #include "core/page/AutoscrollController.h" 30 #include "core/page/AutoscrollController.h"
31 31
32 #include "core/frame/FrameView.h" 32 #include "core/frame/FrameView.h"
33 #include "core/frame/LocalFrame.h" 33 #include "core/frame/LocalFrame.h"
34 #include "core/layout/HitTestResult.h" 34 #include "core/layout/HitTestResult.h"
35 #include "core/layout/LayoutListBox.h"
35 #include "core/page/Chrome.h" 36 #include "core/page/Chrome.h"
36 #include "core/page/EventHandler.h" 37 #include "core/page/EventHandler.h"
37 #include "core/page/Page.h" 38 #include "core/page/Page.h"
38 #include "core/rendering/RenderBox.h" 39 #include "core/rendering/RenderBox.h"
39 #include "core/rendering/RenderListBox.h"
40 #include "wtf/CurrentTime.h" 40 #include "wtf/CurrentTime.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 // Delay time in second for start autoscroll if pointer is in border edge of scr ollable element. 44 // Delay time in second for start autoscroll if pointer is in border edge of scr ollable element.
45 static double autoscrollDelay = 0.2; 45 static double autoscrollDelay = 0.2;
46 46
47 PassOwnPtr<AutoscrollController> AutoscrollController::create(Page& page) 47 PassOwnPtr<AutoscrollController> AutoscrollController::create(Page& page)
48 { 48 {
49 return adoptPtr(new AutoscrollController(page)); 49 return adoptPtr(new AutoscrollController(page));
(...skipping 17 matching lines...) Expand all
67 return m_autoscrollRenderer == renderer; 67 return m_autoscrollRenderer == renderer;
68 } 68 }
69 69
70 void AutoscrollController::startAutoscrollForSelection(LayoutObject* renderer) 70 void AutoscrollController::startAutoscrollForSelection(LayoutObject* renderer)
71 { 71 {
72 // We don't want to trigger the autoscroll or the panScroll if it's already active 72 // We don't want to trigger the autoscroll or the panScroll if it's already active
73 if (m_autoscrollType != NoAutoscroll) 73 if (m_autoscrollType != NoAutoscroll)
74 return; 74 return;
75 RenderBox* scrollable = RenderBox::findAutoscrollable(renderer); 75 RenderBox* scrollable = RenderBox::findAutoscrollable(renderer);
76 if (!scrollable) 76 if (!scrollable)
77 scrollable = renderer->isListBox() ? toRenderListBox(renderer) : nullptr ; 77 scrollable = renderer->isListBox() ? toLayoutListBox(renderer) : nullptr ;
78 if (!scrollable) 78 if (!scrollable)
79 return; 79 return;
80 m_autoscrollType = AutoscrollForSelection; 80 m_autoscrollType = AutoscrollForSelection;
81 m_autoscrollRenderer = scrollable; 81 m_autoscrollRenderer = scrollable;
82 startAutoscroll(); 82 startAutoscroll();
83 } 83 }
84 84
85 void AutoscrollController::stopAutoscroll() 85 void AutoscrollController::stopAutoscroll()
86 { 86 {
87 RenderBox* scrollable = m_autoscrollRenderer; 87 RenderBox* scrollable = m_autoscrollRenderer;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/core/layout/line/InlineFlowBox.cpp ('k') | Source/core/paint/ListItemPainter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698