#include "third_party/blink/renderer/core/frame/rotation_viewport_anchor.h"
#include "third_party/blink/renderer/core/dom/container_node.h"
#include "third_party/blink/renderer/core/dom/node.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/page_scale_constraints_set.h"
#include "third_party/blink/renderer/core/frame/root_frame_viewport.h"
#include "third_party/blink/renderer/core/frame/visual_viewport.h"
#include "third_party/blink/renderer/core/input/event_handler.h"
#include "third_party/blink/renderer/core/layout/hit_test_result.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "ui/gfx/geometry/point_conversions.h"
#include "ui/gfx/geometry/vector2d_conversions.h"
namespace blink {
namespace {
static const float kViewportAnchorRelativeEpsilon = …;
static const int kViewportToNodeMaxRelativeArea = …;
Node* FindNonEmptyAnchorNode(const gfx::PointF& absolute_point,
const gfx::Rect& view_rect,
EventHandler& event_handler) { … }
void MoveToEncloseRect(gfx::Rect& outer, const gfx::RectF& inner) { … }
void MoveIntoRect(gfx::RectF& inner, const gfx::Rect& outer) { … }
}
RotationViewportAnchor::RotationViewportAnchor(
LocalFrameView& root_frame_view,
VisualViewport& visual_viewport,
const gfx::PointF& anchor_in_inner_view_coords,
PageScaleConstraintsSet& page_scale_constraints_set)
: … { … }
RotationViewportAnchor::~RotationViewportAnchor() { … }
void RotationViewportAnchor::SetAnchor() { … }
void RotationViewportAnchor::RestoreToAnchor() { … }
ScrollableArea& RotationViewportAnchor::LayoutViewport() const { … }
void RotationViewportAnchor::ComputeOrigins(
const gfx::SizeF& inner_size,
gfx::Point& main_frame_origin,
gfx::PointF& visual_viewport_origin) const { … }
gfx::PointF RotationViewportAnchor::GetInnerOrigin(
const gfx::SizeF& inner_size) const { … }
}