CSS columns: incorrect alignment in right-aligned documents

RESOLVED FIXED in mozilla17

Status

()

Core
Layout
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: spammed.user, Assigned: jwir3)

Tracking

Trunk
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
In right-to-left documents, columns align to the left instead of aligning right. See visualization here: http://jsfiddle.net/aBDpt/
(Assignee)

Updated

5 years ago
Assignee: nobody → sjohnson
(Assignee)

Comment 1

5 years ago
Hmmm...

At first glance, it seems that you point out an issue with how our column boxes are being placed. However, if you look at a slight modification to the same jsfiddle:
http://jsfiddle.net/aBDpt/6/

We render the same as in google chrome. So, it seems that our placement of column boxes is incorrect when in rtl mode and when we don't have enough column boxes to fill the requested number of columns:
http://jsfiddle.net/aBDpt/13/

(In the second example, we only have 2 columns, even though the author requested 4). If we make the number of columns requested equal 2, then we get:
http://jsfiddle.net/aBDpt/14/

Which is correct. So, I think that we need to handle the above case a little bit better. This shouldn't be too difficult... I'll see what I can do.

Thanks for the bug submission!
(Assignee)

Comment 2

5 years ago
Created attachment 648062 [details] [diff] [review]
b779566

Patch that removes some code that doesn't appear to be needed any longer. This is the code that is causing the RTL columns to be aligned to the left if we don't have enough content to fill the requested number of columns. 

Alternatively, I could detect the case where we have enough content to get the requested number of column boxes, and then leave this code in, with the added condition that it only happens when there is enough content. (I thought this method simplified the code, but it might be doing something that I don't immediately see, in which case, we'd want to leave it in).
Attachment #648062 - Flags: review?(roc)
Attachment #648062 - Flags: review?(roc) → review+
(Assignee)

Comment 3

5 years ago
Inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2c700f9a2c1d
Target Milestone: --- → mozilla17

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/2c700f9a2c1d
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.