зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1432944 part 6. Remove the nsIDOMNode overloads of HTMLEditUtils::IsNamedAnchor and HTMLEditUtils::IsTable. r=m_kato
MozReview-Commit-ID: 4KlppKdzJGy
This commit is contained in:
Родитель
423c0886df
Коммит
a6f9dbf34e
|
@ -202,12 +202,6 @@ HTMLEditUtils::IsTableElementButNotTable(nsINode* aNode)
|
|||
/**
|
||||
* IsTable() returns true if aNode is an html table.
|
||||
*/
|
||||
bool
|
||||
HTMLEditUtils::IsTable(nsIDOMNode* aNode)
|
||||
{
|
||||
return EditorBase::NodeIsType(aNode, nsGkAtoms::table);
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLEditUtils::IsTable(nsINode* aNode)
|
||||
{
|
||||
|
@ -354,13 +348,6 @@ HTMLEditUtils::IsLink(nsINode* aNode)
|
|||
return !tmpText.IsEmpty();
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLEditUtils::IsNamedAnchor(nsIDOMNode *aNode)
|
||||
{
|
||||
nsCOMPtr<nsINode> node = do_QueryInterface(aNode);
|
||||
return node && IsNamedAnchor(node);
|
||||
}
|
||||
|
||||
bool
|
||||
HTMLEditUtils::IsNamedAnchor(nsINode* aNode)
|
||||
{
|
||||
|
|
|
@ -26,7 +26,6 @@ public:
|
|||
static bool IsParagraph(nsIDOMNode* aNode);
|
||||
static bool IsListItem(nsINode* aNode);
|
||||
static bool IsListItem(nsIDOMNode* aNode);
|
||||
static bool IsTable(nsIDOMNode* aNode);
|
||||
static bool IsTable(nsINode* aNode);
|
||||
static bool IsTableRow(nsIDOMNode* aNode);
|
||||
static bool IsTableRow(nsINode* aNode);
|
||||
|
@ -49,7 +48,6 @@ public:
|
|||
static bool IsImage(nsIDOMNode* aNode);
|
||||
static bool IsLink(nsINode* aNode);
|
||||
static bool IsNamedAnchor(nsINode* aNode);
|
||||
static bool IsNamedAnchor(nsIDOMNode* aNode);
|
||||
static bool IsDiv(nsIDOMNode* aNode);
|
||||
static bool IsMozDiv(nsINode* aNode);
|
||||
static bool IsMozDiv(nsIDOMNode* aNode);
|
||||
|
|
|
@ -1430,8 +1430,6 @@ HTMLEditor::InsertElementAtSelection(nsIDOMElement* aElement,
|
|||
nsCOMPtr<Element> element = do_QueryInterface(aElement);
|
||||
NS_ENSURE_TRUE(element, NS_ERROR_NULL_POINTER);
|
||||
|
||||
nsCOMPtr<nsIDOMNode> node = do_QueryInterface(aElement);
|
||||
|
||||
CommitComposition();
|
||||
AutoPlaceholderBatch beginBatching(this);
|
||||
AutoRules beginRulesSniffing(this, EditAction::insertElement,
|
||||
|
@ -1471,7 +1469,7 @@ HTMLEditor::InsertElementAtSelection(nsIDOMElement* aElement,
|
|||
// Named Anchor is a special case,
|
||||
// We collapse to insert element BEFORE the selection
|
||||
// For all other tags, we insert AFTER the selection
|
||||
if (HTMLEditUtils::IsNamedAnchor(node)) {
|
||||
if (HTMLEditUtils::IsNamedAnchor(element)) {
|
||||
selection->CollapseToStart();
|
||||
} else {
|
||||
selection->CollapseToEnd();
|
||||
|
@ -1501,7 +1499,7 @@ HTMLEditor::InsertElementAtSelection(nsIDOMElement* aElement,
|
|||
}
|
||||
// check for inserting a whole table at the end of a block. If so insert
|
||||
// a br after it.
|
||||
if (HTMLEditUtils::IsTable(node) &&
|
||||
if (HTMLEditUtils::IsTable(element) &&
|
||||
IsLastEditableChild(element)) {
|
||||
DebugOnly<bool> advanced = insertedPoint.AdvanceOffset();
|
||||
NS_WARNING_ASSERTION(advanced,
|
||||
|
|
Загрузка…
Ссылка в новой задаче