Skip to content

Commit

Permalink
[UI-side compositing] Cannot grab the scrubber to scroll to the end o…
Browse files Browse the repository at this point in the history
…f a long page (build log)

https://bugs.webkit.org/show_bug.cgi?id=259167
rdar://112154989

Reviewed by Simon Fraser.

After https://commits.webkit.org/265731@main removed NSScrollerImps in the web process, when
ScrollbarThemeMac::minimumThumbLength would query the scrollbar map, it wouldn't be able to
find the NSScrollerImp, so it would return 0. This resulted in users not being able to drag
the scrollbar. To resolve this, plumb the knobMinLength property to the web process, where it
is tracked by RemoteScrollbarsController.

* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::requestScrollToPosition):
(WebCore::AsyncScrollingCoordinator::scrollingTreeNodeScrollbarMinimumThumbLengthDidChange):
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h:
* Source/WebCore/page/scrolling/ScrollingTree.h:
(WebCore::ScrollingTree::scrollingTreeNodeScrollbarMinimumThumbLengthDidChange):
* Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::scrollbarMinimumThumbLengthDidChange):
* Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h:
* Source/WebCore/page/scrolling/mac/ScrollerMac.mm:
(WebCore::ScrollerMac::attach):
(WebCore::ScrollerMac::updateScrollbarStyle):
* Source/WebCore/platform/Scrollbar.cpp:
(WebCore::Scrollbar::minimumThumbLength const):
* Source/WebCore/platform/Scrollbar.h:
* Source/WebCore/platform/ScrollbarsController.h:
(WebCore::ScrollbarsController::setScrollbarMinimumThumbLength):
(WebCore::ScrollbarsController::minimumThumbLength):
* Source/WebCore/platform/mac/ScrollbarThemeMac.mm:
(WebCore::ScrollbarThemeMac::hasThumb):
(WebCore::ScrollbarThemeMac::minimumThumbLength):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeScrollbarMinimumThumbLengthDidChange):
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm:
(WebKit::RemoteScrollingTreeMac::scrollingTreeNodeScrollbarMinimumThumbLengthDidChange):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollbarsController.h:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollbarsController.mm:
(WebKit::RemoteScrollbarsController::setScrollbarMinimumThumbLength):
(WebKit::RemoteScrollbarsController::minimumThumbLength):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.h:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.messages.in:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::scrollingTreeNodeScrollbarMinimumThumbLengthDidChange):

Canonical link: https://commits.webkit.org/266124@main
  • Loading branch information
nmoucht committed Jul 18, 2023
1 parent 0728a2a commit 0f2ddd2
Show file tree
Hide file tree
Showing 21 changed files with 97 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Source/WebCore/page/LocalFrameView.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class LocalFrameView final : public FrameView {
WEBCORE_EXPORT TiledBacking* tiledBacking() const;

WEBCORE_EXPORT ScrollingNodeID scrollingNodeID() const override;
ScrollableArea* scrollableAreaForScrollingNodeID(ScrollingNodeID) const;
WEBCORE_EXPORT ScrollableArea* scrollableAreaForScrollingNodeID(ScrollingNodeID) const;
bool usesAsyncScrolling() const final;

WEBCORE_EXPORT void enterCompositingMode();
Expand Down
10 changes: 0 additions & 10 deletions Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1173,16 +1173,6 @@ bool AsyncScrollingCoordinator::scrollAnimatorEnabled() const
return settings.scrollAnimatorEnabled();
}

void AsyncScrollingCoordinator::scrollingTreeNodeScrollbarVisibilityDidChange(ScrollingNodeID nodeID, ScrollbarOrientation orientation, bool isVisible)
{
auto* frameView = frameViewForScrollingNode(nodeID);
if (!frameView)
return;

if (auto* scrollableArea = frameView->scrollableAreaForScrollingNodeID(nodeID))
scrollableArea->scrollbarsController().setScrollbarVisibilityState(orientation, isVisible);
}

} // namespace WebCore

