Changeset 246127 in webkit
- Timestamp:
- Jun 5, 2019 2:24:45 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r246124 r246127 1 2019-06-05 Alex Christensen <achristensen@webkit.org> 2 3 Re-enable safe browsing in WKWebView 4 https://bugs.webkit.org/show_bug.cgi?id=196161 5 <rdar://problem/49171413> 6 7 Reviewed by Ryosuke Niwa. 8 9 * platform/mac-wk2/http/tests/navigation/keyboard-events-during-provisional-navigation-expected.txt: 10 1 11 == Rolled over to ChangeLog-2019-06-05 == -
trunk/LayoutTests/platform/mac-wk2/http/tests/navigation/keyboard-events-during-provisional-navigation-expected.txt
r241728 r246127 11 11 CONSOLE MESSAGE: line 58: Input element value after text input events: "". 12 12 CONSOLE MESSAGE: line 20: Pressing "z" with access key modifiers should navigate to resources/keyboard-events-after-navigation.html. 13 CONSOLE MESSAGE: line 18: keydownevent dispatched (isTrusted: true). 14 CONSOLE MESSAGE: line 18: keyupevent dispatched (isTrusted: true). 13 15 CONSOLE MESSAGE: line 6: Finished navigating to resources/keyboard-events-after-navigation.html. 14 16 CONSOLE MESSAGE: line 7: Trusted events should be logged and the input element should have the value "acd". -
trunk/Source/WebKit/ChangeLog
r246126 r246127 1 2019-06-05 Alex Christensen <achristensen@webkit.org> 2 3 Re-enable safe browsing in WKWebView 4 https://bugs.webkit.org/show_bug.cgi?id=196161 5 <rdar://problem/49171413> 6 7 Reviewed by Ryosuke Niwa. 8 9 This is mostly just reverting r241728. 10 11 * Shared/WebPreferences.yaml: 12 * UIProcess/API/Cocoa/WKPreferences.h: 13 * UIProcess/API/Cocoa/WKPreferences.mm: 14 (-[WKPreferences setSafeBrowsingEnabled:]): 15 (-[WKPreferences isSafeBrowsingEnabled]): 16 1 17 2019-06-05 Alex Christensen <achristensen@webkit.org> 2 18 -
trunk/Source/WebKit/Shared/WebPreferences.yaml
r246118 r246127 83 83 SafeBrowsingEnabled: 84 84 type: bool 85 defaultValue: false85 defaultValue: true 86 86 webcoreBinding: none 87 87 -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.h
r244465 r246127 52 52 @property (nonatomic) BOOL javaScriptCanOpenWindowsAutomatically; 53 53 54 /*! @abstract A Boolean value indicating whether warnings should be 55 shown for suspected fraudulent content such as phishing or malware. 56 @discussion The default value is YES. This feature is currently available 57 in the following region: China. 58 */ 59 @property (nonatomic, getter=isFraudulentWebsiteWarningEnabled) BOOL fraudulentWebsiteWarningEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA)); 60 54 61 #if !TARGET_OS_IPHONE 55 62 /*! -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKPreferences.mm
r246002 r246127 123 123 } 124 124 125 - (void)setFraudulentWebsiteWarningEnabled:(BOOL)enabled 126 { 127 _preferences->setSafeBrowsingEnabled(enabled); 128 } 129 130 - (BOOL)isFraudulentWebsiteWarningEnabled 131 { 132 return _preferences->safeBrowsingEnabled(); 133 } 134 125 135 - (BOOL)javaScriptCanOpenWindowsAutomatically 126 136 { -
trunk/Tools/ChangeLog
r246124 r246127 1 2019-06-05 Alex Christensen <achristensen@webkit.org> 2 3 Re-enable safe browsing in WKWebView 4 https://bugs.webkit.org/show_bug.cgi?id=196161 5 <rdar://problem/49171413> 6 7 Reviewed by Ryosuke Niwa. 8 9 * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: 10 * TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm: 11 (TEST): 12 (safeBrowsingView): 13 1 14 == Rolled over to ChangeLog-2019-06-05 == -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm
r245601 r246127 607 607 [webView setNavigationDelegate:navigationDelegate.get()]; 608 608 609 [webView configuration].preferences. _safeBrowsingEnabled = NO;609 [webView configuration].preferences.fraudulentWebsiteWarningEnabled = NO; 610 610 611 611 NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; … … 1697 1697 [webView setNavigationDelegate:delegate.get()]; 1698 1698 1699 [webView configuration].preferences. _safeBrowsingEnabled = NO;1699 [webView configuration].preferences.fraudulentWebsiteWarningEnabled = NO; 1700 1700 1701 1701 NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]; … … 2246 2246 [webView setNavigationDelegate:delegate.get()]; 2247 2247 2248 [webView configuration].preferences. _safeBrowsingEnabled = NO;2248 [webView configuration].preferences.fraudulentWebsiteWarningEnabled = NO; 2249 2249 2250 2250 NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; … … 3047 3047 [webView setNavigationDelegate:delegate.get()]; 3048 3048 3049 [webView configuration].preferences. _safeBrowsingEnabled = NO;3049 [webView configuration].preferences.fraudulentWebsiteWarningEnabled = NO; 3050 3050 3051 3051 failed = false; … … 3075 3075 [webView setNavigationDelegate:delegate.get()]; 3076 3076 3077 [webView configuration].preferences. _safeBrowsingEnabled = NO;3077 [webView configuration].preferences.fraudulentWebsiteWarningEnabled = NO; 3078 3078 3079 3079 NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main1.html"]]; … … 4454 4454 [webView setNavigationDelegate:navigationDelegate.get()]; 4455 4455 4456 [webView configuration].preferences. _safeBrowsingEnabled = NO;4456 [webView configuration].preferences.fraudulentWebsiteWarningEnabled = NO; 4457 4457 4458 4458 [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; … … 4512 4512 [webView setNavigationDelegate:navigationDelegate.get()]; 4513 4513 4514 [webView configuration].preferences. _safeBrowsingEnabled = NO;4514 [webView configuration].preferences.fraudulentWebsiteWarningEnabled = NO; 4515 4515 4516 4516 [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"pson://www.webkit.org/main.html"]]]; -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm
r244089 r246127 171 171 172 172 auto webView = adoptNS([WKWebView new]); 173 EXPECT_ FALSE([webView configuration].preferences._safeBrowsingEnabled);174 [webView configuration].preferences. _safeBrowsingEnabled = YES;173 EXPECT_TRUE([webView configuration].preferences.fraudulentWebsiteWarningEnabled); 174 [webView configuration].preferences.fraudulentWebsiteWarningEnabled = YES; 175 175 [webView setNavigationDelegate:delegate.get()]; 176 [webView configuration].preferences. _safeBrowsingEnabled = YES;176 [webView configuration].preferences.fraudulentWebsiteWarningEnabled = YES; 177 177 [webView loadRequest:[NSURLRequest requestWithURL:resourceURL(@"simple")]]; 178 178 while (![webView _safeBrowsingWarning]) 179 179 TestWebKitAPI::Util::spinRunLoop(); 180 [webView configuration].preferences. _safeBrowsingEnabled = NO;180 [webView configuration].preferences.fraudulentWebsiteWarningEnabled = NO; 181 181 [webView loadRequest:[NSURLRequest requestWithURL:resourceURL(@"simple2")]]; 182 182 TestWebKitAPI::Util::run(&done); 183 EXPECT_FALSE([webView configuration].preferences. _safeBrowsingEnabled);183 EXPECT_FALSE([webView configuration].preferences.fraudulentWebsiteWarningEnabled); 184 184 EXPECT_FALSE([webView _safeBrowsingWarning]); 185 185 } … … 191 191 static auto delegate = adoptNS([SafeBrowsingNavigationDelegate new]); 192 192 auto webView = adoptNS([WKWebView new]); 193 [webView configuration].preferences. _safeBrowsingEnabled = YES;193 [webView configuration].preferences.fraudulentWebsiteWarningEnabled = YES; 194 194 [webView setNavigationDelegate:delegate.get()]; 195 195 [webView setUIDelegate:delegate.get()]; … … 320 320 auto webViewWithWarning = [&] () -> RetainPtr<WKWebView> { 321 321 auto webView = adoptNS([WKWebView new]); 322 [webView configuration].preferences. _safeBrowsingEnabled = YES;322 [webView configuration].preferences.fraudulentWebsiteWarningEnabled = YES; 323 323 [webView addObserver:observer.get() forKeyPath:@"URL" options:NSKeyValueObservingOptionNew context:nil]; 324 324 … … 416 416 auto delegate = adoptNS([WKWebViewGoBackNavigationDelegate new]); 417 417 auto webView = adoptNS([WKWebView new]); 418 [webView configuration].preferences. _safeBrowsingEnabled = YES;418 [webView configuration].preferences.fraudulentWebsiteWarningEnabled = YES; 419 419 [webView setNavigationDelegate:delegate.get()]; 420 420 [webView loadRequest:[NSURLRequest requestWithURL:resourceURL(@"simple")]];
Note: See TracChangeset
for help on using the changeset viewer.