Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cc5fbc12b447d665a94dcda52727f944c3cd50c7
https://github.com/WebKit/WebKit/commit/cc5fbc12b447d665a94dcda52727f944c3cd50c7
Author: Abrar Rahman Protyasha <[email protected]>
Date: 2026-04-24 (Fri, 24 Apr 2026)
Changed paths:
M Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UnifiedPDFTests.mm
Log Message:
-----------
REGRESSION(306364@main): PDF scrollbar does not adapt to dark appearance
https://bugs.webkit.org/show_bug.cgi?id=313216
rdar://174763396
Reviewed by Aditya Keerthi.
In 306364@main, we taught the PDF plugin to be aware of the system's
effective appearance (and of its changes), but we forgot to plumb this
over to the scrollbar overlay style. Since the plugin's ScrollableArea
isn't a LocalFrameView - it doesn't participate in style recalculation
or compositing geometry updates in the same way a frame view for web
content does. That's why we explicitly wire it up in this patch.
Note that we limit this behavior change to full main frame PDF plugins
only, in the same manner that embedded PDFs were generally opted out of
appearance adaptations to begin with.
Test: TestWebKitAPI.UnifiedPDF.MainFramePDFScrollbarAdaptsToDarkMode
TestWebKitAPI.UnifiedPDF.EmbeddedPDFScrollbarDoesNotAdaptToDarkMode
* Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::dumpProperties const):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::layerForVerticalScrollbar const):
(WebKit::UnifiedPDFPlugin::scrollingMode const):
(WebKit::UnifiedPDFPlugin::isFullMainFramePlugin const):
(WebKit::UnifiedPDFPlugin::handleSyntheticClick):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UnifiedPDFTests.mm:
(TestWebKitAPI::UNIFIED_PDF_TEST):
(TestWebKitAPI::pluginScrollingNodeSubstring):
Canonical link: https://commits.webkit.org/311985@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications