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

Side by Side Diff: Source/core/frame/RootFrameViewport.cpp

Issue 1127023002: Oilpan: address ScrollableArea-induced build breakage from r194957. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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/frame/RootFrameViewport.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/frame/RootFrameViewport.h" 6 #include "core/frame/RootFrameViewport.h"
7 7
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/layout/ScrollAlignment.h" 9 #include "core/layout/ScrollAlignment.h"
10 #include "platform/geometry/DoubleRect.h" 10 #include "platform/geometry/DoubleRect.h"
11 #include "platform/geometry/FloatRect.h" 11 #include "platform/geometry/FloatRect.h"
12 #include "platform/geometry/LayoutRect.h" 12 #include "platform/geometry/LayoutRect.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 RootFrameViewport::RootFrameViewport(ScrollableArea& visualViewport, ScrollableA rea& layoutViewport) 16 RootFrameViewport::RootFrameViewport(ScrollableArea& visualViewport, ScrollableA rea& layoutViewport)
17 : m_visualViewport(visualViewport) 17 : m_visualViewport(visualViewport)
18 , m_layoutViewport(layoutViewport) 18 , m_layoutViewport(layoutViewport)
19 { 19 {
20 } 20 }
21 21
22 DEFINE_TRACE(RootFrameViewport)
23 {
24 visitor->trace(m_visualViewport);
25 visitor->trace(m_layoutViewport);
26 }
27
28 void RootFrameViewport::updateScrollAnimator() 22 void RootFrameViewport::updateScrollAnimator()
29 { 23 {
30 scrollAnimator()->setCurrentPosition(toFloatPoint(scrollOffsetFromScrollAnim ators())); 24 scrollAnimator()->setCurrentPosition(toFloatPoint(scrollOffsetFromScrollAnim ators()));
31 } 25 }
32 26
33 DoublePoint RootFrameViewport::scrollOffsetFromScrollAnimators() const 27 DoublePoint RootFrameViewport::scrollOffsetFromScrollAnimators() const
34 { 28 {
35 return visualViewport().scrollAnimator()->currentPosition() + layoutViewport ().scrollAnimator()->currentPosition(); 29 return visualViewport().scrollAnimator()->currentPosition() + layoutViewport ().scrollAnimator()->currentPosition();
36 } 30 }
37 31
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 if (visualViewport().userInputScrollable(orientation)) 293 if (visualViewport().userInputScrollable(orientation))
300 return visualViewport().scroll(direction, granularity, delta); 294 return visualViewport().scroll(direction, granularity, delta);
301 295
302 if (layoutViewport().userInputScrollable(orientation)) 296 if (layoutViewport().userInputScrollable(orientation))
303 return layoutViewport().scroll(direction, granularity, delta); 297 return layoutViewport().scroll(direction, granularity, delta);
304 298
305 return false; 299 return false;
306 } 300 }
307 301
308 } // namespace blink 302 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/RootFrameViewport.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698