[webkit-changes] [WebKit/WebKit] a423cd: Expose WebCore::ContentExtensions::parseRuleList a...

Brian Weinstein noreply at github.com
Wed Feb 1 12:21:09 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a423cde6af09afbcb38784951a94ff40a28fac6e
      https://github.com/WebKit/WebKit/commit/a423cde6af09afbcb38784951a94ff40a28fac6e
  Author: Brian Weinstein <bweinstein at apple.com>
  Date:   2023-02-01 (Wed, 01 Feb 2023)

  Changed paths:
    M Source/WebKit/UIProcess/API/APIContentRuleList.cpp
    M Source/WebKit/UIProcess/API/APIContentRuleList.h
    M Source/WebKit/UIProcess/API/Cocoa/WKContentRuleList.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListPrivate.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm

  Log Message:
  -----------
  Expose WebCore::ContentExtensions::parseRuleList as WebKit SPI
https://bugs.webkit.org/show_bug.cgi?id=251465
<rdar://problem/99753935>

Reviewed by Alex Christensen.

This patch also adds tests for passing and failing rule parsing.

* Source/WebKit/UIProcess/API/APIContentRuleList.cpp:
(API::ContentRuleList::parseRuleList): Call into WebCore::ContentExtensions::parseRuleList and return the error code if it exists.
* Source/WebKit/UIProcess/API/APIContentRuleList.h:
* Source/WebKit/UIProcess/API/Cocoa/WKContentRuleList.mm:
(+[WKContentRuleList _parseRuleList:]): Call into API::ContentRuleList::parseRuleList and wrap the error code in an NSError if necessary.
* Source/WebKit/UIProcess/API/Cocoa/WKContentRuleListPrivate.h:

Canonical link: https://commits.webkit.org/259706@main




More information about the webkit-changes mailing list