Closed Bug 5644 Opened 25 years ago Closed 25 years ago

Character Set menu does not work in Frame

Categories

(Core :: Internationalization, defect, P2)

x86
Other
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: teruko, Assigned: ftang)

References

()

Details

(Whiteboard: Have the fix in my local tree. Need Ne)

Tested 4-28-09 Win32 build. Step of reproduce 1. Go to above URL 2. Click on iso-2022-jp on the left side of the frame 3. Select menu View|Default Character Set->Japanese JIS (ISO-2022-JP) At this time, it goes back to the original frame. 4. Click on iso-2022-jp on the left side on the frame again The Japanese JIS (ISO-2022-JP) Page does not show Japanese characters correctly. This does not happen for only ISO-2022-JP page.
Priority: P3 → P2
Target Milestone: M5
Status: NEW → ASSIGNED
Whiteboard: Have the fix in my local tree. Need Ne
Have the fix in my local tree Need to add the following code nsWebShell.cpp. Nisheeth, please review it. The problem is nsWebShell does not pass the DefaultCharacterSet information down to it's child. I add the code below to make sure when a child get add we also set the value equal to itself. Z:\mozilla\webshell\src>cvs diff -c nsWebShell.cpp Index: nsWebShell.cpp =================================================================== RCS file: /m/pub/mozilla/webshell/src/nsWebShell.cpp,v retrieving revision 1.129 diff -c -r1.129 nsWebShell.cpp *** nsWebShell.cpp 1999/04/28 06:47:05 1.129 --- nsWebShell.cpp 1999/04/28 22:35:08 *************** *** 1210,1215 **** --- 1210,1216 ---- } mChildren.AppendElement(aChild); aChild->SetParent(this); + aChild->SetDefaultCharacterSet(mDefaultCharacterSet); NS_ADDREF(aChild); return NS_OK;
Here are a better fix, not only make sure the child get the same default charset value when they added to the partent, but we also broadcase the default charset to the children when it get set. Z:\mozilla\webshell\src>cvs diff -c nsWebShell.cpp Index: nsWebShell.cpp =================================================================== RCS file: /m/pub/mozilla/webshell/src/nsWebShell.cpp,v retrieving revision 1.129 diff -c -r1.129 nsWebShell.cpp *** nsWebShell.cpp 1999/04/28 06:47:05 1.129 --- nsWebShell.cpp 1999/04/28 22:44:10 *************** *** 1210,1215 **** --- 1210,1216 ---- } mChildren.AppendElement(aChild); aChild->SetParent(this); + aChild->SetDefaultCharacterSet(mDefaultCharacterSet); NS_ADDREF(aChild); return NS_OK; *************** *** 2767,2772 **** --- 2768,2780 ---- 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; }
I'm confused. That page has a META charset, so the menu shouldn't even be necessary. I.e. we still have a META charset problem here.
Erik is right. This page has META tag.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
fix and check in.
Status: RESOLVED → VERIFIED
I verfied this in Win32 5-03-08 build.
You need to log in before you can comment on or make changes to this bug.