Closed
Bug 516885
Opened 15 years ago
Closed 15 years ago
Scrolling inside a div containing block elements with margins leaves visual glitches
Categories
(Core :: Web Painting, defect, P2)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta2-fixed |
status1.9.1 | --- | unaffected |
People
(Reporter: nirvn.asia, Assigned: roc)
References
Details
(Whiteboard: [sg:critical?])
Attachments
(4 files)
1.69 KB,
text/html
|
Details | |
3.72 KB,
image/png
|
Details | |
39.90 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
894 bytes,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a2pre) Gecko/20090915 Namoroka/3.6a2pre Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a2pre) Gecko/20090915 Namoroka/3.6a2pre Scrolling inside a div containing block elements with margins leaves visual glitches in between blocks. Reproducible: Always Steps to Reproduce: 1. Open the test case attached to this bug 2. Scroll the div region with the mouse wheel back and forth Actual Results: Visual glitches appears in between the p elements Expected Results: No visual glitches. Disabling smooth scrolling makes it easier to see glitches.
Reporter | ||
Comment 1•15 years ago
|
||
Reporter | ||
Updated•15 years ago
|
Version: unspecified → 1.9.2 Branch
Reporter | ||
Comment 2•15 years ago
|
||
Comment 3•15 years ago
|
||
Confirmed on Windows Vista with latest trunk. Not reproducible on Shiretoko. These kinds of bugs are currently mostly for :roc.
Reporter | ||
Comment 4•15 years ago
|
||
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a2pre) Gecko/20090911 Namoroka/3.6a2pre Also visible on linux builds.
Assignee | ||
Updated•15 years ago
|
Flags: blocking1.9.2?
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → roc
Assignee | ||
Updated•15 years ago
|
Flags: blocking1.9.2? → blocking1.9.2+
Priority: -- → P2
Assignee | ||
Comment 5•15 years ago
|
||
The immediately problem was confusion over the interpretation of aVisibleRegion in ComputeVisibility. The underlying problem is that we're overloading aVisibleRegion to mean the union of the visible region before scrolling and the visible region after scrolling, but not doing it consistently, which is partly because that overloading is just really confusing. This patch simplifies the code (I think) by passing two regions: aVisibleRegion for the region visible after the move, and aVisibleRegionBeforeMove for the region visible before the move. All the ComputeVisibility methods are updated to deal with both regions --- I think the resulting logic is clearer --- and this bug goes away.
Attachment #404752 -
Flags: review?(dbaron)
Assignee | ||
Updated•15 years ago
|
Whiteboard: [needs review]
Comment 6•15 years ago
|
||
-> NEW (since there's a patch)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 404752 [details] [diff] [review] fix + // If we're analyzing moving content, then it doesn't really matter + // what we set mNeedAlpha to, so let's conservatively set it to true so + // we don't have to worry about getting it "correct" for the moving case. So analyzing moving content is always separate from painting (i.e., different display lists)? (I'm a little rusty on this...) Should you assert in ComputeVisibility (which?) that aVisibleRegionBeforeMove being non-null is equivalent to aBuilder->HasMovingFrames()? Or are they equivalent? Also, I'm a little worried about null references getting passed to AccumulateVisibleRegionOfMovingContent; have you checked that that can't happen? I like these changes; I think they make things clearer. Sorry for the delay in getting to them. r=dbaron
Attachment #404752 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 8•15 years ago
|
||
(In reply to comment #7) > (From update of attachment 404752 [details] [diff] [review]) > + // If we're analyzing moving content, then it doesn't really matter > + // what we set mNeedAlpha to, so let's conservatively set it to true so > + // we don't have to worry about getting it "correct" for the moving case. > > So analyzing moving content is always separate from painting (i.e., > different display lists)? That is currently true, yes. In principle we could make scrolling a bit more efficient by reusing the list for painting, but I don't expect to do that anytime soon. Note that setting mNeedAlpha to true wouldn't break that usage, just be a tiny deoptimization. > Should you assert in ComputeVisibility (which?) that > aVisibleRegionBeforeMove being non-null is equivalent to > aBuilder->HasMovingFrames()? Or are they equivalent? They should be equivalent. I'll assert this in every ComputeVisibility implementation. > Also, I'm a little worried about null references getting passed to > AccumulateVisibleRegionOfMovingContent; have you checked that that can't > happen? There are only two call sites. The one in nsDisplayList::ComputeVisibility passes in local regions, so they can't be null. The one in nsDisplayClip::ComputeVisibility dereferences *aVisibleRegionBeforeMove, which can't be null because we're guarded by if (aBuilder->HasMovingFrames()).
Assignee | ||
Updated•15 years ago
|
Whiteboard: [needs review] → [needs landing]
Assignee | ||
Comment 9•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/e95541e43a26
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [needs landing] → [needs 192 landing]
Assignee | ||
Comment 10•15 years ago
|
||
nsDisplayTransform incorrectly passes a non-null aVisibleRegionBeforeMove even in non-scrolling situations. This is harmless but triggers assertions.
Attachment #409183 -
Flags: review?(dbaron)
Assignee | ||
Comment 11•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/4f82b0ff1a78
status1.9.2:
--- → final-fixed
Whiteboard: [needs 192 landing]
Comment on attachment 409183 [details] [diff] [review] fix assertion due to nsDisplayTransform r=dbaron (but maybe wrap at less than 80 characters?)
Attachment #409183 -
Flags: review?(dbaron) → review+
Assignee | ||
Updated•15 years ago
|
Whiteboard: [needs 192 landing][sg:critical?]
Assignee | ||
Updated•15 years ago
|
Whiteboard: [needs 192 landing][sg:critical?] → [needs landing][sg:critical?]
I landed the assertion fix on mozilla-central: http://hg.mozilla.org/mozilla-central/rev/c69a51243e06 We should probably land it on 1.9.2 as well, perhaps?
Assignee | ||
Comment 14•15 years ago
|
||
Yes.
Assignee | ||
Updated•15 years ago
|
Whiteboard: [needs landing][sg:critical?] → [sg:critical?]
Updated•13 years ago
|
status1.9.1:
--- → unaffected
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
•