Bug 233182 - CSP: security policy violation event is always using document as target
Summary: CSP: security policy violation event is always using document as target
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on: 233037
Blocks: 233398
  Show dependency treegraph
Reported: 2021-11-16 03:04 PST by Carlos Garcia Campos
Modified: 2021-11-23 08:24 PST (History)
9 users (show)

See Also:

WIP (20.22 KB, patch)
2021-11-16 03:09 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Patch (32.04 KB, patch)
2021-11-22 02:54 PST, Carlos Garcia Campos
katherine_cheney: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2021-11-16 03:04:46 PST
We should use the violation element instead if not null. This is causing failures in imported/w3c/web-platform-tests/content-security-policy/securitypolicyviolation/targeting.html but also time outs in other tests connecting the event listener to the target element.
Comment 1 Carlos Garcia Campos 2021-11-16 03:09:00 PST
Created attachment 444366 [details]

This is WIP for now because it won't apply, it applies on top of patch attached to bug #233037. Once that lands I'll include changelog and new test results.
Comment 2 Carlos Garcia Campos 2021-11-22 02:54:05 PST
Created attachment 444954 [details]
Comment 3 Radar WebKit Bug Importer 2021-11-23 03:05:19 PST
Comment 4 Kate Cheney 2021-11-23 08:11:55 PST
Comment on attachment 444954 [details]

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

> Source/WebCore/ChangeLog:15
> +        (WebCore::Element::enqueueSecurityPolicyViolationEvent): Helper to queue ecuritypolicyviolationEvent for element.

nit: ecuritypolicyviolationEvent > securitypolicyviolationEvent
Comment 5 Carlos Garcia Campos 2021-11-23 08:24:39 PST
Committed r286136 (244523@main): <https://commits.webkit.org/244523@main>