Bug 195965 - Add SPI to inform applications of WKContentRuleList actions
Summary: Add SPI to inform applications of WKContentRuleList actions
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-03-19 14:49 PDT by Alex Christensen
Modified: 2019-03-22 08:56 PDT (History)
5 users (show)

See Also:


Attachments
Patch (93.01 KB, patch)
2019-03-19 14:53 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (91.48 KB, patch)
2019-03-19 15:38 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (91.72 KB, patch)
2019-03-19 16:49 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (91.47 KB, patch)
2019-03-19 17:42 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (92.09 KB, patch)
2019-03-19 19:44 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (2.87 MB, application/zip)
2019-03-19 22:19 PDT, Build Bot
no flags Details
Patch (93.55 KB, patch)
2019-03-19 22:43 PDT, Alex Christensen
ews: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (3.40 MB, application/zip)
2019-03-20 00:16 PDT, Build Bot
no flags Details
patch (93.35 KB, patch)
2019-03-20 11:52 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (121.69 KB, patch)
2019-03-20 18:00 PDT, Alex Christensen
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2019-03-19 14:49:44 PDT
Add SPI to inform applications of WKContentRuleList actions
Comment 1 Alex Christensen 2019-03-19 14:53:17 PDT
Created attachment 365232 [details]
Patch
Comment 2 Alex Christensen 2019-03-19 14:53:20 PDT
<rdar://problem/42664365>
Comment 3 Alex Christensen 2019-03-19 15:38:10 PDT
Created attachment 365247 [details]
Patch
Comment 4 Alex Christensen 2019-03-19 16:49:23 PDT
Created attachment 365262 [details]
Patch
Comment 5 Alex Christensen 2019-03-19 17:42:06 PDT
Created attachment 365273 [details]
Patch
Comment 6 Alex Christensen 2019-03-19 19:44:28 PDT
Created attachment 365295 [details]
Patch
Comment 7 Build Bot 2019-03-19 22:19:06 PDT
Comment on attachment 365295 [details]
Patch

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

New failing tests:
http/tests/contentextensions/popups.html
Comment 8 Build Bot 2019-03-19 22:19:08 PDT
Created attachment 365311 [details]
Archive of layout-test-results from ews105 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 9 Alex Christensen 2019-03-19 22:43:45 PDT
Created attachment 365316 [details]
Patch
Comment 10 Build Bot 2019-03-20 00:16:29 PDT
Comment on attachment 365316 [details]
Patch

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

New failing tests:
imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html
Comment 11 Build Bot 2019-03-20 00:16:31 PDT
Created attachment 365323 [details]
Archive of layout-test-results from ews105 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 12 Alex Christensen 2019-03-20 11:52:38 PDT
Created attachment 365373 [details]
patch
Comment 13 Build Bot 2019-03-20 11:55:50 PDT
Attachment 365373 [details] did not pass style-queue:


ERROR: Source/WebCore/page/ChromeClient.h:387:  Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line.  [build/webcore_export] [4]
Total errors found: 1 in 41 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 14 Geoffrey Garen 2019-03-20 16:52:11 PDT
Comment on attachment 365373 [details]
patch

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

r=me

> Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:96
> +- (void)_webView:(WKWebView *)webView contentRuleListWithIdentifier:(NSString *)identifier performedActionOnURL:(NSURL *)url blockedLoad:(BOOL)blockedLoad blockedCookies:(BOOL)blockedCookies madeHTTPS:(BOOL)madeHTTPS notifications:(NSArray<NSString *> *)notifications WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));

I'd recommend ....performedAction:(_WKContentRuleListAction *)action forURL:....

Then we can put the BOOLs in the object, and add if needed in future, and it's slightly nicer to write client code.

_WKContentRuleListAction can just wrap WebCore's struct.

> Source/WebKit/UIProcess/Cocoa/NavigationState.mm:657
> +            auto notifications = adoptNS([[NSMutableArray alloc] initWithCapacity:result.notifications.size()]);

You can skip this allocation if there are no notifications.
Comment 15 Alex Christensen 2019-03-20 18:00:02 PDT
Created attachment 365453 [details]
Patch
Comment 16 Build Bot 2019-03-20 18:03:06 PDT
Attachment 365453 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/API/Cocoa/_WKContentRuleListActionInternal.h:27:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebCore/page/ChromeClient.h:387:  Inline functions should not be in classes annotated with WEBCORE_EXPORT. Remove the macro from the class and apply it to each appropriate method, or move the inline function definition out-of-line.  [build/webcore_export] [4]
Total errors found: 2 in 58 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 17 WebKit Commit Bot 2019-03-20 20:08:01 PDT
Comment on attachment 365453 [details]
Patch

Rejecting attachment 365453 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'validate-changelog', '--check-oops', '--non-interactive', 365453, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.

Full output: https://webkit-queues.webkit.org/results/11590568
Comment 18 Alex Christensen 2019-03-21 13:24:16 PDT
https://trac.webkit.org/changeset/243319/webkit