Bug 194723 - Disable safe browsing in WKWebView and remove its WKPreferences API
Summary: Disable safe browsing in WKWebView and remove its WKPreferences API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-15 14:38 PST by Alex Christensen
Modified: 2019-02-18 13:34 PST (History)
6 users (show)

See Also:


Attachments
Patch (11.42 KB, patch)
2019-02-15 14:42 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (11.96 KB, patch)
2019-02-15 15:48 PST, Alex Christensen
ggaren: review+
ews: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews106 for mac-highsierra-wk2 (2.62 MB, application/zip)
2019-02-15 17:04 PST, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2019-02-15 14:38:13 PST
Disable safe browsing in WKWebView and remove its WKPreferences API
Comment 1 Alex Christensen 2019-02-15 14:42:20 PST
Created attachment 362160 [details]
Patch
Comment 2 Alex Christensen 2019-02-15 14:42:22 PST
<rdar://problem/48122993>
Comment 3 Geoffrey Garen 2019-02-15 14:54:47 PST
Comment on attachment 362160 [details]
Patch

Failed to run "['Tools/Scripts/build-webkit', '--release']" exit_code: 65
ata/EWS/WebKit/WebKitBuild/TestWebKitAPI.build/Release/TestWebKitAPILibrary.build/Objects-normal/x86_64/ProcessSwapOnNavigation.d --serialize-diagnostics /Volumes/Data/EWS/WebKit/WebKitBuild/TestWebKitAPI.build/Release/TestWebKitAPILibrary.build/Objects-normal/x86_64/ProcessSwapOnNavigation.dia -c /Volumes/Data/EWS/WebKit/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm -o /Volumes/Data/EWS/WebKit/WebKitBuild/TestWebKitAPI.build/Release/TestWebKitAPILibrary.build/Objects-normal/x86_64/ProcessSwapOnNavigation.o
/Volumes/Data/EWS/WebKit/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:2041:41: error: property 'safeBrowsingEnabled' not found on object of type 'WKPreferences *'; did you mean '_safeBrowsingEnabled'?
    [webView configuration].preferences.safeBrowsingEnabled = NO;
                                        ^~~~~~~~~~~~~~~~~~~
                                        _safeBrowsingEnabled
In file included from /Volumes/Data/EWS/WebKit/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:35:
/Volumes/Data/EWS/WebKit/WebKitBuild/Release/WebKit.framework/PrivateHeaders/WKPreferencesPrivate.h:146:92: note: '_safeBrowsingEnabled' declared here
@property (nonatomic, getter=_isSafeBrowsingEnabled, setter=_setSafeBrowsingEnabled:) BOOL _safeBrowsingEnabled WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
Comment 4 Alex Christensen 2019-02-15 15:48:03 PST
Created attachment 362171 [details]
Patch
Comment 5 Geoffrey Garen 2019-02-15 16:25:09 PST
Comment on attachment 362171 [details]
Patch

r=me
Comment 6 Build Bot 2019-02-15 17:04:07 PST
Comment on attachment 362171 [details]
Patch

Attachment 362171 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/11166019

New failing tests:
http/tests/adClickAttribution/store-ad-click-attribution.html
Comment 7 Build Bot 2019-02-15 17:04:10 PST
Created attachment 362186 [details]
Archive of layout-test-results from ews106 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 8 Alex Christensen 2019-02-18 10:36:02 PST
http://trac.webkit.org/r241728
Comment 9 Truitt Savell 2019-02-18 12:06:38 PST
The changes in https://trac.webkit.org/changeset/241728/webkit

Caused 1 API failure:
Failed

    TestWebKitAPI.SafeBrowsing.Preference
        _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
        
        /Volumes/Data/slave/mojave-release/build/Tools/TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:175
        Value of: [webView configuration].preferences._safeBrowsingEnabled
          Actual: true
        Expected: false


and one crashing test:
http/tests/adClickAttribution/store-ad-click-attribution.html

history:
http://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Ftests%2FadClickAttribution%2Fstore-ad-click-attribution.html
Comment 10 Alex Christensen 2019-02-18 13:31:16 PST
The crash is fixed by https://bugs.webkit.org/show_bug.cgi?id=194774
Comment 11 Alex Christensen 2019-02-18 13:34:42 PST
http://trac.webkit.org/r241736 fixes the API test.