Closed Bug 1059167 Opened 6 years ago Closed 6 years ago
Right floated element with defined width doesn't respect right margin
While working on bug 1041765, we've spotted blocking Gecko regression - right floated elements can't have margin-right (see attached test case). Everything is fine for left floated elements. For right floated elements margin has effect only if element has "width: auto;". The issue DOES occur on the latest Nightly and B2G, and DOES NOT occur on the week-old builds.
[Blocking Requested - why for this release]: Blocks v2.1 blocker
blocking-b2g: --- → 2.1?
First changeset that fails the test: changeset: 201250:54ada5ad66bb user: Jonathan Kew <firstname.lastname@example.org> date: Sun Aug 24 15:34:44 2014 +0100 summary: bug 1046950 pt 2 - convert ComputeSize to use logical-coordinate parameters. r=smontagu
This is a regression from bug 1046950 as far as I can tell. Specifically, in http://hg.mozilla.org/mozilla-central/rev/54ada5ad66bb the code in FloatMarginWidth() was changed from passing the margin, border, and padding to ComputeSize() to passing margin, borderpadding, and padding. So the padding gets double-counted as far as I can tell. Removing the padding style in the testcase makes the margin work correctly.
OS: All → Linux
Priority: P2 → --
Hardware: All → x86_64
OS: Linux → All
Priority: -- → P2
Hardware: x86_64 → All
Yes, it's a regression; oops. Will fix and test. (FWIW, removing "box-sizing: border-box;" from the testcase style also avoids the issue.)
This was an unintended change during logical-conversion; we weren't supposed to drop the subtraction of the padding here. I'll see about writing a reftest that would've caught this...
Attachment #8479906 - Flags: review?(smontagu)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Simple reftest based on the testcase here.
It works better to actually include the test files in the patch.
Attachment #8480048 - Flags: review?(smontagu)
Tryserver job with the reftest: https://tbpl.mozilla.org/?tree=Try&rev=dfc8e92c5ae0
Attachment #8479906 - Flags: review?(smontagu) → review+
Attachment #8480048 - Flags: review?(smontagu) → review+
Target Milestone: --- → mozilla34
FWIW: The newrelic blog (http://blog.newrelic.com/ , http://blog.newrelic.com/2014/08/26/security-document/ ) is broken in current Nightly, I think by this bug. (main text content overflowing & getting clipped on the right side) Glad that this is fixed on inbound; hopefully that means the newrelic blog will be working again tomorrow or the next day. :)
You need to log in before you can comment on or make changes to this bug.