Bug 1432186 part 1. Remove nsIDOMNode's prefix, namespaceURI, localName attributes. r=mccr8

Removing them all together because the only non-comm-central consumer is all
the same and this way there's no intermediate state to be maintained there
where we need both the nsINode and the nsIDOMNode.

MozReview-Commit-ID: GDjrroN1jao
This commit is contained in:
Boris Zbarsky 2018-01-29 23:10:49 -05:00
Родитель fa86235ca3
Коммит 4bba913229
3 изменённых файлов: 4 добавлений и 27 удалений

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

@ -2341,21 +2341,6 @@ ToCanonicalSupports(nsINode* aPointer)
*aResult = clone.forget().take()->AsDOMNode(); \
return NS_OK; \
} \
NS_IMETHOD GetNamespaceURI(nsAString& aNamespaceURI) __VA_ARGS__ override \
{ \
nsINode::GetNamespaceURI(aNamespaceURI); \
return NS_OK; \
} \
NS_IMETHOD GetPrefix(nsAString& aPrefix) __VA_ARGS__ override \
{ \
nsINode::GetPrefix(aPrefix); \
return NS_OK; \
} \
NS_IMETHOD GetLocalName(nsAString& aLocalName) __VA_ARGS__ override \
{ \
aLocalName = nsINode::LocalName(); \
return NS_OK; \
} \
NS_IMETHOD GetTextContent(nsAString& aTextContent) __VA_ARGS__ override \
{ \
mozilla::ErrorResult rv; \

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

@ -50,13 +50,6 @@ interface nsIDOMNode : nsISupports
boolean hasChildNodes();
// Modified in DOM Level 4:
[optional_argc] nsIDOMNode cloneNode([optional] in boolean deep);
// Introduced in DOM Level 2:
readonly attribute DOMString namespaceURI;
// Modified in DOM Core
readonly attribute DOMString prefix;
// Introduced in DOM Level 2:
readonly attribute DOMString localName;
// DocumentPosition
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;

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

@ -366,21 +366,20 @@ inDOMView::GetCellText(int32_t row, nsITreeColumn* col, nsAString& _retval)
RowToNode(row, &node);
if (!node) return NS_ERROR_FAILURE;
nsIDOMNode* domNode = node->node;
nsCOMPtr<nsINode> domNode = do_QueryInterface(node->node);
nsAutoString colID;
col->GetId(colID);
if (colID.EqualsLiteral("colNodeName"))
domNode->GetNodeName(_retval);
_retval = domNode->NodeName();
else if (colID.EqualsLiteral("colLocalName"))
domNode->GetLocalName(_retval);
_retval = domNode->LocalName();
else if (colID.EqualsLiteral("colPrefix"))
domNode->GetPrefix(_retval);
else if (colID.EqualsLiteral("colNamespaceURI"))
domNode->GetNamespaceURI(_retval);
else if (colID.EqualsLiteral("colNodeType")) {
uint16_t nodeType;
domNode->GetNodeType(&nodeType);
uint16_t nodeType = domNode->NodeType();
nsAutoString temp;
temp.AppendInt(int32_t(nodeType));
_retval = temp;