RESOLVED FIXED 186472
Link drag image is inconsistently unreadable in dark mode
https://bugs.webkit.org/show_bug.cgi?id=186472
Summary Link drag image is inconsistently unreadable in dark mode
Tim Horton
Reported 2018-06-10 02:35:21 PDT
Link drag image is inconsistently unreadable in dark mode
Attachments
Patch (6.67 KB, patch)
2018-06-10 02:35 PDT, Tim Horton
no flags
Archive of layout-test-results from ews201 for win-future (12.73 MB, application/zip)
2018-06-10 04:23 PDT, EWS Watchlist
no flags
Tim Horton
Comment 1 2018-06-10 02:35:39 PDT
EWS Watchlist
Comment 2 2018-06-10 04:23:48 PDT
Comment on attachment 342382 [details] Patch Attachment 342382 [details] did not pass win-ews (win): Output: http://webkit-queues.webkit.org/results/8110746 New failing tests: http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
EWS Watchlist
Comment 3 2018-06-10 04:23:59 PDT
Created attachment 342383 [details] Archive of layout-test-results from ews201 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews201 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Megan Gardner
Comment 4 2018-06-11 07:05:51 PDT
Comment on attachment 342382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=342382&action=review I’m nervous about just removing the check in default appearance. Can we write a test for this? > Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:5019 > NSAppearanceName appearance = [[m_view effectiveAppearance] bestMatchFromAppearancesWithNames:@[ NSAppearanceNameAqua, NSAppearanceNameDarkAqua ]]; Are we sure that we can do this without leaking dark mode to parts where we are sure we *don’t* want it to be used? > Source/WebKitLegacy/mac/WebView/WebView.mm:5281 > NSAppearanceName appearance = [[self effectiveAppearance] bestMatchFromAppearancesWithNames:@[ NSAppearanceNameAqua, NSAppearanceNameDarkAqua ]]; Ditto
Timothy Hatcher
Comment 5 2018-06-11 09:53:04 PDT
Comment on attachment 342382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=342382&action=review > Source/WebCore/platform/mac/DragImageMac.mm:306 > + LocalDefaultSystemAppearance localAppearance(true, page ? page->defaultAppearance() : true); We need a better way to allow getting the true effective appearance for places like this that need it. This does not feel right as-is, considering the changes to defaultAppearance(). >> Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:5019 >> NSAppearanceName appearance = [[m_view effectiveAppearance] bestMatchFromAppearancesWithNames:@[ NSAppearanceNameAqua, NSAppearanceNameDarkAqua ]]; > > Are we sure that we can do this without leaking dark mode to parts where we are sure we *don’t* want it to be used? Megan is right, we cannot do this here. It will cause Safari to use dark mode colors and form controls for pages.
Timothy Hatcher
Comment 6 2018-06-11 09:56:29 PDT
Comment on attachment 342382 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=342382&action=review >> Source/WebCore/platform/mac/DragImageMac.mm:306 >> + LocalDefaultSystemAppearance localAppearance(true, page ? page->defaultAppearance() : true); > > We need a better way to allow getting the true effective appearance for places like this that need it. This does not feel right as-is, considering the changes to defaultAppearance(). I think this is fine now. Sorry for the confusion. I think I want to make a patch that flips defaultAppearance to be prefersDarkInterface, so it is easier to read everywhere. >>> Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:5019 >>> NSAppearanceName appearance = [[m_view effectiveAppearance] bestMatchFromAppearancesWithNames:@[ NSAppearanceNameAqua, NSAppearanceNameDarkAqua ]]; >> >> Are we sure that we can do this without leaking dark mode to parts where we are sure we *don’t* want it to be used? > > Megan is right, we cannot do this here. It will cause Safari to use dark mode colors and form controls for pages. Actually, I think this is fine now! I forgot LocalDefaultSystemAppearance now checks for both useSystemAppearance and useDefaultAppearance. In the Safari case, useSystemAppearance will still be false.
Tim Horton
Comment 7 2018-06-11 12:14:12 PDT
(In reply to Timothy Hatcher from comment #6) > Comment on attachment 342382 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=342382&action=review > > >> Source/WebCore/platform/mac/DragImageMac.mm:306 > >> + LocalDefaultSystemAppearance localAppearance(true, page ? page->defaultAppearance() : true); > > > > We need a better way to allow getting the true effective appearance for places like this that need it. This does not feel right as-is, considering the changes to defaultAppearance(). > > I think this is fine now. Sorry for the confusion. I think I want to make a > patch that flips defaultAppearance to be prefersDarkInterface, so it is > easier to read everywhere. Yes please! > >>> Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm:5019 > >>> NSAppearanceName appearance = [[m_view effectiveAppearance] bestMatchFromAppearancesWithNames:@[ NSAppearanceNameAqua, NSAppearanceNameDarkAqua ]]; > >> > >> Are we sure that we can do this without leaking dark mode to parts where we are sure we *don’t* want it to be used? > > > > Megan is right, we cannot do this here. It will cause Safari to use dark mode colors and form controls for pages. > > Actually, I think this is fine now! I forgot LocalDefaultSystemAppearance > now checks for both useSystemAppearance and useDefaultAppearance. In the > Safari case, useSystemAppearance will still be false. Yeah, that’s what I was banking on. OK!
WebKit Commit Bot
Comment 8 2018-06-11 14:06:57 PDT
Comment on attachment 342382 [details] Patch Clearing flags on attachment: 342382 Committed r232731: <https://trac.webkit.org/changeset/232731>
WebKit Commit Bot
Comment 9 2018-06-11 14:06:59 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10 2018-06-11 14:08:19 PDT
Note You need to log in before you can comment on or make changes to this bug.