Implemented the correct content model for the TITLE element and allowed for dynamic change.
git-svn-id: svn://10.0.0.236/trunk@21050 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1603,11 +1603,18 @@ HTMLContentSink::SetTitle(const nsString& aValue)
|
||||
nsIHTMLContent* it = nsnull;
|
||||
nsresult rv = NS_NewHTMLTitleElement(&it, atom);
|
||||
if (NS_OK == rv) {
|
||||
nsIDOMHTMLTitleElement* domtitle = nsnull;
|
||||
it->QueryInterface(kIDOMHTMLTitleElementIID, (void**) &domtitle);
|
||||
if (nsnull != domtitle) {
|
||||
domtitle->SetText(aValue);
|
||||
NS_RELEASE(domtitle);
|
||||
nsIContent* text;
|
||||
rv = NS_NewTextNode(&text);
|
||||
if (NS_OK == rv) {
|
||||
nsIDOMText* tc;
|
||||
rv = text->QueryInterface(kIDOMTextIID, (void**)&tc);
|
||||
if (NS_OK == rv) {
|
||||
tc->SetData(aValue);
|
||||
NS_RELEASE(tc);
|
||||
}
|
||||
it->AppendChildTo(text, PR_FALSE);
|
||||
text->SetDocument(mDocument, PR_FALSE);
|
||||
NS_RELEASE(text);
|
||||
}
|
||||
mHead->AppendChildTo(it, PR_FALSE);
|
||||
NS_RELEASE(it);
|
||||
|
||||
Reference in New Issue
Block a user