#endif // ENABLE(ASYNC_SCROLLING)
4 changes: 1 addition & 3 deletions Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ class AsyncScrollingCoordinator : public ScrollingCoordinator {

WEBCORE_EXPORT void setMouseIsOverContentArea(ScrollableArea&, bool) override;
WEBCORE_EXPORT void setMouseMovedInContentArea(ScrollableArea&) override;
WEBCORE_EXPORT void scrollingTreeNodeScrollbarVisibilityDidChange(ScrollingNodeID, ScrollbarOrientation, bool);

protected:
WEBCORE_EXPORT AsyncScrollingCoordinator(Page*);
Expand All @@ -95,6 +94,7 @@ class AsyncScrollingCoordinator : public ScrollingCoordinator {
void scheduleRenderingUpdate();

bool eventTrackingRegionsDirty() const { return m_eventTrackingRegionsDirty; }
WEBCORE_EXPORT LocalFrameView* frameViewForScrollingNode(ScrollingNodeID) const;

private:
bool isAsyncScrollingCoordinator() const override { return true; }
Expand Down Expand Up @@ -173,8 +173,6 @@ class AsyncScrollingCoordinator : public ScrollingCoordinator {

WEBCORE_EXPORT void setMouseIsOverScrollbar(Scrollbar*, bool isOverScrollbar) override;

LocalFrameView* frameViewForScrollingNode(ScrollingNodeID) const;

void hysterisisTimerFired(PAL::HysteresisState);

std::unique_ptr<ScrollingStateTree> m_scrollingStateTree;
Expand Down
3 changes: 2 additions & 1 deletion Source/WebCore/page/scrolling/ScrollingTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ class ScrollingTree : public ThreadSafeRefCounted<ScrollingTree> {
WEBCORE_EXPORT Seconds frameDuration();
WEBCORE_EXPORT Seconds maxAllowableRenderingUpdateDurationForSynchronization();
WEBCORE_EXPORT virtual void scrollingTreeNodeScrollbarVisibilityDidChange(ScrollingNodeID, ScrollbarOrientation, bool) { };

WEBCORE_EXPORT virtual void scrollingTreeNodeScrollbarMinimumThumbLengthDidChange(WebCore::ScrollingNodeID, ScrollbarOrientation, int) { };

protected:
WEBCORE_EXPORT WheelEventHandlingResult handleWheelEventWithNode(const PlatformWheelEvent&, OptionSet<WheelEventProcessingSteps>, ScrollingTreeNode*, EventTargeting = EventTargeting::Propagate);

Expand Down
5 changes: 5 additions & 0 deletions Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,11 @@ void ScrollingTreeScrollingNode::scrollbarVisibilityDidChange(ScrollbarOrientati
scrollingTree().scrollingTreeNodeScrollbarVisibilityDidChange(scrollingNodeID(), orientation, isVisible);
}

void ScrollingTreeScrollingNode::scrollbarMinimumThumbLengthDidChange(ScrollbarOrientation orientation, int minimumThumbLength)
{
scrollingTree().scrollingTreeNodeScrollbarMinimumThumbLengthDidChange(scrollingNodeID(), orientation, minimumThumbLength);
}

} // namespace WebCore

#endif // ENABLE(ASYNC_SCROLLING)
1 change: 1 addition & 0 deletions Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class WEBCORE_EXPORT ScrollingTreeScrollingNode : public ScrollingTreeNode {
virtual String scrollbarStateForOrientation(ScrollbarOrientation) const { return ""_s; }

void scrollbarVisibilityDidChange(ScrollbarOrientation, bool);
void scrollbarMinimumThumbLengthDidChange(ScrollbarOrientation, int);

protected:
ScrollingTreeScrollingNode(ScrollingTree&, ScrollingNodeType, ScrollingNodeID);
Expand Down
4 changes: 3 additions & 1 deletion Source/WebCore/page/scrolling/mac/ScrollerMac.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ScrollerMac {

RetainPtr<NSScrollerImp> takeScrollerImp() { return std::exchange(m_scrollerImp, { }); }
NSScrollerImp *scrollerImp() { return m_scrollerImp.get(); }
void setScrollerImp(NSScrollerImp *imp) { m_scrollerImp = imp; }
void setScrollerImp(NSScrollerImp *imp);
void updateScrollbarStyle();
void updatePairScrollerImps();

Expand All @@ -70,8 +70,10 @@ class ScrollerMac {
void setLastKnownMousePositionInScrollbar(IntPoint position) { m_lastKnownMousePositionInScrollbar = position; }
IntPoint lastKnownMousePositionInScrollbar() const;
void visibilityChanged(bool);
void updateMinimumKnobLength(int);
void detach();
private:
int m_minimumKnobLength { 0 };
bool m_isVisible { false };
ScrollerPairMac& m_pair;
const ScrollbarOrientation m_orientation;
Expand Down
18 changes: 16 additions & 2 deletions Source/WebCore/page/scrolling/mac/ScrollerMac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ - (void)invalidate
void ScrollerMac::attach()
{
m_scrollerImpDelegate = adoptNS([[WebScrollerImpDelegateMac alloc] initWithScroller:this]);
m_scrollerImp = [NSScrollerImp scrollerImpWithStyle:nsScrollerStyle(m_pair.scrollbarStyle()) controlSize:nsControlSizeFromScrollbarWidth(m_pair.scrollbarWidthStyle()) horizontal:m_orientation == ScrollbarOrientation::Horizontal replacingScrollerImp:nil];
setScrollerImp([NSScrollerImp scrollerImpWithStyle:nsScrollerStyle(m_pair.scrollbarStyle()) controlSize:nsControlSizeFromScrollbarWidth(m_pair.scrollbarWidthStyle()) horizontal:m_orientation == ScrollbarOrientation::Horizontal replacingScrollerImp:nil]);
[m_scrollerImp setDelegate:m_scrollerImpDelegate.get()];
}

Expand Down Expand Up @@ -369,7 +369,7 @@ - (void)invalidate

void ScrollerMac::updateScrollbarStyle()
{
m_scrollerImp = [NSScrollerImp scrollerImpWithStyle:nsScrollerStyle(m_pair.scrollbarStyle()) controlSize:nsControlSizeFromScrollbarWidth(m_pair.scrollbarWidthStyle()) horizontal:m_orientation == ScrollbarOrientation::Horizontal replacingScrollerImp:takeScrollerImp().get()];
setScrollerImp([NSScrollerImp scrollerImpWithStyle:nsScrollerStyle(m_pair.scrollbarStyle()) controlSize:nsControlSizeFromScrollbarWidth(m_pair.scrollbarWidthStyle()) horizontal:m_orientation == ScrollbarOrientation::Horizontal replacingScrollerImp:takeScrollerImp().get()]);
updatePairScrollerImps();
}

Expand Down Expand Up @@ -427,6 +427,20 @@ - (void)invalidate
m_pair.node().scrollbarVisibilityDidChange(m_orientation, isVisible);
}

void ScrollerMac::updateMinimumKnobLength(int minimumKnobLength)
{
if (m_minimumKnobLength == minimumKnobLength)
return;
m_minimumKnobLength = minimumKnobLength;
m_pair.node().scrollbarMinimumThumbLengthDidChange(m_orientation, m_minimumKnobLength);
}

void ScrollerMac::setScrollerImp(NSScrollerImp *imp)
{
m_scrollerImp = imp;
updateMinimumKnobLength([m_scrollerImp knobMinLength]);
}

String ScrollerMac::scrollbarState() const
{
if (!m_hostLayer || !m_scrollerImp)
Expand Down
5 changes: 5 additions & 0 deletions Source/WebCore/platform/Scrollbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,4 +533,9 @@ bool Scrollbar::shouldRegisterScrollbar() const
return m_scrollableArea.scrollbarsController().shouldRegisterScrollbars();
}

int Scrollbar::minimumThumbLength() const
{
return m_scrollableArea.scrollbarsController().minimumThumbLength(m_orientation);
}

} // namespace WebCore
1 change: 1 addition & 0 deletions Source/WebCore/platform/Scrollbar.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class Scrollbar : public Widget {
float deviceScaleFactor() const;

bool shouldRegisterScrollbar() const;
int minimumThumbLength() const;

protected:
Scrollbar(ScrollableArea&, ScrollbarOrientation, ScrollbarWidth, ScrollbarTheme* = nullptr, bool isCustomScrollbar = false);
Expand Down
3 changes: 3 additions & 0 deletions Source/WebCore/platform/ScrollbarsController.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ class ScrollbarsController {
WEBCORE_EXPORT virtual bool shouldDrawIntoScrollbarLayer(Scrollbar&) const { return true; }
WEBCORE_EXPORT virtual bool shouldRegisterScrollbars() const { return true; }

WEBCORE_EXPORT virtual void setScrollbarMinimumThumbLength(WebCore::ScrollbarOrientation, int) { }
WEBCORE_EXPORT virtual int minimumThumbLength(WebCore::ScrollbarOrientation) { return 0; }

private:
ScrollableArea& m_scrollableArea;
bool m_scrollbarAnimationsUnsuspendedByUserInteraction { true };
Expand Down
9 changes: 6 additions & 3 deletions Source/WebCore/platform/mac/ScrollbarThemeMac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,12 @@ static IntRect buttonRepaintRect(const IntRect& buttonRect, ScrollbarOrientation

int ScrollbarThemeMac::minimumThumbLength(Scrollbar& scrollbar)
{
BEGIN_BLOCK_OBJC_EXCEPTIONS
return [scrollbarMap().get(&scrollbar) knobMinLength];
END_BLOCK_OBJC_EXCEPTIONS
if (scrollbar.shouldRegisterScrollbar()) {
BEGIN_BLOCK_OBJC_EXCEPTIONS
return [scrollbarMap().get(&scrollbar) knobMinLength];
END_BLOCK_OBJC_EXCEPTIONS
} else
return scrollbar.minimumThumbLength();
}

static bool shouldCenterOnThumb(const PlatformMouseEvent& evt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,11 @@ void RemoteScrollingCoordinatorProxy::scrollingTreeNodeScrollbarVisibilityDidCha
m_webPageProxy.send(Messages::RemoteScrollingCoordinator::ScrollingTreeNodeScrollbarVisibilityDidChange(nodeID, orientation, isVisible));
}

void RemoteScrollingCoordinatorProxy::scrollingTreeNodeScrollbarMinimumThumbLengthDidChange(WebCore::ScrollingNodeID nodeID, ScrollbarOrientation orientation, int minimumThumbLength)
{
m_webPageProxy.send(Messages::RemoteScrollingCoordinator::ScrollingTreeNodeScrollbarMinimumThumbLengthDidChange(nodeID, orientation, minimumThumbLength));
}

} // namespace WebKit

#endif // ENABLE(UI_SIDE_COMPOSITING)
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class RemoteScrollingCoordinatorProxy : public CanMakeWeakPtr<RemoteScrollingCoo
void sendScrollingTreeNodeDidScroll();

void scrollingTreeNodeScrollbarVisibilityDidChange(WebCore::ScrollingNodeID, WebCore::ScrollbarOrientation, bool);
void scrollingTreeNodeScrollbarMinimumThumbLengthDidChange(WebCore::ScrollingNodeID, WebCore::ScrollbarOrientation, int);

protected:
RemoteScrollingTree* scrollingTree() const { return m_scrollingTree.get(); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class RemoteScrollingTreeMac final : public RemoteScrollingTree {
virtual ~RemoteScrollingTreeMac();

void scrollingTreeNodeScrollbarVisibilityDidChange(WebCore::ScrollingNodeID, ScrollbarOrientation, bool) override;
void scrollingTreeNodeScrollbarMinimumThumbLengthDidChange(WebCore::ScrollingNodeID, ScrollbarOrientation, int) override;

private:
void handleWheelEventPhase(WebCore::ScrollingNodeID, WebCore::PlatformWheelEventPhase) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,14 @@ static bool layerEventRegionContainsPoint(CALayer *layer, CGPoint localPoint)
});
}

void RemoteScrollingTreeMac::scrollingTreeNodeScrollbarMinimumThumbLengthDidChange(ScrollingNodeID nodeID, ScrollbarOrientation orientation, int minimumThumbLength)
{
RunLoop::main().dispatch([strongThis = Ref { *this }, nodeID, orientation, minimumThumbLength] {
if (auto* scrollingCoordinatorProxy = strongThis->scrollingCoordinatorProxy())
scrollingCoordinatorProxy->scrollingTreeNodeScrollbarMinimumThumbLengthDidChange(nodeID, orientation, minimumThumbLength);
});
}

} // namespace WebKit

#endif // PLATFORM(MAC) && ENABLE(UI_SIDE_COMPOSITING)
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,18 @@ class RemoteScrollbarsController final : public WebCore::ScrollbarsController {
void mouseExitedScrollbar(WebCore::Scrollbar*) const final;
bool shouldScrollbarParticipateInHitTesting(WebCore::Scrollbar*) final;

void setScrollbarMinimumThumbLength(WebCore::ScrollbarOrientation, int) final;
void setScrollbarVisibilityState(WebCore::ScrollbarOrientation, bool) final;
bool shouldDrawIntoScrollbarLayer(WebCore::Scrollbar&) const final;
bool shouldRegisterScrollbars() const final { return scrollableArea().isListBox(); }
int minimumThumbLength(WebCore::ScrollbarOrientation) final;

private:
bool m_horizontalOverlayScrollbarIsVisible { false };
bool m_verticalOverlayScrollbarIsVisible { false };

int m_horizontalMinimumThumbLength { 0 };
int m_verticalMinimumThumbLength { 0 };
ThreadSafeWeakPtr<WebCore::ScrollingCoordinator> m_coordinator;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,18 @@
return scrollbar.isCustomScrollbar() || scrollbar.isMockScrollbar();
}

void RemoteScrollbarsController::setScrollbarMinimumThumbLength(WebCore::ScrollbarOrientation orientation, int minimumThumbLength)
{
if (orientation == WebCore::ScrollbarOrientation::Horizontal)
m_horizontalMinimumThumbLength = minimumThumbLength;
else
m_verticalMinimumThumbLength = minimumThumbLength;
}

int RemoteScrollbarsController::minimumThumbLength(WebCore::ScrollbarOrientation orientation)
{
return orientation == WebCore::ScrollbarOrientation::Horizontal ? m_horizontalMinimumThumbLength : m_verticalMinimumThumbLength;
}

}
#endif // PLATFORM(MAC)
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class RemoteScrollingCoordinator final : public WebCore::AsyncScrollingCoordinat
void startDeferringScrollingTestCompletionForNode(WebCore::ScrollingNodeID, WebCore::WheelEventTestMonitor::DeferReason);
void stopDeferringScrollingTestCompletionForNode(WebCore::ScrollingNodeID, WebCore::WheelEventTestMonitor::DeferReason);
void scrollingTreeNodeScrollbarVisibilityDidChange(WebCore::ScrollingNodeID, WebCore::ScrollbarOrientation, bool);
void scrollingTreeNodeScrollbarMinimumThumbLengthDidChange(WebCore::ScrollingNodeID nodeID, WebCore::ScrollbarOrientation orientation, int minimumThumbLength);

WebCore::WheelEventHandlingResult handleWheelEventForScrolling(const WebCore::PlatformWheelEvent&, WebCore::ScrollingNodeID, std::optional<WebCore::WheelScrollGestureState>) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ messages -> RemoteScrollingCoordinator {
StartDeferringScrollingTestCompletionForNode(uint64_t nodeID, WebCore::WheelEventTestMonitor::DeferReason reason);
StopDeferringScrollingTestCompletionForNode(uint64_t nodeID, WebCore::WheelEventTestMonitor::DeferReason reason);
ScrollingTreeNodeScrollbarVisibilityDidChange(uint64_t nodeID, enum:uint8_t WebCore::ScrollbarOrientation orientation, bool isVisible);
ScrollingTreeNodeScrollbarMinimumThumbLengthDidChange(uint64_t nodeID, enum:uint8_t WebCore::ScrollbarOrientation orientation, int minimumThumbLength);
}

#endif // ENABLE(ASYNC_SCROLLING)
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#import <WebCore/Page.h>
#import <WebCore/RenderLayerCompositor.h>
#import <WebCore/RenderView.h>
#import <WebCore/ScrollbarsController.h>
#import <WebCore/ScrollingStateFrameScrollingNode.h>
#import <WebCore/ScrollingTreeFixedNodeCocoa.h>
#import <WebCore/ScrollingTreeStickyNodeCocoa.h>
Expand Down Expand Up @@ -186,9 +187,24 @@
return WheelEventHandlingResult::handled();
}

void RemoteScrollingCoordinator::scrollingTreeNodeScrollbarVisibilityDidChange(ScrollingNodeID nodeID, WebCore::ScrollbarOrientation orientation, bool isVisible)
void RemoteScrollingCoordinator::scrollingTreeNodeScrollbarVisibilityDidChange(ScrollingNodeID nodeID, ScrollbarOrientation orientation, bool isVisible)
{
AsyncScrollingCoordinator::scrollingTreeNodeScrollbarVisibilityDidChange(nodeID, orientation, isVisible);
auto* frameView = frameViewForScrollingNode(nodeID);
if (!frameView)
return;

if (auto* scrollableArea = frameView->scrollableAreaForScrollingNodeID(nodeID))
scrollableArea->scrollbarsController().setScrollbarVisibilityState(orientation, isVisible);
}

void RemoteScrollingCoordinator::scrollingTreeNodeScrollbarMinimumThumbLengthDidChange(ScrollingNodeID nodeID, ScrollbarOrientation orientation, int minimumThumbLength)
{
auto* frameView = frameViewForScrollingNode(nodeID);
if (!frameView)
return;

if (auto* scrollableArea = frameView->scrollableAreaForScrollingNodeID(nodeID))
scrollableArea->scrollbarsController().setScrollbarMinimumThumbLength(orientation, minimumThumbLength);
}

} // namespace WebKit
Expand Down

0 comments on commit 0f2ddd2

Please sign in to comment.