Closed Bug 1121350 Opened 10 years ago Closed 10 years ago

`text-align: justify;` with `inline-block` causes extra space on right from whitespace

Categories

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

36 Branch
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla36
Tracking Status
firefox35 --- unaffected
firefox36 + verified
firefox37 --- unaffected
firefox38 --- unaffected

People

(Reporter: madlittlemods, Assigned: xidorn)

References

()

Details

(Keywords: regression, reproducible, testcase)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36

Steps to reproduce:

Demo: http://jsfiddle.net/ufy3f5tt/


Actual results:

There is an extra space on the right that messes with `text-align: justify;`.


Expected results:

The space shouldn't be there and the two elements should be on opposite sides(justified) of the wrapper.

The problem occurs with multiple elements as well.

You can get the proper layout by removing the whitespace at the end of the wrapper and the last element: http://jsfiddle.net/ufy3f5tt/2/
I forgot to add that I can only reproduce this bug in Firefox developer Edition 36.0a2.
Status: UNCONFIRMED → NEW
Component: Untriaged → Layout: Block and Inline
Ever confirmed: true
Product: Firefox → Core
[Tracking Requested - why for this release]:
web layout regression that looks like it will be hitting the new betas (haven't checked yet) this week
OS: Windows 8.1 → All
Hardware: x86_64 → All
(In reply to :Gijs Kruitbosch from comment #2)
> [Tracking Requested - why for this release]:
> web layout regression that looks like it will be hitting the new betas
> (haven't checked yet) this week

Still broken on 36 beta 1.
On trunk (on Linux) I don't see the difference between the two cases.  Is it something already fixed on trunk?  In any case, regressionwindow-wanted stands.
Er, Gijs already marked it as such.
The first part and the third part of patch for bug 1116635 fix this problem.
Depends on: 1116635
Flags: needinfo?(quanxunzhen)
Let me fetch the beta repo and work on this.
Assignee: nobody → quanxunzhen
What should I do now? This patch has previously been reviewed by roc, and should probably be good. Should I directly request for uplift to mozilla-beta?

Also, this patch will definitely cause conflict when beta is merged to later branches. Do we need to leave any special note somewhere for people about this?
Flags: needinfo?(dbaron)
Comment on attachment 8549442 [details] [diff] [review]
patch backported from bug 1116635

It was reviewed, but since there was some refactor before the reviewed patch in this part, I guess it is probably better to be reviewed again.
Flags: needinfo?(dbaron)
Attachment #8549442 - Flags: review?(roc)
Comment on attachment 8549442 [details] [diff] [review]
patch backported from bug 1116635

Approval Request Comment
[Feature/regressing bug #]: bug 1063857, fixed in bug 1116635
[User impact if declined]: may see unwanted space at the end of some lines when justified
[Describe test coverage new/current, TBPL]: there is a test in bug 1116635, but no test is backported because that test relies on css ruby which may not work properly in the current beta
[Risks and why]: not sure, but I don't see risks with fixing this
[String/UUID change made/needed]: n/a
Attachment #8549442 - Flags: approval-mozilla-beta?
Attachment #8549442 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Keywords: checkin-needed
checkin-needed is not necessary. sheriff are scanning for approval-mozilla-beta+ ;)
Keywords: checkin-needed
Gotcha :)
https://hg.mozilla.org/releases/mozilla-beta/rev/598cd9c2e480
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Flags: qe-verify+
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0
Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:36.0) Gecko/20100101 Firefox/36.0

Reproduced the issue on Firefox 36 beta 1, build ID: 20150114125146.

Confirming the fix on Firefox 36 beta 2, build ID: 20150120155007.
Status: RESOLVED → VERIFIED
Keywords: qawanted
QA Contact: cornel.ionce
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: