RESOLVED FIXED 191607
Default the view background color and text color to different values when in dark mode
https://bugs.webkit.org/show_bug.cgi?id=191607
Summary Default the view background color and text color to different values when in ...
Timothy Hatcher
Reported 2018-11-13 16:06:45 PST
The view background color should not be white. And the text color should not be black. They should be [NSColor controlBackgroundColor] and [NSColor textColor].
Attachments
Patch (17.62 KB, patch)
2018-11-13 16:24 PST, Timothy Hatcher
no flags
Patch (18.64 KB, patch)
2018-11-13 17:55 PST, Timothy Hatcher
no flags
Patch (19.10 KB, patch)
2018-11-13 17:57 PST, Timothy Hatcher
no flags
Archive of layout-test-results from ews101 for mac-sierra (1.09 MB, application/zip)
2018-11-13 19:05 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews116 for mac-sierra (1.71 MB, application/zip)
2018-11-13 20:45 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews104 for mac-sierra-wk2 (1.07 MB, application/zip)
2018-11-13 21:28 PST, EWS Watchlist
no flags
Patch (23.77 KB, patch)
2018-11-13 23:46 PST, Timothy Hatcher
no flags
Patch (23.77 KB, patch)
2018-11-13 23:58 PST, Timothy Hatcher
no flags
Archive of layout-test-results from ews103 for mac-sierra (3.28 MB, application/zip)
2018-11-14 01:11 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews116 for mac-sierra (4.47 MB, application/zip)
2018-11-14 01:59 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews107 for mac-sierra-wk2 (4.08 MB, application/zip)
2018-11-14 07:43 PST, EWS Watchlist
no flags
Patch (31.42 KB, patch)
2018-11-14 10:01 PST, Timothy Hatcher
no flags
Patch (33.26 KB, patch)
2018-11-14 10:41 PST, Timothy Hatcher
no flags
Patch (34.10 KB, patch)
2018-11-14 10:44 PST, Timothy Hatcher
no flags
Failing test (also on shipping Safari) (58.45 KB, image/png)
2018-11-14 10:47 PST, zalan
no flags
Radar WebKit Bug Importer
Comment 1 2018-11-13 16:07:08 PST
Timothy Hatcher
Comment 2 2018-11-13 16:24:27 PST Comment hidden (obsolete)
Simon Fraser (smfr)
Comment 3 2018-11-13 16:38:42 PST
Comment on attachment 354724 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=354724&action=review > Source/WebCore/css/html.css:41 > + color: text; Is this still black in light mode? Also weird that we do something in the UA stylesheet which there is no standard way for authors to do in their pages. > Source/WebCore/page/FrameView.cpp:3005 > + Color backgroundColor = transparent ? Color::transparent : RenderTheme::singleton().systemColor(CSSValueAppleSystemControlBackground, styleColorOptions()); What's the value of CSSValueAppleSystemControlBackground in light mode? White, or are you affecting the default background color?
Timothy Hatcher
Comment 4 2018-11-13 16:39:52 PST
Comment on attachment 354724 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=354724&action=review >> Source/WebCore/css/html.css:41 >> + color: text; > > Is this still black in light mode? > > Also weird that we do something in the UA stylesheet which there is no standard way for authors to do in their pages. Yes, it is black in light mode. Test checks that. >> Source/WebCore/page/FrameView.cpp:3005 >> + Color backgroundColor = transparent ? Color::transparent : RenderTheme::singleton().systemColor(CSSValueAppleSystemControlBackground, styleColorOptions()); > > What's the value of CSSValueAppleSystemControlBackground in light mode? White, or are you affecting the default background color? It is pure white in light mode. Test checks that.
Timothy Hatcher
Comment 5 2018-11-13 17:55:48 PST Comment hidden (obsolete)
Timothy Hatcher
Comment 6 2018-11-13 17:57:49 PST Comment hidden (obsolete)
EWS Watchlist
Comment 7 2018-11-13 19:05:31 PST Comment hidden (obsolete)
EWS Watchlist
Comment 8 2018-11-13 19:05:33 PST Comment hidden (obsolete)
EWS Watchlist
Comment 9 2018-11-13 20:45:01 PST Comment hidden (obsolete)
EWS Watchlist
Comment 10 2018-11-13 20:45:03 PST Comment hidden (obsolete)
EWS Watchlist
Comment 11 2018-11-13 21:28:46 PST Comment hidden (obsolete)
EWS Watchlist
Comment 12 2018-11-13 21:28:47 PST Comment hidden (obsolete)
Timothy Hatcher
Comment 13 2018-11-13 23:46:43 PST Comment hidden (obsolete)
Timothy Hatcher
Comment 14 2018-11-13 23:58:17 PST Comment hidden (obsolete)
EWS Watchlist
Comment 15 2018-11-14 01:11:05 PST Comment hidden (obsolete)
EWS Watchlist
Comment 16 2018-11-14 01:11:07 PST Comment hidden (obsolete)
EWS Watchlist
Comment 17 2018-11-14 01:59:34 PST Comment hidden (obsolete)
EWS Watchlist
Comment 18 2018-11-14 01:59:36 PST Comment hidden (obsolete)
EWS Watchlist
Comment 19 2018-11-14 07:43:27 PST Comment hidden (obsolete)
EWS Watchlist
Comment 20 2018-11-14 07:43:29 PST Comment hidden (obsolete)
Timothy Hatcher
Comment 21 2018-11-14 10:01:10 PST Comment hidden (obsolete)
Timothy Hatcher
Comment 22 2018-11-14 10:41:48 PST Comment hidden (obsolete)
Timothy Hatcher
Comment 23 2018-11-14 10:44:10 PST
zalan
Comment 24 2018-11-14 10:47:41 PST
Created attachment 354835 [details] Failing test (also on shipping Safari) The test actually fails already on shipping Safari.
Simon Fraser (smfr)
Comment 25 2018-11-14 11:53:32 PST
Comment on attachment 354834 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=354834&action=review > Source/WebCore/css/html.css:29 > + color: text; Does this mean that our default text color is now semantic, and will not get color-filter applied?
Timothy Hatcher
Comment 26 2018-11-14 12:31:09 PST
Comment on attachment 354834 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=354834&action=review >> Source/WebCore/css/html.css:29 >> + color: text; > > Does this mean that our default text color is now semantic, and will not get color-filter applied? Yes. The color-filter skips it, but it still auto switches with light and dark mode — yielding the same white text as the Mail color-filter.
WebKit Commit Bot
Comment 27 2018-11-14 17:48:30 PST
Comment on attachment 354834 [details] Patch Clearing flags on attachment: 354834 Committed r238212: <https://trac.webkit.org/changeset/238212>
WebKit Commit Bot
Comment 28 2018-11-14 17:48:32 PST
All reviewed patches have been landed. Closing bug.
Truitt Savell
Comment 29 2018-11-15 08:22:00 PST
Looks like https://trac.webkit.org/changeset/238212/webkit has caused two API failures on MacOS build: https://build.webkit.org/builders/Apple%20Sierra%20Release%20WK2%20%28Tests%29/builds/12799 Failed TestWebKitAPI.WebKit.BackgroundColorNil /Volumes/Data/slave/sierra-release/build/Tools/TestWebKitAPI/Tests/mac/BackgroundColor.mm:77 Expected equality of these values: CGColorGetConstantColor(kCGColorWhite) Which is: 0x7f922871dee0 [webView layer].backgroundColor Which is: 0x7f9228530400 TestWebKitAPI.WebKit.BackgroundColorDefault /Volumes/Data/slave/sierra-release/build/Tools/TestWebKitAPI/Tests/mac/BackgroundColor.mm:47 Expected equality of these values: CGColorGetConstantColor(kCGColorWhite) Which is: 0x7fb24d4f5ff0 [webView layer].backgroundColor Which is: 0x7fb2520065d0
Truitt Savell
Comment 30 2018-11-15 08:28:37 PST
Additionally Mojave has this api failure in addition: Failed TestWebKitAPI.WebKit.BackgroundColorNoDrawsBackground _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL. /Volumes/Data/slave/mojave-release/build/Tools/TestWebKitAPI/Tests/mac/BackgroundColor.mm:87 Expected equality of these values: [NSColor whiteColor] Which is: 0x7f9562574c20 backgroundColor Which is: 0x7f9562574440
Timothy Hatcher
Comment 31 2018-11-15 09:11:42 PST
Oops. I’ll get these fixed in the next hour.
Timothy Hatcher
Comment 32 2018-11-15 09:52:30 PST
Fix for API tests is bug 191697.
Note You need to log in before you can comment on or make changes to this bug.