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

RESOLVED DUPLICATE of bug 150568

Status

()

Core
Layout: Text
--
major
RESOLVED DUPLICATE of bug 150568
16 years ago
10 years ago

People

(Reporter: Kyae-Young Kim, Assigned: mkaply)

Tracking

Trunk
x86
Windows NT
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

16 years ago
 
(Reporter)

Comment 1

16 years ago
Created attachment 85853 [details]
Testcase of 148462
(Reporter)

Comment 2

16 years ago
Created attachment 85856 [details]
Mozilla result
(Reporter)

Comment 3

16 years ago
Created attachment 85857 [details]
Correct result
(Reporter)

Updated

16 years ago
Blocks: 115713
(Reporter)

Comment 4

16 years ago
Created attachment 85858 [details]
Mozilla result2

Updated

16 years ago
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.
(Reporter)

Comment 6

16 years ago
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
Last Resolved: 16 years ago
Resolution: --- → INVALID
(Reporter)

Comment 8

16 years ago
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.
(Reporter)

Comment 10

16 years ago
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>
(Reporter)

Comment 11

16 years ago
I think this bug is same problem as 151012 and 150568
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
(Reporter)

Comment 12

16 years ago

*** This bug has been marked as a duplicate of 150568 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 16 years ago16 years ago
Resolution: --- → DUPLICATE

Updated

10 years ago
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.