Closed
Bug 64490
Opened 24 years ago
Closed 24 years ago
ALIGN="left" is ignored when DIR="rtl"
Categories
(Core :: Layout, defect, P2)
Core
Layout
Tracking
()
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: mar_garina, Assigned: mkaply)
References
()
Details
(Keywords: rtl)
Bug description:
When mozilla encounters a html with <HTML DIR="rtl">, it indeed shows the html
as a right-to-left page. It automatticly aligns any <TD> in a table to the
right, and that's good. the problem is that if the user wants to align to the
left, <TD ALIGN="left"> doesn't work as it should- the ALIGN="left" is ignored
and it aligns it to the right.
How it should be: Mozilla should not ignore the ALIGN parameter in the <TD> if
the document is defined as DIR="rtl" , and if it encounters ALIGN="left", it
should align to the left.
How to reproduce: Just view the source of the URL I put here.
Note: I'm not sure why, but I think that when mozilla loads the html from cache
it works fine.. if you see this fine, try to reload the document.
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
Assigning to myself. I just started working on a fix for this and other related
bugs. It shouldn't be that hard. I'm just trying to make all of our -moz-right
hacks work for -moz-left too...
Assignee: karnaze → dbaron
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Priority: -- → P2
Hardware: PC → All
Target Milestone: --- → mozilla0.8
Comment 3•24 years ago
|
||
The cache effects may be due to some of the recent table regression bugs... I'm
not sure what we'd see without those bugs.
Comment 4•24 years ago
|
||
Actually I think this may be harder than I thought. I think this and bug 24366
may be due to a problem in nsLineLayout... (search for DIRECTION in
nsLineLayout.cpp to find some interesting comments and code...)
Comment 5•24 years ago
|
||
Dump frames shows:
TableCell(td)(1)@0x41e781e0 {24,0,3552,588} [state=00000014] sc=0x41e797e0<
Block(td)(1)@0x41e78240 {24,24,3504,540} [state=001c0014] sc=0x41e79bd0(i=1,b=0)<
line 0x41e78334: count=1 state=inline,clean,NOT Impacted,[0x1000] mew=1764
{0,0,1764,540} ca={0,0,3504,540} <
Frame(img)(0)@0x41e7828c {1740,0,1764,540} [state=000000b4]
>
>
>
the line box mBounds is {0,0,1764,540} but the img frame is at {1740,0,1764,540}
This seems suspicious to me, although I'm not 100% sure what they should be.
Perhaps this is related to nsLineLayout::UpdateFrames not being written for RTL?
Comment 6•24 years ago
|
||
I wonder if this is fixed by IBM's bidi changes in bug 62777 -- they have some
changes to nsLineLayout.cpp that may fix this (like the ones in
TrimTrailingWhiteSpaceIn). Assigning back to default layout owner.
Assignee: dbaron → clayton
Component: HTMLTables → Layout
Depends on: 62777
QA Contact: chrisd → petersen
Reporter | ||
Comment 8•24 years ago
|
||
H-J: No, The html doesn't work well from local drive.
Comment 9•24 years ago
|
||
Yes, the IBM bidi code seems to fix this bug
Comment 10•24 years ago
|
||
dbaron: bidi changes seem to work only for an element with explicit
specification of alignment (like example in the "Bug description"), but not in
the case of inherited alignment (eg, if you have <html dir="rtl" align="left">,
child elements inherit the direction, but not the alignment.)
Comment 11•24 years ago
|
||
align="left" has no meaning on the HTML element
Comment 12•24 years ago
|
||
does ALIGN have meaning on the TABLE element?
(<table dir="rtl" align="left">: only the dir attribute affects cell alignment.)
Comment 13•24 years ago
|
||
On a TABLE it's equivalent to float so it shouldn't affect the alignment of the
contents. Something like
<div align=left>
<p>Left-aligned RTL text.</p>
</div>
ought to work, though.
Comment 14•24 years ago
|
||
Yes, it works. So I'm sorry... It seems that bidi code fixed this bug.
Comment 15•24 years ago
|
||
Based on previous comment, assigning to mkaply since this will be fixed when
bidi branch lands.
Assignee: clayton → mkaply
Reporter | ||
Comment 16•24 years ago
|
||
A very similar bug I found (just for making sure bidi patch will fix this one also):
http://www.deot.net/alignbug2.html
Comment 17•24 years ago
|
||
What is supposed to happen here?
Do you mean that a typed text must be always aligned to the left?
Reporter | ||
Comment 18•24 years ago
|
||
Not at all.. The box is aligned to left, and when I type something inside it
'jumps' to the right, as it was aligned to the right.
Does it work well for you ??
Comment 19•24 years ago
|
||
Yes, it works fine; when typing the box remains left-aligned.
Reporter | ||
Comment 20•24 years ago
|
||
This is weird, it happens both in the version I built and in the binary.
Anyway.. if it's just in my place so ignore it...
Comment 21•24 years ago
|
||
Sorry, I had to say that I was using a BIDI version of mozilla.. (since you
wanted to make sure that bidi patch will fix this one also.)
Assignee | ||
Comment 22•24 years ago
|
||
Updating milestone - Bidi is being targeted for 0.9 I believe
Target Milestone: mozilla0.8 → mozilla0.9
Assignee | ||
Comment 23•24 years ago
|
||
This bug will be fixed when IBMBIDI is turned on
Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla0.9 → mozilla0.9.1
Assignee | ||
Comment 24•24 years ago
|
||
Web site is not available, but per conversation and since Bidi is in, I am
marking this fixed.
Reporter, please reopen if you see this problem.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 26•23 years ago
|
||
Verified on
build: 2001-05-29-20-Trunk
platform: Win NT
Tested the http://www.deot.net/alignbug2.html test case and while typing the
text is right aligned and the box is left aligned.
Status: RESOLVED → VERIFIED
Comment 27•17 years ago
|
||
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.
Description
•