mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 23:23:33 +00:00
Bug 1411687 - part 0: Get rid of HTMLEditor::GetBlockNodeParent(nsIDOMNode*) r=m_kato
Currently, HTMLEditor::GetBlockNodeParent(nsIDOMNode*) is used only by HTMLEditor::DoInsertHTMLWithContext() and there is a variable of nsINode*. So, we don't need to keep it anymore. MozReview-Commit-ID: LEWaiR5BEB9 --HG-- extra : rebase_source : 64ef772f3b7883bd4aae48dec737663e6036553b
This commit is contained in:
parent
1e17939ca3
commit
bb82521595
@ -764,19 +764,6 @@ HTMLEditor::GetBlockNodeParent(nsINode* aNode)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsIDOMNode*
|
||||
HTMLEditor::GetBlockNodeParent(nsIDOMNode* aNode)
|
||||
{
|
||||
nsCOMPtr<nsINode> node = do_QueryInterface(aNode);
|
||||
|
||||
if (!node) {
|
||||
NS_NOTREACHED("null node passed to GetBlockNodeParent()");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return GetAsDOMNode(GetBlockNodeParent(node));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the node if it's a block, otherwise GetBlockNodeParent
|
||||
*/
|
||||
|
@ -187,7 +187,6 @@ public:
|
||||
|
||||
// Block methods moved from EditorBase
|
||||
static Element* GetBlockNodeParent(nsINode* aNode);
|
||||
static nsIDOMNode* GetBlockNodeParent(nsIDOMNode* aNode);
|
||||
static Element* GetBlock(nsINode& aNode);
|
||||
|
||||
void IsNextCharInNodeWhitespace(nsIContent* aContent,
|
||||
|
@ -426,8 +426,8 @@ HTMLEditor::DoInsertHTMLWithContext(const nsAString& aInputString,
|
||||
NS_ENSURE_STATE(parentNodeNode || !parentNode);
|
||||
if (IsBlockNode(parentNodeNode)) {
|
||||
parentBlock = parentNode;
|
||||
} else {
|
||||
parentBlock = GetBlockNodeParent(parentNode);
|
||||
} else if (parentNodeNode) {
|
||||
parentBlock = GetAsDOMNode(GetBlockNodeParent(parentNodeNode));
|
||||
}
|
||||
|
||||
int32_t listCount = nodeList.Length();
|
||||
|
Loading…
x
Reference in New Issue
Block a user