Issue #2736 - Part 7: Re-work <frame> and <iframe> src attribute.

Use subject principal as triggering principal in <iframe>/<frame> "src" attribute.
This commit is contained in:
Moonchild 2025-04-29 13:00:46 +02:00 committed by roytam1
commit 2416e71cd3
9 changed files with 82 additions and 28 deletions

View file

@ -48,10 +48,13 @@ public:
uint32_t GetSandboxFlags();
// Web IDL binding methods
// The XPCOM GetSrc is fine for our purposes
void SetSrc(const nsAString& aSrc, ErrorResult& aError)
void GetSrc(nsString& aSrc, nsIPrincipal&) const
{
SetHTMLAttr(nsGkAtoms::src, aSrc, aError);
GetURIAttr(nsGkAtoms::src, nullptr, aSrc);
}
void SetSrc(const nsAString& aSrc, nsIPrincipal& aTriggeringPrincipal, ErrorResult& aError)
{
SetHTMLAttr(nsGkAtoms::src, aSrc, aTriggeringPrincipal, aError);
}
void GetSrcdoc(DOMString& aSrcdoc)
{