Changeset 285739 in webkit
- Timestamp:
- Nov 12, 2021, 1:23:59 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.h (modified) (1 diff)
-
Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.mm (modified) (2 diffs)
-
Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r285737 r285739 1 2021-11-12 Chris Dumez <cdumez@apple.com> 2 3 Demote WKWebpagePreferences.captivePortalModeEnabled API to SPI 4 https://bugs.webkit.org/show_bug.cgi?id=233059 5 6 Reviewed by Geoffrey Garen. 7 8 Demote WKWebpagePreferences.captivePortalModeEnabled API to SPI until we reach 9 agreement on a suitable API name. 10 11 * UIProcess/API/Cocoa/WKWebpagePreferences.h: 12 * UIProcess/API/Cocoa/WKWebpagePreferences.mm: 13 (-[WKWebpagePreferences _setCaptivePortalModeEnabled:]): 14 (-[WKWebpagePreferences _captivePortalModeEnabled]): 15 (-[WKWebpagePreferences setCaptivePortalModeEnabled:]): Deleted. 16 (-[WKWebpagePreferences captivePortalModeEnabled]): Deleted. 17 * UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h: 18 1 19 2021-11-12 Chris Dumez <cdumez@apple.com> 2 20 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.h
r285594 r285739 72 72 @property (nonatomic) BOOL allowsContentJavaScript WK_API_AVAILABLE(macos(11.0), ios(14.0)); 73 73 74 /*! @abstract A boolean indicating whether Captive Portal mode is enabled.75 @discussion The default value is NO on macOS. On iOS, the default value depends on the system setting.76 */77 @property (nonatomic) BOOL captivePortalModeEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));78 79 74 @end -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.mm
r285594 r285739 392 392 } 393 393 394 - (void) setCaptivePortalModeEnabled:(BOOL)captivePortalModeEnabled394 - (void)_setCaptivePortalModeEnabled:(BOOL)captivePortalModeEnabled 395 395 { 396 396 #if PLATFORM(IOS_FAMILY) … … 401 401 } 402 402 403 - (BOOL) captivePortalModeEnabled403 - (BOOL)_captivePortalModeEnabled 404 404 { 405 405 return _websitePolicies->captivePortalModeEnabled(); -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h
r271813 r285739 86 86 @property (nonatomic, setter=_setMouseEventPolicy:) _WKWebsiteMouseEventPolicy _mouseEventPolicy WK_API_AVAILABLE(macos(11.0), ios(14.0)); 87 87 88 @property (nonatomic, setter=_setCaptivePortalModeEnabled:) BOOL _captivePortalModeEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 89 88 90 @end -
trunk/Tools/ChangeLog
r285733 r285739 1 2021-11-12 Chris Dumez <cdumez@apple.com> 2 3 Demote WKWebpagePreferences.captivePortalModeEnabled API to SPI 4 https://bugs.webkit.org/show_bug.cgi?id=233059 5 6 Reviewed by Geoffrey Garen. 7 8 Update API test accordingly. 9 10 * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 11 1 12 2021-11-05 Jonathan Bedard <jbedard@apple.com> 2 13 -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm
r285731 r285739 46 46 #import <WebKit/WKWebViewPrivateForTesting.h> 47 47 #import <WebKit/WKWebpagePreferences.h> 48 #import <WebKit/WKWebpagePreferencesPrivate.h> 48 49 #import <WebKit/WKWebsiteDataStorePrivate.h> 49 50 #import <WebKit/WKWebsiteDataStoreRef.h> … … 7680 7681 { 7681 7682 auto webViewConfiguration = adoptNS([WKWebViewConfiguration new]); 7682 EXPECT_FALSE(webViewConfiguration.get().defaultWebpagePreferences. captivePortalModeEnabled);7683 EXPECT_FALSE(webViewConfiguration.get().defaultWebpagePreferences._captivePortalModeEnabled); 7683 7684 [webViewConfiguration.get().preferences _setMediaDevicesEnabled:YES]; 7684 7685 webViewConfiguration.get().preferences._mediaCaptureRequiresSecureConnection = NO; … … 7707 7708 7708 7709 delegate.get().decidePolicyForNavigationActionWithPreferences = ^(WKNavigationAction *action, WKWebpagePreferences *preferences, void (^completionHandler)(WKNavigationActionPolicy, WKWebpagePreferences *)) { 7709 EXPECT_FALSE(preferences. captivePortalModeEnabled);7710 preferences.captivePortalModeEnabled = YES;7710 EXPECT_FALSE(preferences._captivePortalModeEnabled); 7711 [preferences _setCaptivePortalModeEnabled:YES]; 7711 7712 completionHandler(WKNavigationActionPolicyAllow, preferences); 7712 7713 }; … … 7726 7727 { 7727 7728 auto webViewConfiguration = adoptNS([WKWebViewConfiguration new]); 7728 EXPECT_FALSE(webViewConfiguration.get().defaultWebpagePreferences. captivePortalModeEnabled);7729 webViewConfiguration.get().defaultWebpagePreferences.captivePortalModeEnabled = YES;7729 EXPECT_FALSE(webViewConfiguration.get().defaultWebpagePreferences._captivePortalModeEnabled); 7730 [webViewConfiguration.get().defaultWebpagePreferences _setCaptivePortalModeEnabled:YES]; 7730 7731 [webViewConfiguration.get().preferences _setMediaDevicesEnabled:YES]; 7731 7732 webViewConfiguration.get().preferences._mediaCaptureRequiresSecureConnection = NO; … … 7745 7746 7746 7747 delegate.get().decidePolicyForNavigationActionWithPreferences = ^(WKNavigationAction *action, WKWebpagePreferences *preferences, void (^completionHandler)(WKNavigationActionPolicy, WKWebpagePreferences *)) { 7747 EXPECT_TRUE(preferences. captivePortalModeEnabled);7748 EXPECT_TRUE(preferences._captivePortalModeEnabled); 7748 7749 completionHandler(WKNavigationActionPolicyAllow, preferences); 7749 7750 }; … … 7767 7768 7768 7769 delegate.get().decidePolicyForNavigationActionWithPreferences = ^(WKNavigationAction *action, WKWebpagePreferences *preferences, void (^completionHandler)(WKNavigationActionPolicy, WKWebpagePreferences *)) { 7769 EXPECT_TRUE(preferences. captivePortalModeEnabled);7770 preferences.captivePortalModeEnabled = NO; // Opt out of captive portal mode for this load.7770 EXPECT_TRUE(preferences._captivePortalModeEnabled); 7771 [preferences _setCaptivePortalModeEnabled:NO]; // Opt out of captive portal mode for this load. 7771 7772 completionHandler(WKNavigationActionPolicyAllow, preferences); 7772 7773 };
Note:
See TracChangeset
for help on using the changeset viewer.