Closed
Bug 383010
Opened 17 years ago
Closed 17 years ago
Visual glitches while scrolling pages with position:fixed elements
Categories
(Core :: Web Painting, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: stephen.moehle, Assigned: stephen.moehle)
References
()
Details
Attachments
(1 file, 2 obsolete files)
1.61 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a6pre) Gecko/20070602 Firefox/3.0a6pre
Build Identifier: Mozilla/5.0 (Windows XP; en-US; rv:1.9a6pre) Gecko/20070602 Firefox/3.0a6pre
The fix for bug 343430 gives rise to some visual glitches while scrolling pages with position:fixed elements. This is most obvious on:
http://www.csszengarden.com/?cssfile=/202/202.css&page=0
Scrolling up at a medium to fast speed will cause random black horizontal lines that disappear as soon as scrolling stops.
See also:
http://www.seisomapaikka.com/esiintyjat/
Scrolling up here at a fast clip causes yellow horizontal lines.
I think the problem is that the use of nsRect::ScaleRoundOut() in nsScrollPortView::Scroll() is making the clipping rect for scrolling too big and is causing parts of the fixed elements to get scrolled. Replacing ScaleRoundOut() with ScaleRoundIn(), fixes the glitches and does not seem to regress any of the test cases in bug 343430, bug 324819, and their various duplicates.
I am assuming that ScaleRoundOut() will eventually be called on updateRegion so ScaleRoundOut() on the clipping rect leads to overlap and that ScaleRoundIn() on the clipping rect will not leave any areas that have not been scrolled or invalidated.
Reproducible: Always
Assignee | ||
Comment 1•17 years ago
|
||
Use ScaleRoundIn() instead of ScaleRoundOut() when creating the scrolling clipping rect.
Comment 2•17 years ago
|
||
Bug re-created at http://www.csszengarden.com/?cssfile=/202/202.css&page=0
using both
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070601 Minefield/3.0a5pre ID:2007060104 [cairo]
and
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a6pre) Gecko/20070602 Minefield/3.0a6pre
Comment 3•17 years ago
|
||
You should request review on the patch from Robert O'Callahan (roc@oc).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Testcase-o-rama: http://www.w3.org/Style/CSS/
Standard style "Gold": Already described problem (white lines when scrolling up).
Alternate style "Blue shadows": While scrolling down the bottom-border of the fixed positioned menu flickers.
I think this is the right idea, but what you should do here is ScaleRoundIn on biggestRect to compute toScroll and then scale it out again before subtracting biggestRect from regionToScroll, to ensure that we're actually removing exactly the rect we're going to scroll. Does that make sense?
Yes. Does that fix the bug?
+ toScroll = biggestRect.ScaleRoundIn(1.0/aP2A);
I'd prefer this as
+ biggestRect.ScaleRoundIn(1.0/aP2A);
+ toScroll = biggestRect;
to make it clear that ScaleRoundIn is mutating biggestRect.
Assignee | ||
Comment 8•17 years ago
|
||
Updated for comments. Yes, it does fix the problem and does not regress any of the test cases I have been using.
Attachment #267232 -
Attachment is obsolete: true
Comment on attachment 267234 [details] [diff] [review]
more review
great!
Attachment #267234 -
Flags: superreview+
Attachment #267234 -
Flags: review+
Comment 10•17 years ago
|
||
I think I also see this bug with this testcase: https://bugzilla.mozilla.org/attachment.cgi?id=267052
Assignee: roc → smoehle
Comment 11•17 years ago
|
||
Checking in nsScrollPortView.cpp;
/cvsroot/mozilla/view/src/nsScrollPortView.cpp,v <-- nsScrollPortView.cpp
new revision: 3.86; previous revision: 3.85
done
Checked into trunk.
Thanks for the patch, Stephen!
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Comment 12•17 years ago
|
||
Verified fixed on the various pages/testcases, using:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a6pre) Gecko/20070605 Minefield/3.0a6pre
Status: RESOLVED → VERIFIED
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
•