Closed
Bug 931853
Opened 11 years ago
Closed 11 years ago
negative margin larger than the height confuses vertical alignment of the frame on the line
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: keith, Assigned: MatsPalmgren_bugz)
Details
(Keywords: testcase, Whiteboard: [quirks])
Attachments
(4 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release) Build ID: 20130910160258 Steps to reproduce: image = 350x250 inside a div with negative margin see the sample html in the zip file. in firebug.. add the negative margin up to -600. you will see that when the image is at negative 250 , it will start to go down. instead of going up. Actual results: as you have noticed. margin-top = -100px is has the same effect with -400px if the margin is >= 0-250 (image height) = ok if the margin is between -250 to -500 (twice image height) = BUG if the margin -500 above = ok Expected results: if the margin is between -250 to -500 (twice image height) = should be not show the image
Assignee | ||
Comment 3•11 years ago
|
||
Clamping a negative logical height in nsLineLayout::VerticalAlignFrames seems to fix it: https://tbpl.mozilla.org/?tree=Try&rev=334398ffa496
Assignee: nobody → matspal
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Mac OS X → All
Hardware: x86 → All
Summary: repeating image negative margin bug → negative margin larger than the height confuses vertical alignment of the frame on the line
Version: 24 Branch → unspecified
Assignee | ||
Comment 4•11 years ago
|
||
Shifting it into mAscent is even better since we want the frame to move away further with more negative margin. https://tbpl.mozilla.org/?tree=Try&rev=09e03af8c710
Assignee | ||
Comment 5•11 years ago
|
||
The bug only occurs in quirks mode. All tested UAs, Firefox, IE, Chrome(blink), Safari(webkit) and Opera(presto) are compatible in standards mode. For the quirks mode testcase: Chrome, Safari, and IE9 matches what this patch implements -- the element moves further up with increasingly larger negative margin-top. IE10 and and Opera matches what I implemented in comment 3, IOW remove the "pfd->mAscent -= logicalHeight" line from this patch. (if I force "IE5 quirks" mode in IE10 then I get the IE9 quirks mode layout; I'm not sure if web pages can force that though) https://tbpl.mozilla.org/?tree=Try&rev=e2cd1a487afb
Attachment #830171 -
Flags: review?(roc)
Assignee | ||
Comment 6•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=3c9f18500605
Attachment #830171 -
Flags: review?(roc) → review+
Assignee | ||
Comment 7•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/475bd77c3400
https://hg.mozilla.org/mozilla-central/rev/475bd77c3400
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
You need to log in
before you can comment on or make changes to this bug.
Description
•