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

Side by Side Diff: Source/web/ResizeViewportAnchor.h

Issue 1003323004: Turn ViewportAnchors into stack allocated objects. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/web/ResizeViewportAnchor.cpp » ('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 ResizeViewportAnchor_h 5 #ifndef ResizeViewportAnchor_h
6 #define ResizeViewportAnchor_h 6 #define ResizeViewportAnchor_h
7 7
8 #include "platform/geometry/FloatPoint.h" 8 #include "platform/geometry/FloatPoint.h"
9 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
10 #include "web/ViewportAnchor.h" 10 #include "web/ViewportAnchor.h"
11 11
12 namespace blink { 12 namespace blink {
13 13
14 class FrameView; 14 class FrameView;
15 class PinchViewport; 15 class PinchViewport;
16 16
17 // The resize anchor saves the current scroll offset of the visual viewport and 17 // The resize anchor saves the current scroll offset of the visual viewport and
18 // restores to that scroll offset so that document location appears exactly 18 // restores to that scroll offset so that document location appears exactly
19 // unchanged to the user. 19 // unchanged to the user.
20 class ResizeViewportAnchor : public ViewportAnchor { 20 class ResizeViewportAnchor : public ViewportAnchor {
21 STACK_ALLOCATED();
21 public: 22 public:
22 ResizeViewportAnchor(FrameView& rootFrameView, PinchViewport&); 23 ResizeViewportAnchor(FrameView& rootFrameView, PinchViewport&);
23 virtual ~ResizeViewportAnchor() { } 24 ~ResizeViewportAnchor();
24
25 virtual void setAnchor();
26 virtual void restoreToAnchor();
27 25
28 private: 26 private:
29 // Inner viewport origin in the reference frame of the root document, in CSS 27 // Inner viewport origin in the reference frame of the root document, in CSS
30 // pixels. 28 // pixels.
31 FloatPoint m_pinchViewportInDocument; 29 FloatPoint m_pinchViewportInDocument;
32 }; 30 };
33 31
34 } // namespace blink 32 } // namespace blink
35 33
36 #endif 34 #endif // ResizeViewportAnchor_h
OLDNEW
« no previous file with comments | « no previous file | Source/web/ResizeViewportAnchor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698