Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 003e0fd9799fd84d392a22db6bcf7f4c2f8ddf0d
      
https://github.com/WebKit/WebKit/commit/003e0fd9799fd84d392a22db6bcf7f4c2f8ddf0d
  Author: Simon Fraser <[email protected]>
  Date:   2023-05-30 (Tue, 30 May 2023)

  Changed paths:
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebCore/page/LocalFrameView.h
    M Source/WebCore/platform/ScrollableArea.cpp
    M Source/WebCore/platform/ScrollableArea.h
    M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
    M Source/WebCore/rendering/RenderLayerScrollableArea.h

  Log Message:
  -----------
  REGRESSION (262176@main): Don't recreate the ScrollbarsController every time 
we add a scrollbar
https://bugs.webkit.org/show_bug.cgi?id=257399
rdar://109909019

Reviewed by Tim Nguyen.

Rather than calling setScrollbarsController() on every call to 
LocalFrameView::didAddScrollbar(),
refactor the factory functions so that the clients (LocalFrameView and. 
RenderLayerScrollableArea)
can make the right kind of ScrollbarsController via a virtual function, and 
only call this
factory function once.

This also ensures that we make a ScrollbarsControllerMock when we need to, for 
testing.

* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::createScrollbarsController):
(WebCore::LocalFrameView::didAddScrollbar):
* Source/WebCore/page/LocalFrameView.h:
* Source/WebCore/platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::scrollbarsController const):
(WebCore::ScrollableArea::internalCreateScrollbarsController):
(WebCore::ScrollableArea::createScrollbarsController):
* Source/WebCore/platform/ScrollableArea.h:
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::createScrollbarsController):
(WebCore::RenderLayerScrollableArea::createScrollbar):
* Source/WebCore/rendering/RenderLayerScrollableArea.h:

Canonical link: https://commits.webkit.org/264690@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to