mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 10:15:41 +00:00
Bug 1190172 part 4 - Remove unused nsHTMLEditor::HasAttr; r=ehsan
--HG-- extra : rebase_source : 8421d6056d8867b788e2da3a76d0df0e09c620b6
This commit is contained in:
parent
e35122e0fc
commit
10a6476077
@ -678,7 +678,6 @@ protected:
|
||||
const nsAString* aAttribute);
|
||||
|
||||
bool NodeIsProperty(nsIDOMNode *aNode);
|
||||
bool HasAttr(nsIDOMNode *aNode, const nsAString *aAttribute);
|
||||
bool IsAtFrontOfNode(nsIDOMNode *aNode, int32_t aOffset);
|
||||
bool IsAtEndOfNode(nsIDOMNode *aNode, int32_t aOffset);
|
||||
bool IsOnlyAttribute(const nsIContent* aElement, const nsAString& aAttribute);
|
||||
|
@ -848,26 +848,6 @@ nsHTMLEditor::IsOnlyAttribute(const nsIContent* aContent,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool nsHTMLEditor::HasAttr(nsIDOMNode* aNode,
|
||||
const nsAString* aAttribute)
|
||||
{
|
||||
NS_ENSURE_TRUE(aNode, false);
|
||||
if (!aAttribute || aAttribute->IsEmpty()) {
|
||||
// everybody has the 'null' attribute
|
||||
return true;
|
||||
}
|
||||
|
||||
// get element
|
||||
nsCOMPtr<dom::Element> element = do_QueryInterface(aNode);
|
||||
NS_ENSURE_TRUE(element, false);
|
||||
|
||||
nsCOMPtr<nsIAtom> atom = NS_Atomize(*aAttribute);
|
||||
NS_ENSURE_TRUE(atom, false);
|
||||
|
||||
return element->HasAttr(kNameSpaceID_None, atom);
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsHTMLEditor::PromoteRangeIfStartsOrEndsInNamedAnchor(nsRange* inRange)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user