Summary: | [Mac][WK2] Add SPI to override the Content Security Policy of a page | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Daniel Bates <dbates> | ||||||
Component: | WebKit2 | Assignee: | Daniel Bates <dbates> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | andersca, cdumez, commit-queue, esprehn+autocc, japhet, jer.noble, kangil.han, mkwst, sam | ||||||
Priority: | P2 | Keywords: | InRadar, PlatformOnly | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Mac | ||||||||
OS: | macOS 10.12 | ||||||||
Attachments: |
|
Description
Daniel Bates
2017-02-03 12:16:42 PST
Created attachment 300556 [details]
Patch and unit tests
Attachment 300556 [details] did not pass style-queue:
ERROR: Source/WebCore/page/csp/ContentSecurityPolicy.h:77: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4]
Total errors found: 1 in 21 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 300568 [details]
Patch and unit tests
Moved _setOverrideContentSecurityPolicy: SPI from WKWebViewPrivate to WKWebViewConfigurationPrivate based on a conversation with Anders Carlsson. In its preferred embodiment an embedding client will call _setOverrideContentSecurityPolicy: once so that the custom Content Security Policy applies to all page loads. That is, it is unlikely that an embedding client will want to change the custom Content Security Policy per load. So, it more appropriate to add this SPI to WKWebViewConfigurationPrivate.
Attachment 300568 [details] did not pass style-queue:
ERROR: Source/WebCore/page/csp/ContentSecurityPolicy.h:77: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4]
Total errors found: 1 in 26 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Committed r211656: <http://trac.webkit.org/changeset/211656> |