mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 647433 - Rename mContent to mElement in implementations of nsIContentSerializer; r=bz
This commit is contained in:
parent
87a9e995de
commit
ae8afde742
@ -84,9 +84,6 @@ static inline PRUnichar* escape(const nsString& source)
|
||||
nsresult NS_NewSanitizingHTMLSerializer(nsIContentSerializer** aSerializer)
|
||||
{
|
||||
mozSanitizingHTMLSerializer* it = new mozSanitizingHTMLSerializer();
|
||||
if (!it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
NS_ADDREF(it);
|
||||
*aSerializer = it;
|
||||
return NS_OK;
|
||||
@ -248,11 +245,11 @@ mozSanitizingHTMLSerializer::AppendElementStart(Element* aElement,
|
||||
{
|
||||
NS_ENSURE_ARG(aElement);
|
||||
|
||||
mContent = aElement;
|
||||
mElement = aElement;
|
||||
|
||||
mOutputString = &aStr;
|
||||
|
||||
PRInt32 id = GetIdForContent(mContent);
|
||||
PRInt32 id = GetIdForContent(mElement);
|
||||
|
||||
PRBool isContainer = IsContainer(id);
|
||||
|
||||
@ -264,7 +261,7 @@ mozSanitizingHTMLSerializer::AppendElementStart(Element* aElement,
|
||||
rv = DoAddLeaf(id, EmptyString());
|
||||
}
|
||||
|
||||
mContent = 0;
|
||||
mElement = nsnull;
|
||||
mOutputString = nsnull;
|
||||
|
||||
return rv;
|
||||
@ -276,20 +273,20 @@ mozSanitizingHTMLSerializer::AppendElementEnd(Element* aElement,
|
||||
{
|
||||
NS_ENSURE_ARG(aElement);
|
||||
|
||||
mContent = aElement;
|
||||
mElement = aElement;
|
||||
|
||||
mOutputString = &aStr;
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
PRInt32 id = GetIdForContent(mContent);
|
||||
PRInt32 id = GetIdForContent(mElement);
|
||||
|
||||
PRBool isContainer = IsContainer(id);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
if (isContainer) {
|
||||
rv = DoCloseContainer(id);
|
||||
}
|
||||
|
||||
mContent = 0;
|
||||
mElement = nsnull;
|
||||
mOutputString = nsnull;
|
||||
|
||||
return rv;
|
||||
|
@ -151,7 +151,7 @@ protected:
|
||||
PRUint32 mSkipLevel;
|
||||
nsHashtable mAllowedTags;
|
||||
|
||||
nsRefPtr<mozilla::dom::Element> mContent;
|
||||
nsRefPtr<mozilla::dom::Element> mElement;
|
||||
nsAString* mOutputString;
|
||||
nsIParserNode* mParserNode;
|
||||
nsCOMPtr<nsIParserService> mParserService;
|
||||
|
@ -391,10 +391,10 @@ nsPlainTextSerializer::AppendElementStart(Element* aElement,
|
||||
{
|
||||
NS_ENSURE_ARG(aElement);
|
||||
|
||||
mContent = aElement;
|
||||
mElement = aElement;
|
||||
|
||||
nsresult rv;
|
||||
PRInt32 id = GetIdForContent(mContent);
|
||||
PRInt32 id = GetIdForContent(mElement);
|
||||
|
||||
PRBool isContainer = IsContainer(id);
|
||||
|
||||
@ -407,7 +407,7 @@ nsPlainTextSerializer::AppendElementStart(Element* aElement,
|
||||
rv = DoAddLeaf(nsnull, id, EmptyString());
|
||||
}
|
||||
|
||||
mContent = 0;
|
||||
mElement = nsnull;
|
||||
mOutputString = nsnull;
|
||||
|
||||
if (id == eHTMLTag_head) {
|
||||
@ -423,10 +423,10 @@ nsPlainTextSerializer::AppendElementEnd(Element* aElement,
|
||||
{
|
||||
NS_ENSURE_ARG(aElement);
|
||||
|
||||
mContent = aElement;
|
||||
mElement = aElement;
|
||||
|
||||
nsresult rv;
|
||||
PRInt32 id = GetIdForContent(mContent);
|
||||
PRInt32 id = GetIdForContent(mElement);
|
||||
|
||||
PRBool isContainer = IsContainer(id);
|
||||
|
||||
@ -437,7 +437,7 @@ nsPlainTextSerializer::AppendElementEnd(Element* aElement,
|
||||
rv = DoCloseContainer(id);
|
||||
}
|
||||
|
||||
mContent = 0;
|
||||
mElement = nsnull;
|
||||
mOutputString = nsnull;
|
||||
|
||||
if (id == eHTMLTag_head) {
|
||||
@ -542,7 +542,7 @@ nsPlainTextSerializer::IsEnabled(PRInt32 aTag, PRBool* aReturn)
|
||||
}
|
||||
|
||||
/**
|
||||
* aNode may be null when we're working with the DOM, but then mContent is
|
||||
* aNode may be null when we're working with the DOM, but then mElement is
|
||||
* useable instead.
|
||||
*/
|
||||
nsresult
|
||||
@ -1071,7 +1071,7 @@ nsPlainTextSerializer::DoCloseContainer(PRInt32 aTag)
|
||||
}
|
||||
|
||||
/**
|
||||
* aNode may be null when we're working with the DOM, but then mContent is
|
||||
* aNode may be null when we're working with the DOM, but then mElement is
|
||||
* useable instead.
|
||||
*/
|
||||
nsresult
|
||||
@ -1827,8 +1827,8 @@ nsPlainTextSerializer::GetAttributeValue(const nsIParserNode* aNode,
|
||||
nsIAtom* aName,
|
||||
nsString& aValueRet)
|
||||
{
|
||||
if (mContent) {
|
||||
if (mContent->GetAttr(kNameSpaceID_None, aName, aValueRet)) {
|
||||
if (mElement) {
|
||||
if (mElement->GetAttr(kNameSpaceID_None, aName, aValueRet)) {
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ protected:
|
||||
section.
|
||||
mHeaderCounter[1] for <h1> etc. */
|
||||
|
||||
nsRefPtr<mozilla::dom::Element> mContent;
|
||||
nsRefPtr<mozilla::dom::Element> mElement;
|
||||
|
||||
// For handling table rows
|
||||
nsAutoTArray<PRPackedBool, 8> mHasWrittenCellsForRow;
|
||||
|
Loading…
Reference in New Issue
Block a user