Last Comment Bug 64510 - quirky horizontal alignment for RTL?
: quirky horizontal alignment for RTL?
Status: RESOLVED FIXED
[patch]
: rtl, testcase
Product: Core
Classification: Components
Component: Layout: Block and Inline (show other bugs)
: Trunk
: All All
: P2 normal with 3 votes (vote)
: mozilla1.8beta3
Assigned To: David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch)
: Chris Petersen
Mentors:
: 154259 (view as bug list)
Depends on:
Blocks: 137995 196292
  Show dependency treegraph
 
Reported: 2001-01-06 09:35 PST by David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch)
Modified: 2008-04-07 14:01 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (6.57 KB, patch)
2001-01-06 09:38 PST, David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch)
no flags Details | Diff | Splinter Review
IE vs. Bidi Mozilla (41.47 KB, image/jpeg)
2001-04-25 16:00 PDT, Mike Kaply [:mkaply]
no flags Details
more thorough testcase (2.22 KB, text/html)
2001-04-25 16:28 PDT, David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch)
no flags Details
how the above testcase looks in Mozilla with my patch (18.07 KB, image/png)
2001-04-25 16:31 PDT, David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch)
no flags Details
more up-to-date patch (7.72 KB, patch)
2001-07-29 08:57 PDT, David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch)
no flags Details | Diff | Splinter Review
Screenshot of IE6 (40.99 KB, image/png)
2002-08-31 18:22 PDT, Mats Palmgren (vacation)
no flags Details
updated patch (12.69 KB, patch)
2005-06-14 17:38 PDT, David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch)
roc: review+
roc: superreview+
asa: approval1.8b3+
Details | Diff | Splinter Review

Description David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2001-01-06 09:35:46 PST
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.
Comment 1 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2001-01-06 09:38:24 PST
Created attachment 21933 [details] [diff] [review]
patch
Comment 2 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2001-01-06 12:19:04 PST
Hmmm... did these changes mess up
http://www.mozilla.org/projects/seamonkey/memory-and-performance/mandpa-tasklist.html
 ?
Comment 3 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2001-01-21 13:28:19 PST
I'll try to reassess whether we need this after bidi lands.
Comment 4 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2001-04-16 20:03:21 PDT
Reality check.  Moving out to 0.9.1.
Comment 5 Mike Kaply [:mkaply] 2001-04-25 15:05:47 PDT
Can you give me an idea of what a testcase would be and I will test it on my 
BIDI build?

Thanks
Comment 6 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2001-04-25 15:11:53 PDT
(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...
Comment 7 Mike Kaply [:mkaply] 2001-04-25 15:28:31 PDT
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>
Comment 8 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2001-04-25 15:42:29 PDT
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...)
Comment 9 Mike Kaply [:mkaply] 2001-04-25 16:00:44 PDT
Created attachment 32211 [details]
IE vs. Bidi Mozilla
Comment 10 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2001-04-25 16:28:50 PDT
Created attachment 32217 [details]
more thorough testcase
Comment 11 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2001-04-25 16:31:12 PDT
Created attachment 32219 [details]
how the above testcase looks in Mozilla with my patch
Comment 12 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2001-04-25 16:32:43 PDT
So I think I have some bugs, but I should see if they exist without my patch...
Comment 13 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2001-07-29 08:57:14 PDT
Created attachment 43930 [details] [diff] [review]
more up-to-date patch
Comment 14 Ilya Konstantinov 2001-09-17 17:02:59 PDT
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?
Comment 15 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2001-09-17 17:17:27 PDT
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.
Comment 16 Mats Palmgren (vacation) 2002-08-31 18:22:43 PDT
Created attachment 97423 [details]
Screenshot of IE6
Comment 17 mozilla3eran 2003-10-28 11:13:47 PST
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.
Comment 18 Thamer Mahmoud 2003-10-28 12:27:53 PST
*** Bug 154259 has been marked as a duplicate of this bug. ***
Comment 19 Matt Wright 2005-05-26 23:36:18 PDT
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
Comment 20 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2005-06-14 17:36:28 PDT
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.
Comment 21 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2005-06-14 17:38:00 PDT
Created attachment 186270 [details] [diff] [review]
updated patch
Comment 22 David Baron :dbaron: ⌚️UTC+8 (review requests must explain patch) 2005-06-15 16:45:58 PDT
Fix checked in to trunk, 2005-06-15 16:45 -0700.
Comment 23 :Ehsan Akhgari 2008-04-07 14:01:12 PDT
Mass-assigning the new rtl keyword to RTL-related (see bug 349193).

Note You need to log in before you can comment on or make changes to this bug.