Closed
Bug 152373
Opened 22 years ago
Closed 22 years ago
fixed background does not work properly
Categories
(Core :: Web Painting, defect, P3)
Core
Web Painting
Tracking
()
VERIFIED
FIXED
People
(Reporter: Daniel.Steinberger, Assigned: roc)
References
()
Details
(Keywords: css1, regression)
Attachments
(1 file, 1 obsolete file)
5.77 KB,
patch
|
kmcclusk
:
review+
kinmoz
:
superreview+
|
Details | Diff | Splinter Review |
From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1a) Gecko/20020617 BuildID: 2002061707 visiting Eric Meyer's css/edge http://www.meyerweb.com/eric/css/edge/ made me see that we've got a regression with fixed backgrounds. haven't found out exactly which circumstances (=which combination of CSS) cause the regression, but i'll investigate. Reproducible: Always Steps to Reproduce: 1. visit http://www.meyerweb.com/eric/css/edge/ 2. scroll a little Actual Results: the should-be-fixed image (astronaut) scolls with the page and breaks when scolled out of the viewport and back in again Expected Results: work like in v1.0 and before
Reporter | ||
Comment 1•22 years ago
|
||
i've checked back with 1.0 .. it's definitly a regression and not caused by eric changing some css or something.
Keywords: regression
It looks like we're either not setting or not observing NS_VIEW_FLAG_DONT_BITBLT -- the fixed background draws at the correct position if you move the page and then re-expose the window.
Keywords: css1
*** Bug 152480 has been marked as a duplicate of this bug. ***
Layout is setting the DONT_BITBLT flag on at least some views. ->Views.
Assignee: dbaron → kmcclusk
Component: Style System → Views
QA Contact: ian → petersen
(And I see this on Linux too.)
OS: Windows XP → All
Hardware: PC → All
Updated•22 years ago
|
Priority: -- → P3
Notice that the complexspiral demo http://www.meyerweb.com/eric/css/edge/complexspiral/demo.html does still work. That is very strange, I thought these two pages where using the same effect
Comment 8•22 years ago
|
||
The thing making the difference between http://www.meyerweb.com/eric/css/edge/ and http://www.meyerweb.com/eric/css/edge/complexspiral/demo.html appears to be that complexspiral has the body set to background-attachment:fixed, which seems to make this bug vanish. See http://tom.me.uk/2002/8/moz-background-attachment.html and http://tom.me.uk/2002/8/moz-background-attachment-fixed.html
Assignee | ||
Comment 9•22 years ago
|
||
I suck. I should have fixed this for 1.1. I will fix this soon.
Updated•22 years ago
|
Severity: normal → major
Assignee | ||
Comment 10•22 years ago
|
||
Here's the fix. The problem was that we were obeying the "ALWAYS_BLIT" flag which was always being set on the root scrollable view. That flag is, of course, wrong. Instead of these magic "ALWAYS_BLIT", "NEVER_BLIT" flags, we need to finish the job I started with CanScrollWithBitBlt, which is to actually compute accurately when blitting is possible rather than relying on hints. So I eliminated the last use of ALWAYS_BLIT. The only problem is that CanScrollWithBitBlit ended up deciding that the root scroll frame in normal documents could not be blitted, because the unscrolled viewport frame is visible in the scroll region. (It's not really visible but some of the shortcuts we take in CanScrollWithBitBlt make it look visible.) However it is still safe to scroll with bitblt in this case because the viewport frame (and the root scroll frame) never paint anything, so the fact that they're visible is irrelevant. So I added the new view property "is blank". When set on a view, it means the view is either a solid colour or completely transparent (if marked transparent). CanScrollWithBitBlt can ignore blank views that cover the entire area to be scrolled (because the pixels drawn by those views will look the same "before" and "after"). For now we just mark viewport views and scrollport views as blank. There are additional optimizations we could do with this property in the future --- e.g., dropping blank+transparent views from display lists early. This patch eliminates the last use of ALWAYS_BLIT (NEVER_BLIT was already unused). A future round of cruft removal should remove all mention of these flags and all mention of Get/SetScrollProperties (since they're only used for these flags).
Assignee | ||
Comment 11•22 years ago
|
||
> (It's not really visible but some of the shortcuts we take in
> CanScrollWithBitBlt make it look visible.)
Having slept on it, I think the viewport view really should not be showing up as
visible. Perhaps this blank stuff isn't actually necessary if I can fix some
other bug.
Assignee | ||
Comment 12•22 years ago
|
||
Although support for "blank" would help fix a DHTML problem we have: a view with child views moving around, but no content of its own, keeps getting resized which forces repainting of the areas affected by the resize.
Assignee | ||
Comment 13•22 years ago
|
||
Here's the better fix. No BLANK required. We just do the following: -- Get rid of the ALWAYS_BLIT hack (so all these magic flags can be ripped out later as mentioned above) -- Fix bug in the scrolling views to pass in the scrolled view to CanScrollWithBitBlt (this is how it should have been all along) -- The only problem left is that this causes us to use slow scrolling when fixed-position stuff is present. Blitting is legal in this situation only because fixed-position elements have native widgets, and the areas covered by those native widgets aren't affected by the blit. To detect this in CanScrollWithBitBlit we need to figure out the areas covered by native widgets that will not be affected by a blit, and exclude these areas from the display list calculation and inspection. This is unfortunately hard because I don't trust the native widget layer's z-index information; given two sibling widgets, I don't think we can be sure which one gets drawn in front of the other. The only thing I do trust is that positioned elements have their native widgets in front of the main scrolling widget for the document. So this code detects exactly that situation and excludes those areas from the display list, and the calculations work and we continue to get fast scrolling in the presence of fixed position elements.
Attachment #97001 -
Attachment is obsolete: true
Assignee | ||
Comment 14•22 years ago
|
||
The patch also enhances the display list debugging code a little bit. I'd like to get this in before the freeze on Tuesday night. This is a pretty bad bug because it screws up a CSS1 feature that many CSS demo sites use.
Comment 15•22 years ago
|
||
Comment on attachment 97363 [details] [diff] [review] much better fix sr=kin@netscape.com Should we be using nsRectFast? I thought I saw a patch fly by that was trying to remove all uses of it outside of the nsRegion code?
Attachment #97363 -
Flags: superreview+
Comment 16•22 years ago
|
||
Comment on attachment 97363 [details] [diff] [review] much better fix r=kmcclusk@netscape.com
Attachment #97363 -
Flags: review+
Assignee | ||
Comment 17•22 years ago
|
||
Thanks. I will change nsRectFast to nsRect before checking in.
Assignee | ||
Comment 18•22 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 19•22 years ago
|
||
Don't suppose this fix also takes care of bug 165149 (another nasty background bug)? Someone suggested it might be related to this one...
Comments there indicate that this has fixed bug 106580.
Updated•6 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•