mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 15:55:36 +00:00
Bug 1432186 part 13. Remove nsIDOMNode's nextSibling attribute. r=mccr8
MozReview-Commit-ID: DTaivhMORXr
This commit is contained in:
parent
97302665b4
commit
323cec654b
@ -532,16 +532,6 @@ nsINode::GetChildNodes(nsIDOMNodeList** aChildNodes)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsINode::GetNextSibling(nsIDOMNode** aNextSibling)
|
||||
{
|
||||
*aNextSibling = nullptr;
|
||||
|
||||
nsIContent *sibling = GetNextSibling();
|
||||
|
||||
return sibling ? CallQueryInterface(sibling, aNextSibling) : NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsINode::GetOwnerDocument(nsIDOMDocument** aOwnerDocument)
|
||||
{
|
||||
|
@ -2078,7 +2078,6 @@ protected:
|
||||
// NS_FORWARD_NSIDOMNODE_TO_NSINODE_HELPER and for quickstubs.
|
||||
nsresult GetParentNode(nsIDOMNode** aParentNode);
|
||||
nsresult GetChildNodes(nsIDOMNodeList** aChildNodes);
|
||||
nsresult GetNextSibling(nsIDOMNode** aNextSibling);
|
||||
nsresult GetOwnerDocument(nsIDOMDocument** aOwnerDocument);
|
||||
|
||||
void EnsurePreInsertionValidity1(nsINode& aNewChild, nsINode* aRefChild,
|
||||
@ -2274,10 +2273,6 @@ ToCanonicalSupports(nsINode* aPointer)
|
||||
{ \
|
||||
return nsINode::GetChildNodes(aChildNodes); \
|
||||
} \
|
||||
NS_IMETHOD GetNextSibling(nsIDOMNode** aNextSibling) __VA_ARGS__ override \
|
||||
{ \
|
||||
return nsINode::GetNextSibling(aNextSibling); \
|
||||
} \
|
||||
NS_IMETHOD GetOwnerDocument(nsIDOMDocument** aOwnerDocument) __VA_ARGS__ override \
|
||||
{ \
|
||||
return nsINode::GetOwnerDocument(aOwnerDocument); \
|
||||
|
@ -34,7 +34,6 @@ interface nsIDOMNode : nsISupports
|
||||
|
||||
readonly attribute nsIDOMNode parentNode;
|
||||
readonly attribute nsIDOMNodeList childNodes;
|
||||
readonly attribute nsIDOMNode nextSibling;
|
||||
// Modified in DOM Level 2:
|
||||
readonly attribute nsIDOMDocument ownerDocument;
|
||||
boolean hasChildNodes();
|
||||
|
@ -5428,50 +5428,6 @@ EditorBase::SwitchTextDirectionTo(uint32_t aDirection)
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG_JOE
|
||||
void
|
||||
EditorBase::DumpNode(nsIDOMNode* aNode,
|
||||
int32_t indent)
|
||||
{
|
||||
for (int32_t i = 0; i < indent; i++) {
|
||||
printf(" ");
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDOMElement> element = do_QueryInterface(aNode);
|
||||
nsCOMPtr<nsIDOMDocumentFragment> docfrag = do_QueryInterface(aNode);
|
||||
|
||||
if (element || docfrag) {
|
||||
if (element) {
|
||||
nsAutoString tag;
|
||||
element->GetTagName(tag);
|
||||
printf("<%s>\n", NS_LossyConvertUTF16toASCII(tag).get());
|
||||
} else {
|
||||
printf("<document fragment>\n");
|
||||
}
|
||||
nsCOMPtr<nsIDOMNodeList> childList;
|
||||
aNode->GetChildNodes(getter_AddRefs(childList));
|
||||
NS_ENSURE_TRUE(childList, NS_ERROR_NULL_POINTER);
|
||||
uint32_t numChildren;
|
||||
childList->GetLength(&numChildren);
|
||||
nsCOMPtr<nsIDOMNode> child, tmp;
|
||||
aNode->GetFirstChild(getter_AddRefs(child));
|
||||
for (uint32_t i = 0; i < numChildren; i++) {
|
||||
DumpNode(child, indent + 1);
|
||||
child->GetNextSibling(getter_AddRefs(tmp));
|
||||
child = tmp;
|
||||
}
|
||||
} else if (IsTextNode(aNode)) {
|
||||
nsCOMPtr<nsIDOMCharacterData> textNode = do_QueryInterface(aNode);
|
||||
nsAutoString str;
|
||||
textNode->GetData(str);
|
||||
nsAutoCString cstr;
|
||||
LossyCopyUTF16toASCII(str, cstr);
|
||||
cstr.ReplaceChar('\n', ' ');
|
||||
printf("<textnode> %s\n", cstr.get());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
EditorBase::IsModifiableNode(nsIDOMNode* aNode)
|
||||
{
|
||||
|
@ -1042,9 +1042,6 @@ public:
|
||||
static nsresult GetEndChildNode(Selection* aSelection,
|
||||
nsIContent** aEndNode);
|
||||
|
||||
#if DEBUG_JOE
|
||||
static void DumpNode(nsIDOMNode* aNode, int32_t indent = 0);
|
||||
#endif
|
||||
Selection* GetSelection(SelectionType aSelectionType =
|
||||
SelectionType::eNormal)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user