Closed Bug 64510 Opened 24 years ago Closed 19 years ago

quirky horizontal alignment for RTL?

Categories

(Core :: Layout: Block and Inline, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta3

People

(Reporter: dbaron, Assigned: dbaron)

References

(Blocks 1 open bug)

Details

(Keywords: rtl, testcase, Whiteboard: [patch])

Attachments

(5 files, 2 obsolete files)

I just modified some of our quirky horizontal alignment code for LTR so that it
would work for RTL too, thinking it would fix bug 64490.  It didn't.  But we
might want to do this anyway.
I'll try to reassess whether we need this after bidi lands.
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9
Reality check.  Moving out to 0.9.1.
Target Milestone: mozilla0.9 → mozilla0.9.1
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Can you give me an idea of what a testcase would be and I will test it on my 
BIDI build?

Thanks
(Within an RTL document:)

<div align="left">
  <table width="50%"><tr><td>This is a table.</td></tr></table>
</div>

It would be interesting to know what other browsers that support BIDI do here...
Internet Explorer 6 pretty much centers the text, whereas we right align it.

I think Internet Explorer gets it right in this case, so we probably have a bug 
here. I think the issue is does the div align="left" become a div align="right" 
in the RTL case.

To make it an RTL document, make it like this:

<html dir="rtl">
<div align="left">
  <table width="50%"><tr><td>This is a table.</td></tr></table>
</div>
</html>
Is the table on the left edge or right edge of the page?  And where is the text
within the table?  (Sorry... should have been clearer that the split between
those 2 questions is what is important...)
Attached image IE vs. Bidi Mozilla
So I think I have some bugs, but I should see if they exist without my patch...
Target Milestone: mozilla0.9.2 → Future
Konqueror is completely broken with Mike Kaply's simple <div
align="left"><table>...</table></div>, so I guess we can only trust IE on this.
How come such an important patch is still waiting? Waiting for testers, or an R/SR?
It's waiting because I don't know what, if anything, is really necessary (it
would be nice to see a screenshot of IE displaying the most recent testcase -- I
could probably produce one when I have access to a Windows box later) and
because the patch is, I think, somewhat broken.
Keywords: patch, testcase
Attachment #21933 - Attachment is obsolete: true
Blocks: 137995
Component: Layout → Layout: Block & Inline
No activity for last 2 years, still present in Mozilla 1.5.

The problem is very simple: in left-aligned RTL context, tables are aligned to
the right, while everything else (text, images) is aligned to the left. 
As you can imagine, this arises in practice.

Trivial testcase: 

<html><body dir="rtl"><div align="left">
FOO
<table><tr><td>BAR</td></tr></table>
</div></body></html>

Mozilla right-justified "FOO" and left-justifies "BAR", while MSIE puts both on
the left. Konqueror does the same as Mozilla. The HTML and CSS specs, as far as
I can tell, leave this defined. Logic, consistency and installed base clearly
support the MSIE behavior.
*** Bug 154259 has been marked as a duplicate of this bug. ***
Priority: P4 → P2
Target Milestone: Future → mozilla1.7alpha
Any progress on this bug?  As mozilla2eran@tromer.org mentioned, the test case
is very simple. Furthermore, if you modify that test case to:

<html><body dir="rtl"><div align="left">
FOO
<table align="left"><tr><td>BAR</td></tr></table>
</div></body></html>

You will see it fixes the problem. The bug seems to be as simple as a table not
inheriting the align attribute on a dir="rtl" page.  Whereas, on a dir="ltr"
page, tables *do* inherit an align="right" attribute.

Matt
Target Milestone: mozilla1.7alpha → mozilla1.8beta3
Comment 19 is quite misguided; what's inherited is very different from
align="left" on tables, which is floating, not block-alignment.

In any case, I'll post an updated patch shortly.  I'd note that my simple
request for a screenshot from somebody who used Windows took almost a year, so
please don't complain about it being slow.
Attached patch updated patchSplinter Review
Attachment #43930 - Attachment is obsolete: true
Attachment #186270 - Flags: superreview?(roc)
Attachment #186270 - Flags: review?(roc)
Attachment #186270 - Flags: superreview?(roc)
Attachment #186270 - Flags: superreview+
Attachment #186270 - Flags: review?(roc)
Attachment #186270 - Flags: review+
Attachment #186270 - Flags: approval1.8b3? → approval1.8b3+
Fix checked in to trunk, 2005-06-15 16:45 -0700.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).
Keywords: rtl
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: