mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 1431964 part 9. Stop using nsIDOMAttr in JS. r=mccr8
MozReview-Commit-ID: 59TspEgvNRF
This commit is contained in:
parent
e38dec29f4
commit
e338b5f525
@ -1863,7 +1863,7 @@ DebuggerServer.ObjectActorPreviewers.Object = [
|
||||
for (let attr of rawObj.attributes) {
|
||||
preview.attributes[attr.nodeName] = hooks.createValueGrip(attr.value);
|
||||
}
|
||||
} else if (rawObj instanceof Ci.nsIDOMAttr) {
|
||||
} else if (obj.class == "Attr") {
|
||||
preview.value = hooks.createValueGrip(rawObj.value);
|
||||
} else if (rawObj instanceof Ci.nsIDOMText ||
|
||||
rawObj instanceof Ci.nsIDOMComment) {
|
||||
|
@ -224,7 +224,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
testNoInterface(savedElement, Components.interfaces.nsIDOMAttr);
|
||||
testNoInterface(savedElement, Components.interfaces.nsIClassInfo);
|
||||
|
||||
// Test to ensure that we don't pass CPOWs to C++-implemented interfaces.
|
||||
|
@ -18,7 +18,6 @@ const nsIDOMDocument = I.nsIDOMDocument;
|
||||
const nsIDOMElement = I.nsIDOMElement;
|
||||
const nsIDOMNode = I.nsIDOMNode;
|
||||
const nsIDOMCharacterData = I.nsIDOMCharacterData;
|
||||
const nsIDOMAttr = I.nsIDOMAttr;
|
||||
const nsIDOMNodeList = I.nsIDOMNodeList;
|
||||
const nsIDOMXULElement = I.nsIDOMXULElement;
|
||||
const nsIDOMProcessingInstruction = I.nsIDOMProcessingInstruction;
|
||||
@ -94,8 +93,7 @@ function do_compare_attrs(e1, e2) {
|
||||
do_throw("Missing attribute with namespaceURI '" + att.namespaceURI +
|
||||
"' and localName '" + att.localName + "'");
|
||||
}
|
||||
Assert.equal(att.QueryInterface(nsIDOMAttr).value,
|
||||
att2.QueryInterface(nsIDOMAttr).value);
|
||||
Assert.equal(att.value, att2.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -388,7 +388,6 @@ function test_isEqualNode_wholeDoc()
|
||||
|
||||
function n(node) { return node ? node.QueryInterface(nsIDOMNode) : null; }
|
||||
function el(node) { return node ? node.QueryInterface(nsIDOMElement) : null; }
|
||||
function at(node) { return node ? node.QueryInterface(nsIDOMAttr) : null; }
|
||||
|
||||
|
||||
// TESTING FUNCTIONS
|
||||
|
@ -1119,7 +1119,6 @@ function UpdatePatch(patch) {
|
||||
this._properties = {};
|
||||
for (var i = 0; i < patch.attributes.length; ++i) {
|
||||
var attr = patch.attributes.item(i);
|
||||
attr.QueryInterface(Ci.nsIDOMAttr);
|
||||
switch (attr.name) {
|
||||
case "selected":
|
||||
this.selected = attr.value == "true";
|
||||
@ -1292,7 +1291,6 @@ function Update(update) {
|
||||
|
||||
for (let i = 0; i < update.attributes.length; ++i) {
|
||||
var attr = update.attributes.item(i);
|
||||
attr.QueryInterface(Ci.nsIDOMAttr);
|
||||
if (attr.value == "undefined") {
|
||||
continue;
|
||||
} else if (attr.name == "detailsURL") {
|
||||
|
@ -9,7 +9,6 @@
|
||||
|
||||
#include "nsIContainerBoxObject.h"
|
||||
#include "nsIDOMAnimationEvent.h"
|
||||
#include "nsIDOMAttr.h"
|
||||
#include "nsIDOMBeforeUnloadEvent.h"
|
||||
#include "nsIDOMCanvasRenderingContext2D.h"
|
||||
#include "nsIDOMCDATASection.h"
|
||||
@ -89,7 +88,6 @@
|
||||
#include "nsIXMLHttpRequest.h"
|
||||
|
||||
#include "mozilla/dom/AnimationEventBinding.h"
|
||||
#include "mozilla/dom/AttrBinding.h"
|
||||
#include "mozilla/dom/BeforeUnloadEventBinding.h"
|
||||
#include "mozilla/dom/CanvasRenderingContext2DBinding.h"
|
||||
#include "mozilla/dom/CDATASectionBinding.h"
|
||||
@ -241,7 +239,6 @@ struct ComponentsInterfaceShimEntry {
|
||||
const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
|
||||
{
|
||||
DEFINE_SHIM(AnimationEvent),
|
||||
DEFINE_SHIM(Attr),
|
||||
DEFINE_SHIM(BeforeUnloadEvent),
|
||||
DEFINE_SHIM(CanvasRenderingContext2D),
|
||||
DEFINE_SHIM(CDATASection),
|
||||
|
Loading…
Reference in New Issue
Block a user