Commit cd698516 authored by Philip Rogers's avatar Philip Rogers Committed by Commit Bot

Remove deadcode from ScrollingCoordinator

This patch removes ScrollingCoordinator::IsForRootLayer as well as the
declaration for ComputeShouldHandleScrollGestureOnMainThreadRegion. This
patch also fixes some minor typos and removes some unnecessary includes.

Change-Id: I500d77e657fcc0bf86d029ed4a50b5d3b4628ad8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1866872
Auto-Submit: Philip Rogers <pdr@chromium.org>
Commit-Queue: David Bokan <bokan@chromium.org>
Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#707219}
parent fdee2705
......@@ -44,7 +44,6 @@
#include "third_party/blink/renderer/core/frame/page_scale_constraints_set.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/frame/visual_viewport.h"
#include "third_party/blink/renderer/core/html/html_frame_owner_element.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
#include "third_party/blink/renderer/core/page/page.h"
......@@ -616,18 +615,6 @@ void ScrollingCoordinator::FrameViewFixedObjectsDidChange(
frame_view->GetScrollingContext()->SetShouldScrollOnMainThreadIsDirty(true);
}
bool ScrollingCoordinator::IsForRootLayer(
ScrollableArea* scrollable_area) const {
if (!IsA<LocalFrame>(page_->MainFrame()))
return false;
// FIXME(305811): Refactor for OOPI.
if (auto* layout_view =
page_->DeprecatedLocalMainFrame()->View()->GetLayoutView())
return scrollable_area == layout_view->Layer()->GetScrollableArea();
return false;
}
bool ScrollingCoordinator::IsForMainFrame(
ScrollableArea* scrollable_area) const {
if (!IsA<LocalFrame>(page_->MainFrame()))
......
......@@ -31,10 +31,8 @@
#include "base/macros.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/scroll/scroll_types.h"
#include "third_party/blink/renderer/platform/geometry/int_rect.h"
#include "third_party/blink/renderer/platform/graphics/compositor_element_id.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace cc {
class AnimationHost;
......@@ -46,7 +44,6 @@ class CompositorAnimationTimeline;
class LocalFrame;
class LocalFrameView;
class Page;
class Region;
class ScrollableArea;
using MainThreadScrollingReasons = uint32_t;
......@@ -59,7 +56,6 @@ using ScrollbarId = uint64_t;
// It's responsible for propagating scroll offsets, main-thread scrolling
// reasons, touch action regions, and non-fast-scrollable regions into the
// compositor, as well as creating and managing scrollbar layers.
class CORE_EXPORT ScrollingCoordinator final
: public GarbageCollected<ScrollingCoordinator> {
public:
......@@ -108,7 +104,7 @@ class CORE_EXPORT ScrollingCoordinator final
void WillDestroyScrollableArea(ScrollableArea*);
// Udates scroll offset, if the appropriate composited layers exist,
// Updates scroll offset, if the appropriate composited layers exist,
// and if successful, returns true. Otherwise returns false.
bool UpdateCompositedScrollOffset(ScrollableArea* scrollable_area);
......@@ -126,21 +122,6 @@ class CORE_EXPORT ScrollingCoordinator final
// LocalFrame* must be a local root if non-null.
void TouchEventTargetRectsDidChange(LocalFrame*);
// Computes the NonFastScrollableRegions for the given local root frame. It
// outputs a separate region for areas that scroll with the viewport and
// those that are fixed to it since these regions will need to go on separate
// layers.
// |scrolling_region| is for rects that scroll with the main frame. Since
// they they will be stored on the root frame's scrolling contents layer,
// they must be specified in the root frame's document coordinates.
// |fixed_region| is for rects that are fixed to the main frame. Since they
// are stored on the visual viewport's scrolling contents layer, they must be
// specified in root frame coordinates.
void ComputeShouldHandleScrollGestureOnMainThreadRegion(
const LocalFrame*,
Region* scrolling_region,
Region* fixed_region) const;
void UpdateNonFastScrollableRegions(LocalFrame*);
void UpdateTouchEventTargetRectsIfNeeded(LocalFrame*);
......@@ -163,12 +144,11 @@ class CORE_EXPORT ScrollingCoordinator final
void Reset(LocalFrame*);
protected:
bool IsForRootLayer(ScrollableArea*) const;
bool IsForMainFrame(ScrollableArea*) const;
Member<Page> page_;
// Dirty flags used to idenfity what really needs to be computed after
// Dirty flags used to identify what really needs to be computed after
// compositing is updated.
bool touch_event_target_rects_are_dirty_;
bool should_scroll_on_main_thread_dirty_;
......
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