Closed Bug 231226 Opened 21 years ago Closed 19 years ago

{inc} margin-left/right:auto is not recalculated when parent width shrinks

Categories

(Core :: Web Painting, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mozilla, Assigned: roc)

References

()

Details

(Keywords: regression, testcase)

Attachments

(2 files)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5) Gecko/20031026 Firebird/0.7 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040113 View the URL above, and put your mouse over one of the images. The CSS is in experiment.css in the same directory. The primary CSS of interest is the lines: div.entry:hover { z-index: 2; background: ActiveCaption; color: CaptionText; margin: -75px; border: 1px solid white; height: 250px; width: 250px; } This makes the box around the image larger, puts it in front, and (in other CSS lines later) adds information about the image. At least, it worked this way in previous versions of Mozilla and Firebird, but starting in Mozilla 1.6, it fails to put the div up front (ignoring the z-index) and, when taking the mouse out of the div, the screen refreshes badly, so that the images are not completely redrawn. Reproducible: Always Steps to Reproduce: 1. Load the above URL. 2. Move mouse over a thumbnail. Actual Results: The div containing the thumbnail selected gets resized and placed *behind* the other thumbnails. Expected Results: The resizing is correct, but the div should be placed above the other thumbnails.
Summary: :active with changed z-index does not change z-index → :hover with changed z-index does not change z-index
The behavior here first changed between 2003-09-16-05 and 2003-09-18-22, suggesting bug 69355. At that point z-index became a little wonky -- we would paint over the preceding div, but under the next one. Then between 2003-10-10-22 and 2003-10-11-22 the behavior changed again, to the current one. Almost certainly as a result of the checkin for bug 165149. Now the thing is, now we actually correctly apply z-index -- it does NOT apply to non-positioned elements (such as the divs in this case) in CSS2.1. So the z-index part of this is invalid. That leaves the fact that the images are not placed the way they should be when the div changes back. Thomas, any chance of a minimal testcase (mininal amount of HTML and CSS) for that problem?
Aww. I just read the z-index part of the CSS spec, and I guess I agree, although I really liked the effect, at least in the "stupid CSS tricks" way. I'll work on the image mangling example to simplify it. =thomas
This is another fallout from bug 69355. Bug occurs all the way back to Mozilla 1.0.2 for overflow:scroll. The problem seems to be that the auto margins does not shrink back to zero when the element is unhovered.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression, testcase
OS: MacOS X → All
Hardware: Macintosh → All
Summary: :hover with changed z-index does not change z-index → {inc} margin-left/right:auto is not recalculated when parent width shrinks
Behaviour of testcase 1 has changed between: - Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/2006120606 Minefield/3.0a (pre-reflow branch) - Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/2006120804 Minefield/3.0a1 (post-reflow branch) Behaviour or testcase 2 remains consistant between above builds.
So... is it just me, or is this bug worksforme?
Bug occurs in SeaMonkey 2006120701 (pre reflow branch) on Linux. Bug does not occur in SeaMonkey 2006120801 (post reflow branch) on Linux. -> FIXED (by the reflow branch landing)
Status: NEW → RESOLVED
Closed: 19 years ago
Depends on: reflow-refactor
Flags: in-testsuite?
Resolution: --- → FIXED
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: