Commit 8a4cbc9
committed
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@main1 parent 58cfbf6 commit 8a4cbc9
File tree
4 files changed
+48
-0
lines changed- Source/WebKit/WebProcess/Plugins/PDF
- Tools/TestWebKitAPI
- Tests/WebKitCocoa
- cocoa
4 files changed
+48
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1580 | 1580 | | |
1581 | 1581 | | |
1582 | 1582 | | |
| 1583 | + | |
1583 | 1584 | | |
1584 | 1585 | | |
1585 | 1586 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
371 | 372 | | |
372 | 373 | | |
373 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
374 | 415 | | |
375 | 416 | | |
376 | 417 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| |||
0 commit comments