RESOLVED FIXED 216514
[macOS] Date pickers should respect the document's color scheme
https://bugs.webkit.org/show_bug.cgi?id=216514
Summary [macOS] Date pickers should respect the document's color scheme
Aditya Keerthi
Reported 2020-09-14 17:41:04 PDT
...
Attachments
Patch (5.27 KB, patch)
2020-09-14 17:44 PDT, Aditya Keerthi
thorton: review+
Patch for landing (5.27 KB, patch)
2020-09-15 16:02 PDT, Aditya Keerthi
ews-feeder: commit-queue-
Patch for landing. (5.26 KB, patch)
2020-09-15 19:43 PDT, Aditya Keerthi
no flags
Aditya Keerthi
Comment 1 2020-09-14 17:41:55 PDT
Aditya Keerthi
Comment 2 2020-09-14 17:44:14 PDT
Tim Horton
Comment 3 2020-09-14 17:57:03 PDT
Comment on attachment 408774 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408774&action=review > Source/WebCore/html/HTMLInputElement.cpp:2140 > + if (auto* computedStyle = this->computedStyle()) { I assume this null check is not actually necessary, since the old code did not. Is that true? > Source/WebKit/UIProcess/mac/WebDateTimePickerMac.mm:221 > + [_enclosingWindow setAppearance:[NSAppearance appearanceNamed:_params.useDarkAppearance ? NSAppearanceNameDarkAqua : NSAppearanceNameAqua]]; This is interesting! I feel like content that pops out of the page (like, say, context menus) usually follows the app, not the page. But probably this makes sense?
Aditya Keerthi
Comment 4 2020-09-14 18:02:56 PDT
(In reply to Tim Horton from comment #3) > Comment on attachment 408774 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=408774&action=review > > > Source/WebCore/html/HTMLInputElement.cpp:2140 > > + if (auto* computedStyle = this->computedStyle()) { > > I assume this null check is not actually necessary, since the old code did > not. Is that true? The check is not actually necessary, since this method is only called when the element is in the node tree. Should I replace the check with an ASSERT?
Tim Horton
Comment 5 2020-09-15 14:11:06 PDT
Comment on attachment 408774 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=408774&action=review >> Source/WebKit/UIProcess/mac/WebDateTimePickerMac.mm:221 >> + [_enclosingWindow setAppearance:[NSAppearance appearanceNamed:_params.useDarkAppearance ? NSAppearanceNameDarkAqua : NSAppearanceNameAqua]]; > > This is interesting! I feel like content that pops out of the page (like, say, context menus) usually follows the app, not the page. But probably this makes sense? You can just leave it implicit, too. No reason to ASSERT() something that we expect will never happen and which will result in a crash in release, IMO.
Aditya Keerthi
Comment 6 2020-09-15 16:02:01 PDT
Created attachment 408872 [details] Patch for landing
EWS
Comment 7 2020-09-15 19:39:52 PDT
ChangeLog entry in Source/WebKit/ChangeLog contains OOPS!.
Aditya Keerthi
Comment 8 2020-09-15 19:43:17 PDT
Created attachment 408889 [details] Patch for landing.
EWS
Comment 9 2020-09-15 20:10:35 PDT
Committed r267131: <https://trac.webkit.org/changeset/267131> All reviewed patches have been landed. Closing bug and clearing flags on attachment 408889 [details].
Note You need to log in before you can comment on or make changes to this bug.