Fix for bug 21682. BASE tag was ignored in the fragment content sink. Added HTML element creation method that takes an ID. r=pollmann
git-svn-id: svn://10.0.0.236/trunk@57035 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -929,6 +929,32 @@ NS_CreateHTMLElement(nsIHTMLContent** aResult, const nsString& aTag)
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
NS_CreateHTMLElement(nsIHTMLContent** aResult, PRInt32 aID)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (eHTMLTag_userdefined == nsHTMLTag(aID)) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
NS_WITH_SERVICE(nsIParserService,
|
||||
parserService,
|
||||
kParserServiceCID,
|
||||
&rv);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// Create atom for tag and then create content object
|
||||
nsAutoString tag;
|
||||
rv = parserService->HTMLIdToStringTag(aID, tag);
|
||||
nsIAtom* atom = NS_NewAtom(tag.GetUnicode());
|
||||
rv = MakeContentObject(nsHTMLTag(aID), atom, nsnull, nsnull, aResult);
|
||||
NS_RELEASE(atom);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user