Commit 5750f230 authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Remove GetLocalFrameViewForAnimationScrolling.

Remove the virtual and collapse the implementation into the call site.

BUG=1097816

Change-Id: Iae31c2e778b72d18cc2a526ab2acb03e93e55e1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2536782
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatardanakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828540}
parent ee2531ef
......@@ -1440,8 +1440,19 @@ cc::LayerTreeHost* WebFrameWidgetBase::InitializeCompositing(
widget_base_->InitializeCompositing(
main_thread_scheduler, task_graph_runner, for_child_local_root_frame,
screen_info, std::move(ukm_recorder_factory), settings);
GetPage()->AnimationHostInitialized(*AnimationHost(),
GetLocalFrameViewForAnimationScrolling());
LocalFrameView* frame_view;
if (for_child_local_root_frame) {
frame_view = LocalRootImpl()->GetFrame()->View();
} else {
// Scrolling for the root frame is special we need to pass null indicating
// we are at the top of the tree when setting up the Animation. Which will
// cause ownership of the timeline and animation host.
// See ScrollingCoordinator::AnimationHostInitialized.
frame_view = nullptr;
}
GetPage()->AnimationHostInitialized(*AnimationHost(), frame_view);
return widget_base_->LayerTreeHost();
}
......
......@@ -49,7 +49,6 @@ class AnimationWorkletMutatorDispatcherImpl;
class FloatPoint;
class HitTestResult;
class HTMLPlugInElement;
class LocalFrameView;
class Page;
class PageWidgetEventHandler;
class PaintWorkletPaintDispatcher;
......@@ -690,11 +689,6 @@ class CORE_EXPORT WebFrameWidgetBase
// The fullscreen granted status from the most recent VisualProperties update.
bool IsFullscreenGranted();
// Return the LocalFrameView used for animation scrolling. This is overridden
// by WebViewFrameWidget and should eventually be removed once null does not
// need to be passed for the main frame.
virtual LocalFrameView* GetLocalFrameViewForAnimationScrolling() = 0;
void NotifyPageScaleFactorChanged(float page_scale_factor,
bool is_pinch_gesture_active);
......
......@@ -458,10 +458,6 @@ WebInputEventResult WebFrameWidgetImpl::HandleGestureEvent(
return event_result;
}
LocalFrameView* WebFrameWidgetImpl::GetLocalFrameViewForAnimationScrolling() {
return LocalRootImpl()->GetFrame()->View();
}
PaintLayerCompositor* WebFrameWidgetImpl::Compositor() const {
LocalFrame* frame = LocalRootImpl()->GetFrame();
if (!frame || !frame->GetDocument() || !frame->GetDocument()->GetLayoutView())
......
......@@ -126,8 +126,6 @@ class WebFrameWidgetImpl final : public WebFrameWidgetBase {
void HandleMouseLeave(LocalFrame&, const WebMouseEvent&) override;
WebInputEventResult HandleGestureEvent(const WebGestureEvent&) override;
LocalFrameView* GetLocalFrameViewForAnimationScrolling() override;
// Finds the parameters required for scrolling the focused editable |element|
// into view. |rect_to_scroll| is used for recursive scrolling of the element
// into view and contains all or part of element's bounding box and always
......
......@@ -319,14 +319,6 @@ WebInputEventResult WebViewFrameWidget::HandleGestureEvent(
return event_result;
}
LocalFrameView* WebViewFrameWidget::GetLocalFrameViewForAnimationScrolling() {
// Scrolling for the root frame is special we need to pass null indicating
// we are at the top of the tree when setting up the Animation. Which will
// cause ownership of the timeline and animation host.
// See ScrollingCoordinator::AnimationHostInitialized.
return nullptr;
}
void WebViewFrameWidget::SetAutoResizeMode(bool auto_resize,
const gfx::Size& min_window_size,
const gfx::Size& max_window_size,
......
......@@ -106,7 +106,6 @@ class CORE_EXPORT WebViewFrameWidget : public WebFrameWidgetBase {
void HandleMouseLeave(LocalFrame&, const WebMouseEvent&) override;
WebInputEventResult HandleGestureEvent(const WebGestureEvent&) override;
LocalFrameView* GetLocalFrameViewForAnimationScrolling() override;
void SetWindowRectSynchronously(const gfx::Rect& new_window_rect);
scoped_refptr<WebViewImpl> web_view_;
......
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