зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1134280 - Get rid of Tag() - patch 4 - Get rid of nsDocumentEncoder::IsTag, r=smaug
This commit is contained in:
Родитель
ef86fe9f3e
Коммит
0487326e6e
|
@ -134,8 +134,6 @@ protected:
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool IsTag(nsIContent* aContent, nsIAtom* aAtom);
|
||||
|
||||
virtual bool IncludeInContext(nsINode *aNode);
|
||||
|
||||
nsCOMPtr<nsIDocument> mDocument;
|
||||
|
@ -541,12 +539,6 @@ nsDocumentEncoder::SerializeToStringIterative(nsINode* aNode,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
nsDocumentEncoder::IsTag(nsIContent* aContent, nsIAtom* aAtom)
|
||||
{
|
||||
return aContent && aContent->NodeInfo()->NameAtom() == aAtom;
|
||||
}
|
||||
|
||||
static nsresult
|
||||
ConvertAndWrite(const nsAString& aString,
|
||||
nsIOutputStream* aStream,
|
||||
|
@ -1886,18 +1878,19 @@ bool
|
|||
nsHTMLCopyEncoder::IsRoot(nsIDOMNode* aNode)
|
||||
{
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
|
||||
if (content)
|
||||
{
|
||||
if (mIsTextWidget)
|
||||
return (IsTag(content, nsGkAtoms::div));
|
||||
|
||||
return (IsTag(content, nsGkAtoms::body) ||
|
||||
IsTag(content, nsGkAtoms::td) ||
|
||||
IsTag(content, nsGkAtoms::th));
|
||||
}
|
||||
if (!content) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mIsTextWidget) {
|
||||
return content->IsHTMLElement(nsGkAtoms::div);
|
||||
}
|
||||
|
||||
return content->IsAnyOfHTMLElements(nsGkAtoms::body,
|
||||
nsGkAtoms::td,
|
||||
nsGkAtoms::th);
|
||||
}
|
||||
|
||||
bool
|
||||
nsHTMLCopyEncoder::IsFirstNode(nsIDOMNode *aNode)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче