зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1415352: Part 4a - Capture subject principal in innerHTML setters. r=bz
This is necessary in order to capture the correct triggering principal for inline <style> nodes. MozReview-Commit-ID: 9EaD40vRNkH --HG-- extra : rebase_source : cdd4a730f24dc57783edcf666ae803379c0d6173
This commit is contained in:
Родитель
e57d01c312
Коммит
0af54ad118
|
@ -4001,7 +4001,7 @@ Element::GetInnerHTML(nsAString& aInnerHTML)
|
|||
}
|
||||
|
||||
void
|
||||
Element::SetInnerHTML(const nsAString& aInnerHTML, ErrorResult& aError)
|
||||
Element::SetInnerHTML(const nsAString& aInnerHTML, nsIPrincipal& aSubjectPrincipal, ErrorResult& aError)
|
||||
{
|
||||
SetInnerHTMLInternal(aInnerHTML, aError);
|
||||
}
|
||||
|
|
|
@ -1219,7 +1219,11 @@ public:
|
|||
nsTArray<RefPtr<Animation>>& aAnimations);
|
||||
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML);
|
||||
virtual void SetInnerHTML(const nsAString& aInnerHTML, ErrorResult& aError);
|
||||
void GetInnerHTML(nsAString& aInnerHTML, nsIPrincipal& aSubjectPrincipal)
|
||||
{
|
||||
GetInnerHTML(aInnerHTML);
|
||||
}
|
||||
virtual void SetInnerHTML(const nsAString& aInnerHTML, nsIPrincipal& aSubjectPrincipal, ErrorResult& aError);
|
||||
void GetOuterHTML(nsAString& aOuterHTML);
|
||||
void SetOuterHTML(const nsAString& aOuterHTML, ErrorResult& aError);
|
||||
void InsertAdjacentHTML(const nsAString& aPosition, const nsAString& aText,
|
||||
|
|
|
@ -147,6 +147,7 @@ HTMLScriptElement::GetInnerHTML(nsAString& aInnerHTML)
|
|||
|
||||
void
|
||||
HTMLScriptElement::SetInnerHTML(const nsAString& aInnerHTML,
|
||||
nsIPrincipal& aScriptedPrincipal,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
aError = nsContentUtils::SetNodeTextContent(this, aInnerHTML, true);
|
||||
|
|
|
@ -29,6 +29,7 @@ public:
|
|||
|
||||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) override;
|
||||
virtual void SetInnerHTML(const nsAString& aInnerHTML,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
mozilla::ErrorResult& aError) override;
|
||||
|
||||
// nsIScriptElement
|
||||
|
|
|
@ -174,6 +174,7 @@ HTMLStyleElement::GetInnerHTML(nsAString& aInnerHTML)
|
|||
|
||||
void
|
||||
HTMLStyleElement::SetInnerHTML(const nsAString& aInnerHTML,
|
||||
nsIPrincipal& aScriptedPrincipal,
|
||||
ErrorResult& aError)
|
||||
{
|
||||
SetEnableUpdates(false);
|
||||
|
|
|
@ -34,6 +34,7 @@ public:
|
|||
NS_IMETHOD GetInnerHTML(nsAString& aInnerHTML) override;
|
||||
using nsGenericHTMLElement::SetInnerHTML;
|
||||
virtual void SetInnerHTML(const nsAString& aInnerHTML,
|
||||
nsIPrincipal& aSubjectPrincipal,
|
||||
mozilla::ErrorResult& aError) override;
|
||||
|
||||
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||
|
|
|
@ -221,7 +221,7 @@ partial interface Element {
|
|||
|
||||
// http://domparsing.spec.whatwg.org/#extensions-to-the-element-interface
|
||||
partial interface Element {
|
||||
[CEReactions, Pure,SetterThrows,TreatNullAs=EmptyString]
|
||||
[CEReactions, NeedsSubjectPrincipal, Pure,SetterThrows,TreatNullAs=EmptyString]
|
||||
attribute DOMString innerHTML;
|
||||
[CEReactions, Pure,SetterThrows,TreatNullAs=EmptyString]
|
||||
attribute DOMString outerHTML;
|
||||
|
|
Загрузка…
Ссылка в новой задаче