[webkit-changes] [WebKit/WebKit] d48713: Fire error event when CSP blocks inline stylesheets

Ryan Reno noreply at github.com
Wed Oct 19 11:14:21 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d487138f2ba5c2b351635d4df8942b9f4d8577ce
      https://github.com/WebKit/WebKit/commit/d487138f2ba5c2b351635d4df8942b9f4d8577ce
  Author: Ryan Reno <rreno at apple.com>
  Date:   2022-10-19 (Wed, 19 Oct 2022)

  Changed paths:
    M LayoutTests/TestExpectations
    R LayoutTests/http/tests/security/contentSecurityPolicy/style-src-blocked-error-event-expected.txt
    R LayoutTests/http/tests/security/contentSecurityPolicy/style-src-blocked-error-event.html
    M LayoutTests/imported/w3c/web-platform-tests/content-security-policy/style-src/style-src-error-event-fires-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event-expected.txt
    M Source/WebCore/dom/InlineStyleSheetOwner.cpp

  Log Message:
  -----------
  Fire error event when CSP blocks inline stylesheets
https://bugs.webkit.org/show_bug.cgi?id=246710
rdar://101308540

Reviewed by Chris Dumez.

When we block inline style with CSP we don't fire an error event. This change will cause the element
to fire an error event when CSP blocks us from creating a stylesheet.

* LayoutTests/TestExpectations:

* LayoutTests/http/tests/security/contentSecurityPolicy/style-src-blocked-error-event-expected.txt: Removed.
* LayoutTests/http/tests/security/contentSecurityPolicy/style-src-blocked-error-event.html: Removed.
    This test is redundant to
    imported/w3c/web-platform-tests/content-security-policy/style-src/style-blocked.html
    and any other tests which block style but allow unsafe-inline.

* LayoutTests/imported/w3c/web-platform-tests/content-security-policy/style-src/style-src-error-event-fires-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/content-security-policy/style-src/style-src-inline-style-nonce-blocked-error-event-expected.txt:
* Source/WebCore/dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::createSheet):

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




More information about the webkit-changes mailing list