Bug 237098 - Port CaptivePortalMode preferences to AnyHost in order to support CFPrefs Direct Mode propagation
Summary: Port CaptivePortalMode preferences to AnyHost in order to support CFPrefs Dir...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-23 11:45 PST by Gavin
Modified: 2022-02-24 17:45 PST (History)
3 users (show)

See Also:


Attachments
Patch (2.53 KB, patch)
2022-02-23 11:50 PST, Gavin
no flags Details | Formatted Diff | Diff
Patch (6.05 KB, patch)
2022-02-24 08:43 PST, Gavin
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (5.53 KB, patch)
2022-02-24 09:00 PST, Gavin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin 2022-02-23 11:45:44 PST
Modify our preference observation code to also provide notifications for changes to preferences stored as the currentHost.
Comment 1 Gavin 2022-02-23 11:50:29 PST
Created attachment 453007 [details]
Patch
Comment 2 Brent Fulgham 2022-02-23 12:01:30 PST
Comment on attachment 453007 [details]
Patch

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

> Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm:76
> +        auto hostValue = adoptCF(CFPreferencesCopyValue((__bridge CFStringRef)key, kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost));

If CurrentHost and AnyHost are treated the same on iOS, should we conditionalize this on PLATFORM(MAC), or maybe !PLATFORM(IOS)?
Comment 3 Brent Fulgham 2022-02-23 13:05:54 PST
Comment on attachment 453007 [details]
Patch

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

r=me

>> Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm:76
>> +        auto hostValue = adoptCF(CFPreferencesCopyValue((__bridge CFStringRef)key, kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesCurrentHost));
> 
> If CurrentHost and AnyHost are treated the same on iOS, should we conditionalize this on PLATFORM(MAC), or maybe !PLATFORM(IOS)?

I talked with Gavin offline, and we actually do want it to work this way on all platforms.
Comment 4 Radar WebKit Bug Importer 2022-02-23 13:06:17 PST
<rdar://problem/89373662>
Comment 5 Gavin 2022-02-24 08:43:15 PST
Created attachment 453102 [details]
Patch
Comment 6 Gavin 2022-02-24 09:00:11 PST
Created attachment 453105 [details]
Patch
Comment 7 Brent Fulgham 2022-02-24 09:21:02 PST
Comment on attachment 453105 [details]
Patch

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

r=me

> Source/WebKit/ChangeLog:4
> +        https://bugs.webkit.org/show_bug.cgi?id=237098

<rdar://problem/89373662>

Please always include the Radar in Changelogs, as it makes it easier to find things using the Xcode change viewer.

> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:748
> +#if PLATFORM(COCOA)

Oops -- yes, this would never have worked properly for macOS!
Comment 8 EWS 2022-02-24 17:45:54 PST
Committed r290482 (247778@main): <https://commits.webkit.org/247778@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453105 [details].