Closed Bug 190383 Opened 23 years ago Closed 23 years ago

Fixed position elements blit incorrectly when scrolling

Categories

(Camino Graveyard :: Page Layout, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Camino0.7

People

(Reporter: bryner, Assigned: bryner)

References

()

Details

Attachments

(1 file, 2 obsolete files)

Go to http://www.w3.org/Style/CSS/ and scroll down. Note that the fixed position menu in the upper-right redraws incorrectly as you scroll. This doesn't happen in Carbon trunk builds, so it looks like it's a Cocoa widget bug.
There was a previous bug written up regarding this problem.
Whiteboard: DUPEME
*** Bug 190261 has been marked as a duplicate of this bug. ***
I don't think this is a Cocoa bug--it happens in Netscape 7.01 (Mozilla 1.0.2), but not in more recent Mozilla builds (1.3a, for example), so it's probably an issue with the Mozilla branch Chimera uses.
See bug 93526 for more info... this is indeed fixed on trunk.
Depends on: 93526
Before y'all jump the gun on duping this... There is a Cocoa-specific widget bug that causes this problem to appear even on trunk builds. The problem comes from the way we do scrolling in Cocoa, which is where we just bitblt the entire NSView, which moves the bits without any regard for sibling views that may be in the scrolled area. I don't see any way to change Cocoa's behavior in this regard, at least not without converting wholesale to using NSScrollViews for scrolling. So, I think the only thing we can do about it is to invalidate the rect that the sibling view was blitted into (that is, the rect the height of the scroll delta, for vertical scrolling, above or below the view in question). I have a patch which does this and it seems to fix the problem, at least on the w3.org site. I'm going on the assumption that we should avoid over-invalidating at all costs; if it turns out that the view traversal and calculations are more expensive than the invalidate then I'll have to come up with some sort of compromise. I'd _love_ for someone to tell me that there's an easier way to fix this.
Status: NEW → ASSIGNED
Whiteboard: DUPEME
Target Milestone: --- → Chimera0.7
Attached patch patch to nsChildView::Scroll() (obsolete) — Splinter Review
Attached patch patch to nsChildView::Scroll() (obsolete) — Splinter Review
just a small cleanup in the while() loop
Attachment #112671 - Attachment is obsolete: true
Comment on attachment 112672 [details] [diff] [review] patch to nsChildView::Scroll() pink, simon, any thoughts?
Attachment #112672 - Flags: superreview?(sfraser)
Attachment #112672 - Flags: review?(pinkerton)
Attached patch one more patchSplinter Review
Fixed vertInvalid.size.width and horizInvalid.size.height not being set properly, also did a small bit of cleanup to make things more efficient.
Attachment #112672 - Attachment is obsolete: true
Attachment #112672 - Flags: superreview?(sfraser)
Attachment #112672 - Flags: review?(pinkerton)
Attachment #112720 - Flags: superreview?(sfraser)
Attachment #112720 - Flags: review?(pinkerton)
Comment on attachment 112720 [details] [diff] [review] one more patch I made the small change locally of not null-checking the return from [view subviews], since it appears to always return an array, but I'm not going to bother attaching a new patch.
Hrm, I thought this bug existed on the 1.0 branch, but not the trunk (which would suggest that it wasn't in widget code). However, since this is a cocoa widget fix, we might as well take it. + // To do this, start at the root Gecko NSView, and walk down along + // our ancestor view chain, looking at all the subviews in each level + // of the hierarchy. If we find a non-ancestor view that overlaps + // this view, invalidate the area around it. + ... + NSView* view = mParentView; Are you assuming that mParentView is the root gecko view? I don't think that's necessarily the case; mParentView is just this view's parent (kept in a member var so that we can take this out of the view hierarchy, but still keep track of its parent). + NSView* nextAncestorView; It's not obvious that nextAncestorView will always get assigned to in this loop. Probably better to initialize it with NULL. I worry about how this will affect scrolling performace. Is there a way we can avoid it, maybe by keeping a bit around to say that there are non-scrolling views?
If you look at how mParentView is initialized... the toplevel nsChildView will have a NSView passed in as the native parent. All other nsChildViews inherit mParentView from their parent. So, as I'm reading it, all of the nsChildViews for a given gecko instance will have mParentView pointing to the same NSView - the parent view of the root nsChildView. I'd prefer not to have to initialize nextAncestorView to null for each level of the widget hierarchy, since there's no way that I can see for it not to get assigned into. The view system could note whether there are any sibling widgets covering this widget (I think), but if an app had any sort of non-gecko NSView that intersected the gecko content area if would have the same problem.
this patch fixes the above case, but breaks the "post" page for a Blogger.com blog. The top toolbar doesn't draw (just white space) and the "post & publish" button bar doesn't draw when the iframe scrolls as the text gets larger.
Comment on attachment 112720 [details] [diff] [review] one more patch my bad about the patch not working. i tested the wrong version. looks ok, but like simon, i wish there was a way we didn't have to do this every time. however in my tests (long tbox page and w3c css page), the scrolling speed didn't change. r=pink
Attachment #112720 - Flags: review?(pinkerton) → review+
Attachment #112720 - Flags: superreview?(sfraser)
checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Marking verified with the 2003-01-30-07 NB under OS X 10.2.3.
Status: RESOLVED → VERIFIED
*** Bug 192208 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: