mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Issue #2736 - Part 8: Re-work <video> and <audio> src attribute.
Use subject principal as triggering principal in <video>/<audio> "src" attribute. We deviate from Mozilla here because we do not worry about content isolation principals in Page Info.
This commit is contained in:
parent
2416e71cd3
commit
b6bdce6f98
3 changed files with 13 additions and 4 deletions
|
|
@ -410,10 +410,13 @@ public:
|
|||
|
||||
MediaError* GetError() const;
|
||||
|
||||
// XPCOM GetSrc() is OK
|
||||
void SetSrc(const nsAString& aSrc, ErrorResult& aRv)
|
||||
void GetSrc(nsString& aSrc, nsIPrincipal&)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::src, aSrc, aRv);
|
||||
GetSrc(aSrc); // XPCOM
|
||||
}
|
||||
void SetSrc(const nsAString& aSrc, nsIPrincipal& aTriggeringPrincipal, ErrorResult& aRv)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::src, aSrc, aTriggeringPrincipal, aRv);
|
||||
}
|
||||
|
||||
// XPCOM GetCurrentSrc() is OK
|
||||
|
|
@ -1326,6 +1329,9 @@ protected:
|
|||
// set in the src attribute.
|
||||
RefPtr<DOMMediaStream> mSrcAttrStream;
|
||||
|
||||
// Holds the triggering principal for the src attribute.
|
||||
nsCOMPtr<nsIPrincipal> mSrcAttrTriggeringPrincipal;
|
||||
|
||||
// Holds a reference to the DOM wrapper for the MediaStream that we're
|
||||
// actually playing.
|
||||
// At most one of mDecoder and mSrcStream can be non-null.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue