mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb/CSP: Implement the style-src-elem directive
This commit is contained in:
parent
8b0b3b186f
commit
574b736156
Notes:
github-actions[bot]
2025-07-17 23:59:17 +00:00
Author: https://github.com/Lubrsi
Commit: 574b736156
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5490
Reviewed-by: https://github.com/shannonbooth ✅
5 changed files with 126 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
#include <LibWeb/ContentSecurityPolicy/Directives/ScriptSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/ScriptSourceElementDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/StyleSourceDirective.h>
|
||||
#include <LibWeb/ContentSecurityPolicy/Directives/StyleSourceElementDirective.h>
|
||||
|
||||
namespace Web::ContentSecurityPolicy::Directives {
|
||||
|
||||
|
@ -57,6 +58,9 @@ GC::Ref<Directive> create_directive(GC::Heap& heap, String name, Vector<String>
|
|||
if (name == Names::StyleSrc)
|
||||
return heap.allocate<StyleSourceDirective>(move(name), move(value));
|
||||
|
||||
if (name == Names::StyleSrcElem)
|
||||
return heap.allocate<StyleSourceElementDirective>(move(name), move(value));
|
||||
|
||||
return heap.allocate<Directive>(move(name), move(value));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue