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

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

Issue 1315783003: Make classes and structures in core/frame fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/core/frame/PageScaleConstraintsSet.h ('k') | Source/core/frame/SubresourceIntegrity.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 // 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 #ifndef RootFrameViewport_h 5 #ifndef RootFrameViewport_h
6 #define RootFrameViewport_h 6 #define RootFrameViewport_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/scroll/ScrollableArea.h" 9 #include "platform/scroll/ScrollableArea.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class LayoutRect; 13 class LayoutRect;
14 14
15 // ScrollableArea for the root frame's viewport. This class ties together the 15 // ScrollableArea for the root frame's viewport. This class ties together the
16 // concepts of layout and visual viewports, used in pinch-to-zoom. This class 16 // concepts of layout and visual viewports, used in pinch-to-zoom. This class
17 // takes two ScrollableAreas, one for the visual viewport and one for the 17 // takes two ScrollableAreas, one for the visual viewport and one for the
18 // layout viewport, and delegates and composes the ScrollableArea API as needed 18 // layout viewport, and delegates and composes the ScrollableArea API as needed
19 // between them. For most scrolling APIs, this class will split the scroll up 19 // between them. For most scrolling APIs, this class will split the scroll up
20 // between the two viewports in accord with the pinch-zoom semantics. For other 20 // between the two viewports in accord with the pinch-zoom semantics. For other
21 // APIs that don't make sense on the combined viewport, the call is delegated to 21 // APIs that don't make sense on the combined viewport, the call is delegated to
22 // the layout viewport. Thus, we could say this class is a decorator on the 22 // the layout viewport. Thus, we could say this class is a decorator on the
23 // FrameView scrollable area that adds pinch-zoom semantics to scrolling. 23 // FrameView scrollable area that adds pinch-zoom semantics to scrolling.
24 class CORE_EXPORT RootFrameViewport final : public NoBaseWillBeGarbageCollectedF inalized<RootFrameViewport>, public ScrollableArea { 24 class CORE_EXPORT RootFrameViewport final : public NoBaseWillBeGarbageCollectedF inalized<RootFrameViewport>, public ScrollableArea {
25 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(RootFrameViewport);
25 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RootFrameViewport); 26 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RootFrameViewport);
26 public: 27 public:
27 static PassOwnPtrWillBeRawPtr<RootFrameViewport> create(ScrollableArea& visu alViewport, ScrollableArea& layoutViewport, bool invertScrollOrder = false) 28 static PassOwnPtrWillBeRawPtr<RootFrameViewport> create(ScrollableArea& visu alViewport, ScrollableArea& layoutViewport, bool invertScrollOrder = false)
28 { 29 {
29 return adoptPtrWillBeNoop(new RootFrameViewport(visualViewport, layoutVi ewport, invertScrollOrder)); 30 return adoptPtrWillBeNoop(new RootFrameViewport(visualViewport, layoutVi ewport, invertScrollOrder));
30 } 31 }
31 32
32 DECLARE_VIRTUAL_TRACE(); 33 DECLARE_VIRTUAL_TRACE();
33 34
34 // ScrollableArea Implementation 35 // ScrollableArea Implementation
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 RawPtrWillBeMember<ScrollableArea> m_layoutViewport; 87 RawPtrWillBeMember<ScrollableArea> m_layoutViewport;
87 88
88 // Experimental flag. If the experiment is enabled, scroll the visual viewpo rt first, 89 // Experimental flag. If the experiment is enabled, scroll the visual viewpo rt first,
89 // the bubble scrolls to the layout viewport. 90 // the bubble scrolls to the layout viewport.
90 bool m_invertScrollOrder; 91 bool m_invertScrollOrder;
91 }; 92 };
92 93
93 } // namespace blink 94 } // namespace blink
94 95
95 #endif // RootFrameViewport_h 96 #endif // RootFrameViewport_h
OLDNEW
« no previous file with comments | « Source/core/frame/PageScaleConstraintsSet.h ('k') | Source/core/frame/SubresourceIntegrity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698