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

Unified Diff: Source/web/RotationViewportAnchor.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/ResizeViewportAnchor.cpp ('k') | Source/web/RotationViewportAnchor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/RotationViewportAnchor.h
diff --git a/Source/web/RotationViewportAnchor.h b/Source/web/RotationViewportAnchor.h
index a9cd52f7bd46459209f5c91bb66dc8d908b8a2e6..d0ffc827f2b419e2402cc4295f80a0d9ca62630b 100644
--- a/Source/web/RotationViewportAnchor.h
+++ b/Source/web/RotationViewportAnchor.h
@@ -11,7 +11,6 @@
#include "platform/geometry/LayoutRect.h"
#include "platform/heap/Handle.h"
#include "web/ViewportAnchor.h"
-#include "wtf/RefCounted.h"
namespace blink {
@@ -29,22 +28,18 @@ class PinchViewport;
// no node or it is lost during the resize, we fall back to the resize anchor
// logic.
class RotationViewportAnchor : public ViewportAnchor {
+ STACK_ALLOCATED();
public:
- RotationViewportAnchor(
- FrameView& rootFrameView,
- PinchViewport&,
- const FloatSize& anchorInInnerViewCoords,
- PageScaleConstraintsSet&);
- virtual ~RotationViewportAnchor() { }
-
- virtual void setAnchor();
- virtual void restoreToAnchor();
+ RotationViewportAnchor(FrameView& rootFrameView, PinchViewport&, const FloatSize& anchorInInnerViewCoords, PageScaleConstraintsSet&);
+ ~RotationViewportAnchor();
private:
+ void setAnchor();
+ void restoreToAnchor();
+
FloatPoint getInnerOrigin(const FloatSize& innerSize) const;
- void computeOrigins(const FloatSize& innerSize,
- IntPoint& mainFrameOffset, FloatPoint& pinchViewportOffset) const;
+ void computeOrigins(const FloatSize& innerSize, IntPoint& mainFrameOffset, FloatPoint& pinchViewportOffset) const;
float m_oldPageScaleFactor;
float m_oldMinimumPageScaleFactor;
@@ -56,7 +51,7 @@ private:
// normalized to the outer viewport size.
FloatSize m_normalizedPinchViewportOffset;
- RefPtrWillBePersistent<Node> m_anchorNode;
+ RefPtrWillBeMember<Node> m_anchorNode;
LayoutRect m_anchorNodeBounds;
FloatSize m_anchorInInnerViewCoords;
@@ -67,4 +62,4 @@ private:
} // namespace blink
-#endif
+#endif // RotationViewportAnchor_h
« no previous file with comments | « Source/web/ResizeViewportAnchor.cpp ('k') | Source/web/RotationViewportAnchor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698