Bug 231344 - [iOS] Get rid of the deviceClass function, up-leveling to deviceClassIsSmallScreen
Summary: [iOS] Get rid of the deviceClass function, up-leveling to deviceClassIsSmallS...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-10-06 17:23 PDT by Darin Adler
Modified: 2021-10-07 10:59 PDT (History)
2 users (show)

See Also:


Attachments
Patch (29.91 KB, patch)
2021-10-06 17:41 PDT, Darin Adler
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Adler 2021-10-06 17:23:21 PDT
Get rid of the deviceClass function, up-leveling to deviceClassIsSmallScreen
Comment 1 Darin Adler 2021-10-06 17:41:05 PDT
Created attachment 440459 [details]
Patch
Comment 2 Darin Adler 2021-10-06 18:05:39 PDT
Tim, did what I said and what you said.
Comment 3 Tim Horton 2021-10-06 18:25:07 PDT
Comment on attachment 440459 [details]
Patch

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

Love it! I'm still trying to puzzle out `deviceHasIPadCapability` with folks.

> Source/WebKit/Shared/ios/WebPreferencesDefaultValuesIOS.mm:72
>  #if PLATFORM(MACCATALYST)
>      return true;
>  #elif PLATFORM(IOS)

Probably (?) could get rid of this ifdef

> Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm:278
>  #if PLATFORM(MACCATALYST)
>      return true;

And again
Comment 4 Darin Adler 2021-10-07 09:07:44 PDT
Comment on attachment 440459 [details]
Patch

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

>> Source/WebKit/Shared/ios/WebPreferencesDefaultValuesIOS.mm:72
>>  #elif PLATFORM(IOS)
> 
> Probably (?) could get rid of this ifdef

Good point. If we want to do compile time optimization we can do that in Device.h/cpp instead of here. Will do.
Comment 5 Darin Adler 2021-10-07 10:58:50 PDT
Committed r283721 (242645@main): <https://commits.webkit.org/242645@main>
Comment 6 Radar WebKit Bug Importer 2021-10-07 10:59:17 PDT
<rdar://problem/83989632>