mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Issue #2466 - Part 3: Implement style-src-elem and style-src-attr
This commit is contained in:
parent
ff01a35bdb
commit
721ded9b48
8 changed files with 78 additions and 12 deletions
|
|
@ -767,14 +767,16 @@ nsStyleUtil::CSPAllowsInlineStyle(nsIContent* aContent,
|
|||
return true;
|
||||
}
|
||||
|
||||
CSPDirective directive = nsIContentSecurityPolicy::STYLE_SRC_ATTR_DIRECTIVE;
|
||||
// query the nonce
|
||||
nsAutoString nonce;
|
||||
if (aContent) {
|
||||
directive = nsIContentSecurityPolicy::STYLE_SRC_ELEM_DIRECTIVE;
|
||||
aContent->GetAttr(kNameSpaceID_None, nsGkAtoms::nonce, nonce);
|
||||
}
|
||||
|
||||
bool allowInlineStyle = true;
|
||||
rv = csp->GetAllowsInline(nsIContentSecurityPolicy::STYLE_SRC_DIRECTIVE,
|
||||
rv = csp->GetAllowsInline(directive,
|
||||
nonce,
|
||||
false, // aParserCreated only applies to scripts
|
||||
aStyleText, aLineNumber, aColumnNumber,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue