Closed
Bug 68499
Opened 24 years ago
Closed 24 years ago
CSS1: Background-attachment:fixed buggy for elements other than BODY
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9
People
(Reporter: ian.graham, Assigned: roc)
References
()
Details
(Keywords: css1)
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
It appears that background-attachment: fixed works on elements that
are descendents of BODY _only_ if BODY itself takes a fixed background.
If BODY does not have fixed background (i.e, no background or a
scrolling one), then the fixed background of a descendant does not
scroll, and is in fact "smeared" if it is scrolled past the upper and
lower viewport boundaries.
The referenced URL (http://www.java.utoronto.ca/NS5-bugs/attach.html)
links to three example document illustrating this behavior.
The expected behavior is that a background with background-attachment:fixed
should be fixed independent of the background properties of other elements.
This bug was observed in Mozilla 0.7 [Build: 2001010901]
Note: This bug is likely related to previously fixed bug 40217: "CSS1
background-attachment:fixed does not fix the background"
(http://bugzilla.mozilla.org/show_bug.cgi?id=40217)
Comment 1•24 years ago
|
||
I don't see any smearing - I just see the background not being fixed. Perhaps
that's because I'm using roc's new viewmanager.
Keywords: css1
Assignee | ||
Comment 2•24 years ago
|
||
I see smearing.
Assignee | ||
Comment 3•24 years ago
|
||
But I'm using a pretty old build. Hmm.
Assignee | ||
Comment 4•24 years ago
|
||
OK, new build. The image is actually drawn in the correct fixed position if you
force an expose ... it's just not redrawing at the appropriate time.
Assignee | ||
Comment 5•24 years ago
|
||
OK, this is happening because the DONT_BITBLT flag is set on the view for the
inner block element, but since the scrolling is being done by the body block
element, it sees that its own DONT_BITBLT flag is not set and happily bitblts.
The solution is to make a widget for background-attach: fixed elements.
Assignee | ||
Comment 6•24 years ago
|
||
OK, I have a patch. The patch makes nsViewManager respect DONT_BITBLT flags set
on any child (widget-bearing) view of the view being scrolled. We still use fast
platform scrolling for the scrolled widget, but we make sure to invalidate any
children which have DONT_BITBLT set.
The patch also forces the view for a "background-attachment: fixed" frame to
have a widget.
Reviews, etc, welcome.
Assignee | ||
Comment 9•24 years ago
|
||
Comment 10•24 years ago
|
||
Would invalidating the descendants (or did you really mean children?) with
DONT_BITBLT without forcing views for 'background-attachment: fixed' elements to
have widgets fix the problem? What are the disadvantages of making them have
widgets? (What views have widgets right now?) I think (although I"m not sure)
that I remember comments from when 'position: fixed' was originally implemented
that it would have been nicer not to require widgets for 'position: fixed'.
Assignee | ||
Comment 11•24 years ago
|
||
I mean "descendants". We might have a situation where none of the immediate
child views have DONT_BITBLT but some of their children do.
Hmm. I thought I had a good reason to make them widgets but I can't think of it
now :-). It should be doable without special widgets. I'll try.
Assignee | ||
Comment 12•24 years ago
|
||
Assignee | ||
Comment 13•24 years ago
|
||
That should do the trick!
Now let's get the patch in before it rots.
Comment 14•24 years ago
|
||
patch looks good.
r=kmcclusk@netscape.com
minor nit: shouldn't aRepaintOnlyUnbittableViews be called
aRepaintOnlyUnblittableViews?
Assignee | ||
Comment 15•24 years ago
|
||
Er, yeah. I'll check in the correct spelling.
Assignee | ||
Comment 16•24 years ago
|
||
Hmm, who should be the super-reviewer? What's buster's status?
Comment 17•24 years ago
|
||
buster has left the building
well, mostly. anyway, waterson is your source for sr. attinasi should get sr
privelages, if he hasn't already.l
Comment 18•24 years ago
|
||
roc: dude. 4 days from bug filing to awaiting sr=. you rock! :-)
attinasi/waterson: can we have an sr=?
Keywords: approval
Comment 19•24 years ago
|
||
sr=attinasi
Assignee | ||
Comment 20•24 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 21•24 years ago
|
||
This isn't actually fixed until the new view manager is turned on. Adding
dependence on bug 39621 and reopening.
Assignee | ||
Updated•24 years ago
|
Status: REOPENED → ASSIGNED
Target Milestone: --- → mozilla0.9
Assignee | ||
Comment 22•24 years ago
|
||
The new view manager is checked in and enabled, so this bug is now fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 23•24 years ago
|
||
Verified fixed in 30/March nightly build (build 2001033020).
However, I note that when only the background of a non-body
element is fixed, as in
http://www.java.utoronto.ca/NS5-bugs/bg-attach-ponly.html,
then the fixed background 'jumps' vertically a bit when the
page is scrolled. So it works, but there's some redraw
problem affecting this case.
Assignee | ||
Comment 24•24 years ago
|
||
There are many situations where we get jumpy redraws. Here it's because we first
do a screen-to-screen bitmap copy for fast scrolling, then we do a redraw to fix
up the display. In other situations, it's because updating the screen requires
repainting of more than one widget, which can only be done one widget at a time.
(This latter one is particularly noticeable with fixed-position elements.)
Fixing these would require a significantly different rendering architecture with
1) minimal usage of native widgets, preferably one widget per page
and
2a) platform support for copying bits from the screen to an off-screen rendering
buffer
or
2b) explicitly retaining the rendered bits for each page in an off-screen buffer
so we can copy from them later
On some platforms we might be able to arrange for some sort of synchronized
update of a lot of native widgets at once, including scroll operations, but I
don't even know how to do that for Windows, let alone the platforms I'm less
familiar with.
In other words, this is a tough one.
Comment 25•24 years ago
|
||
Robert: 2b would fit in very well with the proposed fix for bug 65701.
Reporter | ||
Comment 26•24 years ago
|
||
I can see how this is a tough problem. But it's clear that the
performance hit relative to platform-specific renders (IE, etc.)
can be significant, and thus a real impediment to use of
Mozilla-based products on slower hardware. It's also an easy
'club' with which Mozilla will be bashed by a certain Unnamed
Browser Vendor ;-)
So, performance analysis and re-engineering is probably
called for, although I wouldn't hazard a timeline for it.
You need to log in
before you can comment on or make changes to this bug.
Description
•