Closed Bug 237370 Opened 20 years ago Closed 18 years ago

unexpected behavior of borders in RTL text

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: tomer, Assigned: mkaply)

References

(Blocks 2 open bugs)

Details

(Keywords: rtl)

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.7 StumbleUpon/1.901
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.7 StumbleUpon/1.901

I've found that CSS borders are broken for me, while I use Hebrew-RTL text. 

Reproducible: Always
Steps to Reproduce:
<p dir=rtl>&#1506;&#1501; <span id="brdr">&#1502;&#1505;&#1490;&#1512;&#1514;</span></p>
<p dir=rtl>With a <span id="brdr">border</span></p>
Actual Results:  
A. The Hebrew text (first line) contain a inline border, which should appear
*outside* the text, rather than inside, *under* the text. 
B. While declaring about RTL paragraph, there is strange margin. My guess is
that it came from wrong calculation of the line width, which done because of the
previous problem. 

Expected Results:  
Gecko should render the Hebrew text and English the same way.

Tested under FireFox 0.8 and SeaMonkey 1.7a.
Attached file Testcase
Attached image screenshot
Assignee: general → mkaply
Component: Browser-General → Layout: BiDi Hebrew & Arabic
QA Contact: general → zach
I'm quite sure that this is a dupe of Bug 174470. See
http://bugzilla.mozilla.org/show_bug.cgi?id=174470#c19 for a screenshot of a
similar testcase.

Eyal, can you confirm this?

Prog.
Actually, make that a testcase, not a screenshot of one.

Sorry for the spam,

Prog.
I don't think this is a dupe, since these are not tables, but span's, which I
think are layed out by different parts of the code. I'll double-check, though.
Another discrepancy is the fact that although the horizontal dimensions of the
bordered area are wrong, it's right/left alignment is correct, that is, the
border appears around מסגרת, not around עם.

If this isn't a dupe it means that there are many more thousands of lines of
code which need to be RTL-verified... woe is us.

As for the margin, I believe it is due to the fact that the positioning of the
whole of the line _does_ remember to conserve space for both the text itself and
for the border, that is to say that if the border rendering were to 'push' the
text further left it would fit exactly the space alloted to the line.
No, definitely not a dupe. The methods nsTableFrame::Paint and
nsTableFrame::PaintBCBorders are not called when rendering the testcase. As I
was saying, bordered areas are not necessarily tables. Please mark as 'NEW'. I
would also change severity to 'minor' (or change the severity of 174470 to 'major').
Confirming as New. I'll let the assignees of these bugs change Severity.

Prog.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Depends on: 299065
Blocks: 137995
Blocks: 225316
We produced a patch to fix bug 121633. It also fixes this bug as well.
Fixed by the fix to 299065, but see bug 328168 for additional problems with borders in bidi/RTL text.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
*** Bug 225316 has been marked as a duplicate of this bug. ***
Blocks: Persian
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
Component: Layout: BiDi Hebrew & Arabic → Layout: Text
QA Contact: zach → layout.fonts-and-text
Attachment #143807 - Attachment mime type: text/html → text/html; charset=windows-1255
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: