Closed Bug 148462 Opened 18 years ago Closed 18 years ago

Bidi: Alignment of text with space and tags is not correct

Categories

(Core :: Layout: Text and Fonts, defect, major)

x86
Windows NT
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 150568

People

(Reporter: kyae-young.kim, Assigned: mkaply)

References

Details

Attachments

(4 files)

 
Attached file Testcase of 148462
Attached image Mozilla result
Attached image Correct result
Blocks: 115713
Attached image Mozilla result2
Attachment #85853 - Attachment mime type: text/plain → text/html
What is your source for the "correct" rendering? Are you taking the <br>
elements into account? 

http://www.w3.org/TR/html4/struct/text.html#edef-BR :
 With respect to bidirectional formatting, the BR element should behave the same 
 way the [ISO10646] LINE SEPARATOR character behaves in the bidirectional 
 algorithm.

See http://www.unicode.org/unicode/reports/tr9/ for the bidirectional algorithm.
I'm not talking about <br>. I'm talking about the periods and spaces locaton.
Specailly period and space are different side according to having span or no 
tags.

OK, it's simple test case.

<HTML DIR=RTL LANG=AR>
<head>
<Meta charset=UTF-8>
</head>

<body>
<br> This is a testing for BiDi layout without tag.<br>  
<span>This is a testing for BiDi layout with span tag.<br></span> 
</body> 
 
</html> 

You can see each period on different location.
The two periods are in different locations because the first one is part of a
run of neutral characters (since it is a common separator not adjacent to a
number) between two left-to-right characters, and so is resolved to
left-to-right, while the second is part of a run of neutral characters between a
left-to-right character and the end of the paragraph, and so is resolved to the
embedding direction, right-to-left.

Marking INVALID. 

To get the same result as in attachment 85857 [details], add a right-to-left mark (&rlm;)
before the <br>.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
I've got attachment 85857 [details](above correct result) from IE 5.5. Do you think that 
IE 5.5 result is wrong?
Well yes, as a matter of fact I do. I haven't seen the source of IE 5.5, but as
far as I can tell empirically, they treat the <br> element as a paragraph
separator in Bidi processing, which is wrong according to the HTML specification
as quoted in comment 5. 

To see that it is the <br> that is creating the effect and not the tags, try
reversing the order of the lines with the span and without the span in your own
example. The rendering is exactly the same.
Simon,

I found similar problem. Please take a look at 151012.
Here is testcase.

<html dir="rtl">
<body>
   <input type="CHECKBOX" name="checkbox1" value="check1" checked><B> checkbox1 
</B><BR>
   <input type="CHECKBOX" name="checkbox2" value="check2" checked><B> checkbox2 
</B><P>
</body>
</html>
I think this bug is same problem as 151012 and 150568
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---

*** This bug has been marked as a duplicate of 150568 ***
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → DUPLICATE
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
You need to log in before you can comment on or make changes to this bug.