Bug 1418085 part 4. Stop using nsIDOMHTMLElement in JS code. r=mystor

MozReview-Commit-ID: GsSnXNXGrHg
This commit is contained in:
Boris Zbarsky 2018-01-30 00:25:36 -05:00
Родитель 956a937d93
Коммит b9771573b3
2 изменённых файлов: 6 добавлений и 6 удалений

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

@ -1853,11 +1853,15 @@ DebuggerServer.ObjectActorPreviewers.Object = [
}
}
} else if (rawObj instanceof Ci.nsIDOMElement) {
// Add preview for DOM element attributes.
if (rawObj instanceof Ci.nsIDOMHTMLElement) {
// For HTML elements (in an HTML document, at least), the nodeName is an
// uppercased version of the actual element name. Check for HTML
// elements, that is elements in the HTML namespace, and lowercase the
// nodeName in that case.
if (rawObj.namespaceURI == "http://www.w3.org/1999/xhtml") {
preview.nodeName = preview.nodeName.toLowerCase();
}
// Add preview for DOM element attributes.
preview.attributes = {};
preview.attributesLength = rawObj.attributes.length;
for (let attr of rawObj.attributes) {

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

@ -41,10 +41,6 @@ function HTML_TAG(aTagName, aImplClass) {
var interfaceName = "nsIDOM" + getClassName(aTagName);
if (interfaceName in SpecialPowers.Ci) { // no nsIDOMHTMLSpanElement
interfaces[aTagName].push(interfaceName);
interfacesNonClassinfo[aTagName].push("nsIDOMHTMLElement");
} else {
// Inherits directly from nsIDOMHTMLElement.
interfaces[aTagName].push("nsIDOMHTMLElement");
}
var interfaceNameNS = "nsIDOMNS" + getClassName(aTagName);