Bug 1948577 - Revert undesired IDL changes for Attr.textContent and Attr.nodeValue. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D238412
This commit is contained in:
@@ -187,8 +187,7 @@ bool Attr::Specified() const { return true; }
|
||||
|
||||
Element* Attr::GetOwnerElement() { return GetElement(); }
|
||||
|
||||
void Attr::SetNodeValueWithTrustedTypeCheck(const nsAString& aNodeValue,
|
||||
ErrorResult& aError) {
|
||||
void Attr::SetNodeValue(const nsAString& aNodeValue, ErrorResult& aError) {
|
||||
SetValue(aNodeValue, nullptr, aError);
|
||||
}
|
||||
|
||||
@@ -217,9 +216,9 @@ nsIURI* Attr::GetBaseURI(bool aTryUseXHRDocBaseURI) const {
|
||||
: OwnerDoc()->GetBaseURI(aTryUseXHRDocBaseURI);
|
||||
}
|
||||
|
||||
void Attr::SetTextContentWithTrustedTypeCheck(const nsAString& aTextContent,
|
||||
nsIPrincipal* aSubjectPrincipal,
|
||||
ErrorResult& aError) {
|
||||
void Attr::SetTextContent(const nsAString& aTextContent,
|
||||
nsIPrincipal* aSubjectPrincipal,
|
||||
ErrorResult& aError) {
|
||||
SetValue(aTextContent, aSubjectPrincipal, aError);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,23 +42,16 @@ class Attr final : public nsINode {
|
||||
NS_IMPL_FROMNODE_HELPER(Attr, IsAttr())
|
||||
|
||||
// nsINode interface
|
||||
void GetTextContentWithTrustedTypeCheck(nsAString& aTextContent,
|
||||
mozilla::OOMReporter& aError) {
|
||||
GetTextContentInternal(aTextContent, aError);
|
||||
}
|
||||
MOZ_CAN_RUN_SCRIPT void SetTextContentWithTrustedTypeCheck(
|
||||
const nsAString& aTextContent, nsIPrincipal* aSubjectPrincipal,
|
||||
mozilla::ErrorResult& aError);
|
||||
MOZ_CAN_RUN_SCRIPT void SetTextContent(const nsAString& aTextContent,
|
||||
nsIPrincipal* aSubjectPrincipal,
|
||||
mozilla::ErrorResult& aError) override;
|
||||
virtual void GetTextContentInternal(nsAString& aTextContent,
|
||||
OOMReporter& aError) override;
|
||||
virtual void SetTextContentInternal(const nsAString& aTextContent,
|
||||
nsIPrincipal* aSubjectPrincipal,
|
||||
ErrorResult& aError) override;
|
||||
void GetNodeValueWithTrustedTypeCheck(nsAString& aNodeValue) {
|
||||
GetNodeValueInternal(aNodeValue);
|
||||
}
|
||||
MOZ_CAN_RUN_SCRIPT void SetNodeValueWithTrustedTypeCheck(
|
||||
const nsAString& aNodeValue, mozilla::ErrorResult& aError);
|
||||
MOZ_CAN_RUN_SCRIPT void SetNodeValue(const nsAString& aNodeValue,
|
||||
mozilla::ErrorResult& aError) override;
|
||||
virtual void GetNodeValueInternal(nsAString& aNodeValue) override;
|
||||
virtual void SetNodeValueInternal(const nsAString& aNodeValue,
|
||||
ErrorResult& aError) override;
|
||||
|
||||
@@ -1802,9 +1802,9 @@ class nsINode : public mozilla::dom::EventTarget {
|
||||
void GetTextContent(nsAString& aTextContent, mozilla::OOMReporter& aError) {
|
||||
GetTextContentInternal(aTextContent, aError);
|
||||
}
|
||||
void SetTextContent(const nsAString& aTextContent,
|
||||
nsIPrincipal* aSubjectPrincipal,
|
||||
mozilla::ErrorResult& aError) {
|
||||
MOZ_CAN_RUN_SCRIPT virtual void SetTextContent(
|
||||
const nsAString& aTextContent, nsIPrincipal* aSubjectPrincipal,
|
||||
mozilla::ErrorResult& aError) {
|
||||
SetTextContentInternal(aTextContent, aSubjectPrincipal, aError);
|
||||
}
|
||||
void SetTextContent(const nsAString& aTextContent,
|
||||
@@ -2299,7 +2299,8 @@ class nsINode : public mozilla::dom::EventTarget {
|
||||
nsINode& aOther, mozilla::Maybe<uint32_t>* aThisIndex = nullptr,
|
||||
mozilla::Maybe<uint32_t>* aOtherIndex = nullptr) const;
|
||||
void GetNodeValue(nsAString& aNodeValue) { GetNodeValueInternal(aNodeValue); }
|
||||
void SetNodeValue(const nsAString& aNodeValue, mozilla::ErrorResult& aError) {
|
||||
MOZ_CAN_RUN_SCRIPT virtual void SetNodeValue(const nsAString& aNodeValue,
|
||||
mozilla::ErrorResult& aError) {
|
||||
SetNodeValueInternal(aNodeValue, aError);
|
||||
}
|
||||
virtual void GetNodeValueInternal(nsAString& aNodeValue);
|
||||
|
||||
@@ -16,15 +16,6 @@ interface Attr : Node {
|
||||
[CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows]
|
||||
attribute DOMString value;
|
||||
|
||||
// Rename binary names of nodeValue and textContent from the Node interface.
|
||||
[CEReactions, SetterThrows, Pure,
|
||||
BinaryName="nodeValueWithTrustedTypeCheck"]
|
||||
attribute DOMString? nodeValue;
|
||||
[CEReactions, SetterThrows, GetterCanOOM,
|
||||
SetterNeedsSubjectPrincipal=NonSystem, Pure,
|
||||
BinaryName="textContentWithTrustedTypeCheck"]
|
||||
attribute DOMString? textContent;
|
||||
|
||||
[Constant]
|
||||
readonly attribute DOMString name;
|
||||
[Constant]
|
||||
|
||||
Reference in New Issue
Block a user