mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
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
This commit is contained in:
parent
16db69f754
commit
16f64c1f10
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user