[webkit-changes] [WebKit/WebKit] 6f913a: Content Blocker API ignores some CSS Selectors wit...

Brian Weinstein noreply at github.com
Tue Feb 21 16:23:09 PST 2023


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

  Changed paths:
    M LayoutTests/http/tests/contentextensions/css-display-none.html
    M LayoutTests/http/tests/contentextensions/css-display-none.html.json
    M Source/WebCore/contentextensions/ContentExtensionParser.cpp

  Log Message:
  -----------
  Content Blocker API ignores some CSS Selectors with uppercase letters.
https://bugs.webkit.org/show_bug.cgi?id=252677
rdar://105648971

Reviewed by Antti Koivisto.

The fix for https://bugs.webkit.org/show_bug.cgi?id=250609 caused us to use Quirks mode when both
parsing content blocker rules and applying them.

That caused this regression, since rules like .SomeCLass stopped working in Quirks mode.

To fix this, make us use Quirks mode when actually parsing the rules, but standard mode when
applying them, to match how the behavior was before https://bugs.webkit.org/show_bug.cgi?id=250609.

* LayoutTests/http/tests/contentextensions/css-display-none.html:
* LayoutTests/http/tests/contentextensions/css-display-none.html.json:
* Source/WebCore/contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::isValidCSSSelector):
(WebCore::ContentExtensions::contentExtensionCSSParserContext):

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




More information about the webkit-changes mailing list