Closed Bug 417489 Opened 16 years ago Closed 15 years ago

XML Parse Error is messy in RTL

Categories

(Core :: XML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: zwnj, Assigned: ehsan.akhgari)

References

(Blocks 1 open bug)

Details

(Keywords: fixed1.9.1, rtl)

Attachments

(3 files, 1 obsolete file)

Happens in Fx2.0.  Should check Fx3.0
Attached file Test case
This can be any invalid XML file.  I'm uploading this just as a quick way to test the problem.
Thanks Ehsan.

BTW I got the first error trying to see a .svgz file, which the mime type in http header was svg+xml.  I'm not sure where the problem is for this case.  The content wasn't text at all.  Is it really a server-side problem, or we should handle such cases?
Attached image Firefox 2 screenshot
Attached image Firefox 3 screenshot (obsolete) —
A nightly Firefox 3 build makes the error appear RTL, so the problem is specific to Firefox 2.
Good job man.  So I think we cannot do anything about it.

Any idea, dup, etc about the wrong mime-type problem?
Moving to Core:XML, since it has nothing to do with the Persian l10n.  Also, setting the dependency on Persian Fx2 tracker.
Assignee: bugs+behnam → nobody
Component: fa / Persian → XML
OS: Linux → All
Product: Mozilla Localizations → Core
QA Contact: persian.fa → xml
Hardware: PC → All
Version: unspecified → 1.8 Branch
(In reply to comment #5)
> Good job man.  So I think we cannot do anything about it.
> 
> Any idea, dup, etc about the wrong mime-type problem?

I'm still looking through this, but I doubt that it's unsolvable.  Whether or not the appropriate module owners are willing to take patches for the branch to fix this in the next dot release is another issue though.
Comment on attachment 303285 [details]
Firefox 3 screenshot

Oops, Firefox 3 is definitely affected by this problem as well.  I made a mistake of testing this by setting bidi.direction to 2, which caused the #document node to have the rtl direction, thus pretending that the error page is RTL.

One solution can be to modify nsXMLContentSink to add a doctype on error pages to load chrome://global/locale/global.dtd, and use &locale.dir; as the dir attribute of the <parsererror> element.  Another possible solution would be to modify it to add the chrome://global/locale/intl.css stylesheet and handle this element in intl.css.

I'm not sure which solution is more viable...
Attachment #303285 - Attachment is obsolete: true
Whiteboard: both in trunk and 1.8
Version: 1.8 Branch → Trunk
A related bug: bug 350597
Blocks: fx35-l10n-fa
No longer blocks: Persian-Fx3.5
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
No longer blocks: fx35-l10n-fa
The fix to this bug is two-fold.  The attached patch enabled usage of intl.css in the XML error document.  RTL locales need to reverse the parsererror element in their intl.css files as well as I did for fa in this patch:

<http://hg.mozilla.org/l10n-central/fa/rev/28a679c4e43d>
Assignee: nobody → ehsan.akhgari
Status: NEW → ASSIGNED
Attachment #359979 - Flags: superreview?(jonas)
Attachment #359979 - Flags: review?(jonas)
Whiteboard: both in trunk and 1.8
Attachment #359979 - Flags: superreview?(jonas)
Attachment #359979 - Flags: superreview+
Attachment #359979 - Flags: review?(jonas)
Attachment #359979 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/7b44b97ec410

The Litmus test can use attachment 303278 [details] as the test case.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-litmus?
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
In order to use this fix for he and ar, you need to do something like this: <http://hg.mozilla.org/l10n-central/fa/rev/28a679c4e43d>
Comment on attachment 359979 [details] [diff] [review]
Add intl.css to the XML error document

Low-risk patch to fix an issue for RTL locales; nice to have for 1.9.1.
Attachment #359979 - Flags: approval1.9.1?
Comment on attachment 359979 [details] [diff] [review]
Add intl.css to the XML error document

a191=beltzner

Can we get a Litmus testcase added as well?
Attachment #359979 - Flags: approval1.9.1? → approval1.9.1+
(In reply to comment #15)
> (From update of attachment 359979 [details] [diff] [review])
> a191=beltzner
> 
> Can we get a Litmus testcase added as well?

We're in the process of adding Litmus tests for many of the RTL bugs including this one.
No longer blocks: intl.css-cleanup
Flags: in-litmus?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: