Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8a4cbc9596bb210fdea652a512ff895ab86100ae
https://github.com/WebKit/WebKit/commit/8a4cbc9596bb210fdea652a512ff895ab86100ae
Author: Abrar Rahman Protyasha <[email protected]>
Date: 2026-02-27 (Fri, 27 Feb 2026)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm
M Tools/TestWebKitAPI/PlatformUtilities.h
M Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm
M Tools/TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm
Log Message:
-----------
REGRESSION(306364@main): Form fields in PDFs in dark mode are not readable
https://bugs.webkit.org/show_bug.cgi?id=308793
rdar://171198060
Reviewed by Richard Robinson.
After 306364@main, PDF annotation elements respect light/dark color
scheme, but we also respect the text annotation's font color. Since PDF
content is ordinarily for light mode, the prescribed annotation font
color is dark, which clashes with our text annotation's dark background
color (in dark mode).
To fix this issue, we simply opt out of dark mode adaptations for PDF
annotations.
Tests:
TestWebKitAPI.UnifiedPDF.TextAnnotationBackgroundColorDoesNotAdaptToColorScheme
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm:
(WebKit::PDFPluginBase::annotationStyle const):
* Tools/TestWebKitAPI/PlatformUtilities.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm:
(TestWebKitAPI::UNIFIED_PDF_TEST):
* Tools/TestWebKitAPI/cocoa/PlatformUtilitiesCocoa.mm:
(TestWebKitAPI::Util::toSTD):
Canonical link: https://commits.webkit.org/308330@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications