The only way to update the scrollbar's appearance is by hovering over it.
<rdar://problem/68953006>
Created attachment 413113 [details] Patch
Comment on attachment 413113 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413113&action=review > Source/WebCore/platform/ScrollableArea.cpp:370 > m_scrollbarOverlayStyle = overlayStyle; > + updateScrollbarOverlayStyle(); Can you only call updateScrollbarOverlayStyle() if it changed?
(In reply to Simon Fraser (smfr) from comment #3) > Comment on attachment 413113 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=413113&action=review > > > Source/WebCore/platform/ScrollableArea.cpp:370 > > m_scrollbarOverlayStyle = overlayStyle; > > + updateScrollbarOverlayStyle(); > > Can you only call updateScrollbarOverlayStyle() if it changed? I think it should be fine to make that change here, but it would be unrelated to the solution. Note that I've made RenderLayer::styleChanged unconditionally call updateScrollbarOverlayStyle(). This is because the scrollbar's overlay style is always ScrollbarOverlayStyleDefault (regardless of dark/light mode) and we need to call into `[NSScrollerImp setNeedsDisplay:]` to trigger the appearance change.
Comment on attachment 413113 [details] Patch r- because it invalidates scrollbars on every style change which will be a perf hit.
Created attachment 413237 [details] Patch
Comment on attachment 413237 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=413237&action=review > Source/WebCore/platform/ScrollableArea.cpp:384 > if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) auto > Source/WebCore/platform/ScrollableArea.cpp:390 > if (ScrollAnimator* scrollAnimator = existingScrollAnimator()) auto
Created attachment 413295 [details] Patch for landing
Created attachment 413301 [details] Patch for landing
Committed r269437: <https://trac.webkit.org/changeset/269437> All reviewed patches have been landed. Closing bug and clearing flags on attachment 413301 [details].