Commit 561e38ff authored by joelhockey's avatar joelhockey Committed by Commit bot

Remove FrameView::Root

BUG=637460

Review-Url: https://codereview.chromium.org/2849383002
Cr-Commit-Position: refs/heads/master@{#468588}
parent bed8311f
...@@ -3848,13 +3848,6 @@ void FrameView::RemoveAnimatingScrollableArea(ScrollableArea* scrollable_area) { ...@@ -3848,13 +3848,6 @@ void FrameView::RemoveAnimatingScrollableArea(ScrollableArea* scrollable_area) {
animating_scrollable_areas_->erase(scrollable_area); animating_scrollable_areas_->erase(scrollable_area);
} }
FrameView* FrameView::Root() const {
const FrameView* top = this;
while (top->Parent())
top = ToFrameView(top->Parent());
return const_cast<FrameView*>(top);
}
void FrameView::SetParent(FrameViewBase* parent_frame_view_base) { void FrameView::SetParent(FrameViewBase* parent_frame_view_base) {
FrameView* parent = ToFrameView(parent_frame_view_base); FrameView* parent = ToFrameView(parent_frame_view_base);
if (parent == parent_) if (parent == parent_)
......
...@@ -498,7 +498,6 @@ class CORE_EXPORT FrameView final ...@@ -498,7 +498,6 @@ class CORE_EXPORT FrameView final
void SetSelfVisible(bool v) { self_visible_ = v; } void SetSelfVisible(bool v) { self_visible_ = v; }
void SetParent(FrameViewBase*) override; void SetParent(FrameViewBase*) override;
FrameViewBase* Parent() const override { return parent_; } FrameViewBase* Parent() const override { return parent_; }
FrameView* Root() const;
void RemoveChild(FrameViewBase*); void RemoveChild(FrameViewBase*);
void AddChild(FrameViewBase*); void AddChild(FrameViewBase*);
const ChildrenSet* Children() const { return &children_; } const ChildrenSet* Children() const { return &children_; }
......
...@@ -51,7 +51,7 @@ namespace { ...@@ -51,7 +51,7 @@ namespace {
float FrameScale(const FrameView* frame_view) { float FrameScale(const FrameView* frame_view) {
float scale = 1; float scale = 1;
if (frame_view) { if (frame_view) {
FrameView* root_view = frame_view->Root(); FrameView* root_view = frame_view->GetFrame().LocalFrameRoot()->View();
if (root_view) if (root_view)
scale = root_view->InputEventsScaleFactor(); scale = root_view->InputEventsScaleFactor();
} }
...@@ -64,7 +64,7 @@ FloatPoint FrameTranslation(const FrameView* frame_view) { ...@@ -64,7 +64,7 @@ FloatPoint FrameTranslation(const FrameView* frame_view) {
IntPoint visual_viewport; IntPoint visual_viewport;
FloatSize overscroll_offset; FloatSize overscroll_offset;
if (frame_view) { if (frame_view) {
FrameView* root_view = frame_view->Root(); FrameView* root_view = frame_view->GetFrame().LocalFrameRoot()->View();
if (root_view) { if (root_view) {
scale = root_view->InputEventsScaleFactor(); scale = root_view->InputEventsScaleFactor();
offset = FloatSize(root_view->InputEventsOffsetForEmulation()); offset = FloatSize(root_view->InputEventsOffsetForEmulation());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment