Bug 1591145 - Remove Document.GetAnonymousElementByAttribute r=webidl,baku

Differential Revision: https://phabricator.services.mozilla.com/D52215

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brian Grinstead 2019-11-07 21:36:15 +00:00
Родитель 84b86a58c1
Коммит 115b8b4e27
4 изменённых файлов: 1 добавлений и 24 удалений

Просмотреть файл

@ -7810,18 +7810,6 @@ Element* Document::GetBindingParent(nsINode& aNode) {
return bindingParent ? bindingParent->AsElement() : nullptr;
}
Element* Document::GetAnonymousElementByAttribute(
nsIContent* aElement, nsAtom* aAttrName,
const nsAString& aAttrValue) const {
return nullptr;
}
Element* Document::GetAnonymousElementByAttribute(Element& aElement,
const nsAString& aAttrName,
const nsAString& aAttrValue) {
return nullptr;
}
nsINodeList* Document::GetAnonymousNodes(Element& aElement) { return nullptr; }
already_AddRefed<nsRange> Document::CreateRange(ErrorResult& rv) {

Просмотреть файл

@ -2745,10 +2745,6 @@ class Document : public nsINode,
*/
bool HaveFiredDOMTitleChange() const { return mHaveFiredTitleChange; }
Element* GetAnonymousElementByAttribute(nsIContent* aElement,
nsAtom* aAttrName,
const nsAString& aAttrValue) const;
/**
* To batch DOMSubtreeModified, document needs to be informed when
* a mutation event might be dispatched, even if the event isn't actually
@ -3713,9 +3709,6 @@ class Document : public nsINode,
// QuerySelector and QuerySelectorAll already defined on nsINode
nsINodeList* GetAnonymousNodes(Element& aElement);
Element* GetAnonymousElementByAttribute(Element& aElement,
const nsAString& aAttrName,
const nsAString& aAttrValue);
Element* GetBindingParent(nsINode& aNode);
XPathExpression* CreateExpression(const nsAString& aExpression,

Просмотреть файл

@ -382,9 +382,6 @@ partial interface Document {
[Func="IsChromeOrXBL"]
NodeList? getAnonymousNodes(Element elt);
[Func="IsChromeOrXBL"]
Element? getAnonymousElementByAttribute(Element elt, DOMString attrName,
DOMString attrValue);
[Func="IsChromeOrXBL"]
Element? getBindingParent(Node node);
// Creates a new XUL element regardless of the document's default type.
[CEReactions, NewObject, Throws, Func="IsChromeOrXBL"]

Просмотреть файл

@ -11,8 +11,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=912322
<script type="application/javascript">
/** Test that XBL functions aren't exposed to the web. **/
funs = ['getAnonymousNodes', 'getAnonymousElementByAttribute',
'getBindingParent'];
funs = ['getAnonymousNodes', 'getBindingParent'];
for (var f of funs) {
ok(!(f in document), f + " should not be available to content");
ok(f in SpecialPowers.wrap(document), f + " should be available to chrome via Xray");