Closed Bug 42139 Opened 25 years ago Closed 25 years ago

background-position misinterpreted with fixed backgrounds

Categories

(Core :: CSS Parsing and Computation, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: chuckie, Assigned: pierre)

References

()

Details

(Keywords: css1, regression, Whiteboard: [nsbeta2+] 6/22 [Fix in hand])

Attachments

(3 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; m16) Gecko/20000609 BuildID: 2000060908 Reproducible: Always Steps to Reproduce: 1.Open the URL http://www.jay-livermore-lf.org/ 2.Look at the background on the right frame. 3.Click on "Our Activities" on the left. Actual Results: The background is not shown completely. Expected Results: The background should be shown completely and not scroll with the documents contents.
Attached file Fixed background
Attached file Not a fixed background
I cannot reproduce this. (Win2000)
I can reproduce on Linux build 2000060908 (M17). The background image is shifted to the right so that half of its width is out of view. This is not consistent with the specified behavior of the background-position property of CSS2. Marking bug as confirmed and changing platform/opsys.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 98 → All
Hardware: PC → All
This is a very recent regression then. With a build from last weekend I'm pretty sure this bug did not occur. I can confirm that it does now, though. Here is another test case: http://www.bath.ac.uk/%7Epy8ieh/internet/projects/mozilla/fixedpos-bg-pos2.html It looks like background-position is being interpreted as only deciding the origin on the graphic itself, and this origin is always placed at the top left instead of being placed in the equivalent position in the viewport. For example, background-position: center center; with background-attachement: fixed;, seems to place the center of the background graphic at the top left instead of placing the center of the graphic in the center of the viewport. It all seems to work fine with 'scroll' instead of 'fixed'. Pierre: this could easily be compositing/layout rather than style system. Netscape PDT: Nominating nsbeta2, since this is a CSS1 compliance issue. This feature is used a lot in pages that wish to show off standards compliance, so is likely to be met a lot by content developers working with PR2.
Keywords: css1, nsbeta2, regression
Summary: Fixed positioned background doesn't show completely → background-position misinterpreted with fixed backgrounds
Marking nsbeta2+. Will become - on 6/22
Whiteboard: [nsbeta2+] 6/22
This seems to have been magically fixed in 061311
That's only because 061311 is M16. The bug is in the M17 branch.
This bug was introduced by Marc and Kevin in nsCSSRendering.cpp (v3.116 on 06/07) when trying to fix a crash described in bug 40118. I'm going to attach a patch mostly based on the old code. Marc, Kevin: could you carefully review the patch? I could not reproduce the crash in bug 40118, even with nsCSSRendering.cpp v3.115, so I can't really tell whether what I'm proposing causes a regression.
Status: NEW → ASSIGNED
Whiteboard: [nsbeta2+] 6/22 → [nsbeta2+] 6/22 [Fix in hand]
Target Milestone: --- → M16
Attached patch patchSplinter Review
Pierre, it looks like your patch puts back in the code that I mistakenly removed when I fexed the crasher. We need to handle the case where there is no scroll frame and we need to use the root's scroll frame. Your change looks good - I am running with it now. 1000 apologies for the regression.
fixed
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Marking VERIFIED FIXED on: - MacOS9 2000-07-12-15-M17 Commercial - Linux6 2000-07-12-21-M17 Commercial - Win98 2000-07-12-21-M17 Commercial
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: