mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Issue #2736 - Part 4: Re-work img <src> attribute.
Use subject principal as triggering principal in <img> "src" attribute. Also get rid of the `BeforeMaybeChangeAttr`/`AfterMaybeChangeAttr` dance: It makes more logical sense for these effects to happen _after_ the attribute has actually been changed.
This commit is contained in:
parent
166b25a42c
commit
c8db9efb3c
9 changed files with 168 additions and 71 deletions
|
|
@ -4053,9 +4053,16 @@ Element::GetReferrerPolicyAsEnum()
|
|||
if (Preferences::GetBool("network.http.enablePerElementReferrer", true) &&
|
||||
IsHTMLElement()) {
|
||||
const nsAttrValue* referrerValue = GetParsedAttr(nsGkAtoms::referrerpolicy);
|
||||
if (referrerValue && referrerValue->Type() == nsAttrValue::eEnum) {
|
||||
return net::ReferrerPolicy(referrerValue->GetEnumValue());
|
||||
}
|
||||
return ReferrerPolicyFromAttr(referrerValue);
|
||||
}
|
||||
return net::RP_Unset;
|
||||
}
|
||||
|
||||
net::ReferrerPolicy
|
||||
Element::ReferrerPolicyFromAttr(const nsAttrValue* aValue)
|
||||
{
|
||||
if (aValue && aValue->Type() == nsAttrValue::eEnum) {
|
||||
return net::ReferrerPolicy(aValue->GetEnumValue());
|
||||
}
|
||||
return net::RP_Unset;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue