Closed Bug 40217 Opened 25 years ago Closed 25 years ago

CSS1 background-attachment:fixed does not fix the background

Categories

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

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: jcarpenter0524, Assigned: attinasi)

References

()

Details

(Whiteboard: [nsbeta2+][6/15][Fix In Hand])

Attachments

(3 files)

Overview Description: background-attachment: fixed does not fix the background. Instead, it smears along with the text Steps to Reproduce: - Go to URL: mozilla.org/quality/browser/standards/css_1/background_attachment_fixed.html - mouse wheel down, or just use the scroll bar Actual Results: The text scrolls up, and the background becomes a smeary mess Expected Results: The background should hold still while the text scrolls over it. Build Date & Platform Bug Found: 2000-05-22-08-M16 Win98 Additional Builds and Platforms Tested On: 2000-05-21-20-M16 Mac Can't get linux build to run...
Looks pretty nasty; the background is not attached, it is scrolling, and after scrolling it a bit the painting gets hosed too. I'm taking this since I just reworked the background stuff for the canvas - I think the background-attachment needs to propagated with the image, color and flags...
Assignee: pierre → attinasi
After some more looking, I found that we are handling the attachment values correctly, propagating them to the canvas. In fact, the problem is really just a painting problem. If you load the test page, scroll it half-an-image worth, and then cover the browser with another window you will see that the image is indeed fixed when it repaints. There are some horrible invalidation problems however, and I am looking at what scrolling is doing.
Status: NEW → ASSIGNED
The View is causing the problem: it is BitBlting the window to do the scrolling, so it moves the background image up and down, and only the invalidated area gets repainted. That's why it gets do ugly too, because the 'old' image bits that are moved due to the scroll are not always lining up with the newly painted image bits. I have a fix that causes the View to scroll without doing the BitBlt - I'll work with Kevin McKlusky to get this in properly (I've just hacked it in for now). Nominating nsbeta2: if we do not fix this then we should not support fixed backgrounds because they do not work.
Keywords: nsbeta2
Is this a common problem that the user will see?
Whiteboard: [NEED INFO]
I'm not sure how common it is, but on pages with fixed backgrounds Mozilla will look absolutely awful during and after scrolling (the image gets smudged all over the screen). Since IE handles this just fine I am guessing the property is used on some sites, but again, I'm not sure of the frequency (Nav4 ignores the background-attachment property and makes it scrolling). I have a good (i.e. not hacked) fix now. I'll attach it to the bug. IF the fix looks too risky, then I suggest we at least ignore the fixed background value since it is clearly worse now than if we just ignored it.
Whiteboard: [NEED INFO] → [NEED INFO][Fix In Hand]
Jan -- I recommend [nsbeta2+][6/15]. This is a CSS1 compliance bug and we have a fix in hand, so we should accept it.
Whiteboard: [NEED INFO][Fix In Hand] → [Fix In Hand]
Putting on [nsbeta2+][6/15] radar.
Whiteboard: [Fix In Hand] → [nsbeta2+][6/15][Fix In Hand]
Put the milestone in to M16 - getting a review and approval right now.
Target Milestone: --- → M16
I changed the implementation to use a new method on the FrameManager to find the canvas frame. I'll attach the new patches...
Fix checked in. (nsIFrameManager.h, nsFrameManager.cpp, nsHTMLBodyElement.cpp)
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed!! (Cooooool!) Verified 2000-06-01-08-M16 Win32 2000-06-01-08-M16 Linux 2000-06-01-08-M16
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: