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

Unified Diff: third_party/WebKit/Source/web/ResizeViewportAnchor.h

Issue 2837503002: Move (Resize|Rotation)ViewportAnchor.* from web/ to core/frame/. (Closed)
Patch Set: Created 3 years, 8 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 | « third_party/WebKit/Source/web/BUILD.gn ('k') | third_party/WebKit/Source/web/ResizeViewportAnchor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/ResizeViewportAnchor.h
diff --git a/third_party/WebKit/Source/web/ResizeViewportAnchor.h b/third_party/WebKit/Source/web/ResizeViewportAnchor.h
deleted file mode 100644
index 038e41b30195b17c6da63e89a5d3607f1c0ab932..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/web/ResizeViewportAnchor.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ResizeViewportAnchor_h
-#define ResizeViewportAnchor_h
-
-#include "core/page/Page.h"
-#include "platform/heap/Handle.h"
-#include "platform/scroll/ScrollTypes.h"
-
-namespace blink {
-
-class FrameView;
-
-// This class scrolls the viewports to compensate for bounds clamping caused by
-// viewport size changes.
-//
-// It is needed when the layout viewport grows (causing its own scroll position
-// to be clamped) and also when it shrinks (causing the visual viewport's scroll
-// position to be clamped).
-class ResizeViewportAnchor final
- : public GarbageCollected<ResizeViewportAnchor> {
- WTF_MAKE_NONCOPYABLE(ResizeViewportAnchor);
-
- public:
- ResizeViewportAnchor(Page& page) : page_(page), scope_count_(0) {}
-
- class ResizeScope {
- STACK_ALLOCATED();
-
- public:
- explicit ResizeScope(ResizeViewportAnchor& anchor) : anchor_(anchor) {
- anchor_->BeginScope();
- }
- ~ResizeScope() { anchor_->EndScope(); }
-
- private:
- Member<ResizeViewportAnchor> anchor_;
- };
-
- void ResizeFrameView(IntSize);
-
- DEFINE_INLINE_TRACE() { visitor->Trace(page_); }
-
- private:
- void BeginScope() { scope_count_++; }
- void EndScope();
- FrameView* RootFrameView();
-
- // The amount of resize-induced clamping drift accumulated during the
- // ResizeScope. Note that this should NOT include other kinds of scrolling
- // that may occur during layout, such as from ScrollAnchor.
- ScrollOffset drift_;
- Member<Page> page_;
- int scope_count_;
-};
-
-} // namespace blink
-
-#endif // ResizeViewportAnchor_h
« no previous file with comments | « third_party/WebKit/Source/web/BUILD.gn ('k') | third_party/WebKit/Source/web/ResizeViewportAnchor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698