fix bug 5644. reviewed by nisheeth and approved by cyeh. broadcast default character set to all the children and make sure all the children set to the same value when they are added to the parent
git-svn-id: svn://10.0.0.236/trunk@29771 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1210,6 +1210,7 @@ nsWebShell::AddChild(nsIWebShell* aChild)
|
||||
}
|
||||
mChildren.AppendElement(aChild);
|
||||
aChild->SetParent(this);
|
||||
aChild->SetDefaultCharacterSet(mDefaultCharacterSet);
|
||||
NS_ADDREF(aChild);
|
||||
|
||||
return NS_OK;
|
||||
@@ -2767,6 +2768,13 @@ NS_IMETHODIMP
|
||||
nsWebShell::SetDefaultCharacterSet (const PRUnichar* aDefaultCharacterSet)
|
||||
{
|
||||
mDefaultCharacterSet = aDefaultCharacterSet;
|
||||
PRInt32 i, n = mChildren.Count();
|
||||
for (i = 0; i < n; i++) {
|
||||
nsIWebShell* child = (nsIWebShell*) mChildren.ElementAt(i);
|
||||
if (nsnull != child) {
|
||||
child->SetDefaultCharacterSet(aDefaultCharacterSet);
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user