Bug 198687 - Integrate dark mode support for iOS
Summary: Integrate dark mode support for iOS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-07 21:40 PDT by Timothy Hatcher
Modified: 2019-07-11 00:32 PDT (History)
9 users (show)

See Also:


Attachments
Patch (29.27 KB, patch)
2019-06-08 21:55 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff
Patch (35.98 KB, patch)
2019-06-08 23:05 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff
Patch (35.94 KB, patch)
2019-06-08 23:11 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff
Patch (36.78 KB, patch)
2019-06-09 13:19 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff
Patch (37.01 KB, patch)
2019-06-09 13:45 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff
Patch (36.49 KB, patch)
2019-06-09 18:48 PDT, Timothy Hatcher
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2019-06-07 21:40:57 PDT
Put iOS dark mode support in the open source.
Comment 1 Radar WebKit Bug Importer 2019-06-07 21:41:06 PDT
<rdar://problem/51545643>
Comment 2 Timothy Hatcher 2019-06-08 21:55:55 PDT Comment hidden (obsolete)
Comment 3 Timothy Hatcher 2019-06-08 23:05:27 PDT Comment hidden (obsolete)
Comment 4 EWS Watchlist 2019-06-08 23:06:57 PDT Comment hidden (obsolete)
Comment 5 Timothy Hatcher 2019-06-08 23:11:32 PDT Comment hidden (obsolete)
Comment 6 Tim Horton 2019-06-08 23:38:58 PDT
Comment on attachment 371705 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=371705&action=review

> Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig:119
> +ENABLE_DARK_MODE_CSS_iphonesimulator = ENABLE_DARK_MODE_CSS;

Probably iosmac too?
Comment 7 Timothy Hatcher 2019-06-09 13:19:17 PDT Comment hidden (obsolete)
Comment 8 Timothy Hatcher 2019-06-09 13:45:12 PDT Comment hidden (obsolete)
Comment 9 Timothy Hatcher 2019-06-09 18:48:41 PDT
Created attachment 371715 [details]
Patch
Comment 10 Tim Horton 2019-06-10 11:25:24 PDT
Comment on attachment 371715 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=371715&action=review

> Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm:133
> +    styleConfiguration.appearanceName = coreContext.useDarkAppearance() ? @"UIAppearanceDark" : @"UIAppearanceLight";

No constants for these?
Comment 11 Timothy Hatcher 2019-06-10 11:49:30 PDT
(In reply to Tim Horton from comment #10)
> Comment on attachment 371715 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=371715&action=review
> 
> > Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm:133
> > +    styleConfiguration.appearanceName = coreContext.useDarkAppearance() ? @"UIAppearanceDark" : @"UIAppearanceLight";
> 
> No constants for these?

Sadly not.
Comment 12 WebKit Commit Bot 2019-06-10 12:19:22 PDT
Comment on attachment 371715 [details]
Patch

Clearing flags on attachment: 371715

Committed r246270: <https://trac.webkit.org/changeset/246270>
Comment 13 WebKit Commit Bot 2019-06-10 12:19:24 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Frédéric Wang (:fredw) 2019-07-10 08:49:03 PDT
Comment on attachment 371715 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=371715&action=review

@Timothy: I get various build failure for missing API when building with the latest XCode 11 beta 3 (FontCascadeCocoa.mm, LocalCurrentTraitCollection.mm and RenderThemeIOS.mm ). Is it something expected?

> Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h:167
> ++ (UIColor *)tableCellDefaultSelectionTintColor;

I'm not familiar with Objective C but this is causing a build failure for me with XCode 11 beta 3, that I can workaround by moving this above the NS_ASSUME_NONNULL_END statement.
Comment 15 Frédéric Wang (:fredw) 2019-07-10 08:49:44 PDT
(In reply to Frédéric Wang (:fredw) from comment #14)
> Comment on attachment 371715 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=371715&action=review
> 
> @Timothy: I get various build failure for missing API when building with the
> latest XCode 11 beta 3 (FontCascadeCocoa.mm, LocalCurrentTraitCollection.mm
> and RenderThemeIOS.mm ).

(in OS_DARK_MODE_SUPPORT sections)
Comment 16 Timothy Hatcher 2019-07-10 10:13:49 PDT
Comment on attachment 371715 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=371715&action=review

>> Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h:167
>> ++ (UIColor *)tableCellDefaultSelectionTintColor;
> 
> I'm not familiar with Objective C but this is causing a build failure for me with XCode 11 beta 3, that I can workaround by moving this above the NS_ASSUME_NONNULL_END statement.

Moving to NS_ASSUME_NONNULL_END section or adding a new section of START and END likely is the right fix. File a new bug with the build errors and we can take a look.
Comment 17 Timothy Hatcher 2019-07-10 18:55:17 PDT
(In reply to Timothy Hatcher from comment #16)
> Comment on attachment 371715 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=371715&action=review
> 
> >> Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h:167
> >> ++ (UIColor *)tableCellDefaultSelectionTintColor;
> > 
> > I'm not familiar with Objective C but this is causing a build failure for me with XCode 11 beta 3, that I can workaround by moving this above the NS_ASSUME_NONNULL_END statement.
> 
> Moving to NS_ASSUME_NONNULL_END section or adding a new section of START and
> END likely is the right fix. File a new bug with the build errors and we can
> take a look.

Bug 199481 tracks making WebKit build with the public SDK.
Comment 18 Frédéric Wang (:fredw) 2019-07-11 00:32:26 PDT
(In reply to Timothy Hatcher from comment #17)
> (In reply to Timothy Hatcher from comment #16)
> > Comment on attachment 371715 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=371715&action=review
> > 
> > >> Source/WebCore/PAL/pal/spi/ios/UIKitSPI.h:167
> > >> ++ (UIColor *)tableCellDefaultSelectionTintColor;
> > > 
> > > I'm not familiar with Objective C but this is causing a build failure for me with XCode 11 beta 3, that I can workaround by moving this above the NS_ASSUME_NONNULL_END statement.
> > 
> > Moving to NS_ASSUME_NONNULL_END section or adding a new section of START and
> > END likely is the right fix. File a new bug with the build errors and we can
> > take a look.
> 
> Bug 199481 tracks making WebKit build with the public SDK.

Thanks!