LibWeb/CSP: Implement the style-src-attr directive
Some checks are pending
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run

This commit is contained in:
Luke Wilde 2024-12-03 17:27:12 +00:00 committed by Shannon Booth
commit 8e999bca62
Notes: github-actions[bot] 2025-07-17 23:59:11 +00:00
5 changed files with 74 additions and 0 deletions

View file

@ -18,6 +18,7 @@
#include <LibWeb/ContentSecurityPolicy/Directives/ScriptSourceAttributeDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/ScriptSourceDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/ScriptSourceElementDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/StyleSourceAttributeDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/StyleSourceDirective.h>
#include <LibWeb/ContentSecurityPolicy/Directives/StyleSourceElementDirective.h>
@ -55,6 +56,9 @@ GC::Ref<Directive> create_directive(GC::Heap& heap, String name, Vector<String>
if (name == Names::ScriptSrcElem)
return heap.allocate<ScriptSourceElementDirective>(move(name), move(value));
if (name == Names::StyleSrcAttr)
return heap.allocate<StyleSourceAttributeDirective>(move(name), move(value));
if (name == Names::StyleSrc)
return heap.allocate<StyleSourceDirective>(move(name), move(value));