Closed
Bug 588403
Opened 15 years ago
Closed 14 years ago
Auto-scroll can cause rendering artifacts
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
mozilla5
Tracking | Status | |
---|---|---|
blocking2.0 | --- | - |
People
(Reporter: matjk7, Assigned: tnikkel)
References
()
Details
(Keywords: regression, Whiteboard: [Input][viewmanagerlink])
Attachments
(5 files, 2 obsolete files)
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:2.0b5pre) Gecko/20100817 Minefield/4.0b5pre
Build Identifier:
With patches from Bug 130078, auto-scroll (middle click scrolling) "grabs" whatever surface it was clicked on and renders it somewhere else. http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox is a good place to test this.
Reproducible: Always
Steps to Reproduce:
1.Middle click on a green build
2.Scroll to somewhere else
Actual Results:
The green part around middle-click is rendered wherever you scroll to.
Expected Results:
After scrolling off the green build, middle-click should have removed the green part around it.
I'm not using the build from Bug 130078 atm, but I can grab it if a screenshot is needed here.
Assignee | ||
Comment 1•15 years ago
|
||
I first started seeing this after retained layers landed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 2•15 years ago
|
||
I don't see this anymore. Can you try this build http://ftp.mozilla.org/pub/mozilla.org/firefox/tryserver-builds/tnikkel@gmail.com-2050d6216b77/ ?
Probably fixed by bug 588407. Transparent surface over transparent surface maybe doesn't get along so well.
Reporter | ||
Comment 3•15 years ago
|
||
(In reply to comment #2)
> I don't see this anymore. Can you try this build
> http://ftp.mozilla.org/pub/mozilla.org/firefox/tryserver-builds/tnikkel@gmail.com-2050d6216b77/
> ?
>
> Probably fixed by bug 588407. Transparent surface over transparent surface
> maybe doesn't get along so well.
Confirming fixed in latest build.
Assignee | ||
Comment 4•15 years ago
|
||
Should be fixed by bug 588407.
I'm seeing this with the latest tryserver builds posted today.
http://ftp.mozilla.org/pub/mozilla.org/firefox/tryserver-builds/tnikkel@gmail.com-cf64eea45e07/
Assignee | ||
Comment 6•15 years ago
|
||
Weird. It definitely was fixed, but now is back.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 7•15 years ago
|
||
The link I posted to the try server build (2050d6216b77) was incorrect, that build did not have 130078. So this was never fixed.
It isn't just the autoscroll icon that causes this. If you have a noautohide, noautofocus panel element overlaid from an icon in the statusbar, scrolling with that panel open causes the same kind of tearing around the panel. (eg, Echofon's primary panel for showing tweets: If you scroll a webpage while it's open, the space behind the panel (and a bit around it ((just to the right?)) shows the pre-scroll page content.
I don't see any problem with the autoscroll icon on Mac.
Assignee | ||
Comment 10•15 years ago
|
||
Latest try server build still has the problem.
I see this on Windows 7.
Assignee: nobody → roc
![]() |
||
Comment 13•15 years ago
|
||
See Bug 591585
It happens not only on Aero but also non Aero style of Windows7.
It also happens on WindowsXP.
It does not happen on Linux.
Comment 14•15 years ago
|
||
I thought it was just transparent before now its like half transparent on the left side and half picking up a square the size of the autoscroll widget.
Opening the bookmarks sidebar also does similar things. Not sure if these would all have the same fix.
Reporter | ||
Comment 16•15 years ago
|
||
(In reply to comment #15)
> Created attachment 470196 [details]
> screenshot
>
> Opening the bookmarks sidebar also does similar things. Not sure if these would
> all have the same fix.
That's pretty bad. I'll nominate this as blocking then.
blocking2.0: --- → ?
Comment 17•15 years ago
|
||
(In reply to comment #15)
> Created attachment 470196 [details]
> screenshot
>
> Opening the bookmarks sidebar also does similar things. Not sure if these would
> all have the same fix.
cannot reproduce here.
Mozilla/5.0 (Windows NT 6.1; rv:2.0b5pre) Gecko/20100828 Firefox/4.0b5pre ID:20100828040640
Comment 18•15 years ago
|
||
(In reply to comment #17)
> (In reply to comment #15)
> > Created attachment 470196 [details] [details]
> > screenshot
> >
> > Opening the bookmarks sidebar also does similar things. Not sure if these would
> > all have the same fix.
>
> cannot reproduce here.
>
> Mozilla/5.0 (Windows NT 6.1; rv:2.0b5pre) Gecko/20100828 Firefox/4.0b5pre
> ID:20100828040640
I can reproduce under regular mode and d2d the sidebar issue. It happens on bugzilla pages for example.
Mozilla/5.0 (Windows NT 6.1; rv:2.0b5pre) Gecko/20100828 Firefox/4.0b5pre ID:20100828110247
Assignee | ||
Comment 19•15 years ago
|
||
I can't reproduce the sidebar issue, and from the surface it doesn't seem like it's related. Could we get a bug filed for the sidebar issue too?
Comment 20•15 years ago
|
||
sidebar issue happened, but different rendering.
[STR]
Open sidebar
Assignee | ||
Comment 21•15 years ago
|
||
Filed bug 591834 for the sidebar issue. Is there any reason to think they are the same issue?
Comment 22•15 years ago
|
||
It looks like the sidebar issue would be looked at in bug 591671, no?
Assignee | ||
Comment 23•15 years ago
|
||
Bug 591671 has different steps to reproduce. I can't say if they are both the same issue without investigation. Better to have it on file and resolve it as fixed by another bug then not tracking it at all.
Comment 24•15 years ago
|
||
I can confirm that I'm having a similar issue on both WinXP 32bit and Win7 64bit
Comment 25•15 years ago
|
||
Here's a 20second video showing the exact issue I've been having.
http://tinyogg.com/files/UtNnB.ogv
Assignee | ||
Comment 28•15 years ago
|
||
Hmm, even we I always return opaque white from PresShell::ComputeBackStopColor the autoscroll is still translucent, and the weird square below the autoscroll icon still exists. The glass at the top of the window gets drawn as white though, so it's definitely taking effect.
Assignee | ||
Comment 29•15 years ago
|
||
The layer tree's for both the autoscroll's widget and the main widget look okay though.
Updated•15 years ago
|
blocking2.0: ? → final+
Keywords: regression
Comment 31•15 years ago
|
||
Maybe there is something weird with personas implementation? Not with autoscroll's widget and the main widget
(In reply to comment #31)
> Maybe there is something weird with personas implementation? Not with
> autoscroll's widget and the main widget
It affects me regardless of whether I use a persona.
Comment 34•15 years ago
|
||
I think there is some problems with glass window or personas implementation of glass window
Better to check this, why it is unstable
Comment 35•15 years ago
|
||
After I updated to FF4 beta5 I'm having this bug on both my computers with Windows XP.
Comment 36•15 years ago
|
||
It happens to me with latest nightly build. (20100908)
Btw. I'm talking about middle click.
OS is Windows 7.
Assignee | ||
Comment 37•15 years ago
|
||
Comment 28 was wrong. I wasn't making it opaque properly.
When I make the autoscroll opaque the glitch is still there.
The position of the glitch rect relative to the cursor changes depending on if you have the menubar disabled or not.
Assignee | ||
Updated•15 years ago
|
Assignee: roc → tnikkel
Assignee | ||
Comment 38•15 years ago
|
||
nsWindow::GetBounds, nsWindow::mBounds, and the view/ seem to be a little confused for popup windows and I think this is causing the bug somehow.
Assignee | ||
Comment 40•15 years ago
|
||
nsView::CalcWidgetBounds expects popups to be in screen coordinates, not parent widget coordinates. As does ::SetWindowPos. But nsWindow::GetBounds tries to do something else. I'm still investigating.
Comment 42•15 years ago
|
||
I still have this Problem on
Mozilla/5.0 (Windows NT 6.0; rv:2.0b5) Gecko/20100101 Firefox/4.0b5
But i hadnt had the bug in the 4th (and previous) beta of firefox 4
Assignee | ||
Comment 43•15 years ago
|
||
So the confusion with popup widgets being in screen coords vs relative to parent widget was a red herring. It just made the glitch offset from the autoscroll icon instead of directly under it. I'll fix that too.
The real problem is in nsViewManager::UpdateWidgetArea. We subtract the area of each child widget from the area we have to update on the parent widget. But if the child widget is transparent that is wrong, we still need to update that area.
We didn't see this bug without 130078 because the autoscroll was a child of the chrome widget but it only appears over the content area, so we didn't subtract its area from the area to update on the content widget.
It also wasn't visible until retained layers landed because we would blit most of the window when scrolling.
Assignee | ||
Comment 44•15 years ago
|
||
Attachment #474244 -
Flags: review?(jmathies)
Assignee | ||
Comment 45•15 years ago
|
||
Attachment #474246 -
Flags: review?(roc)
Assignee | ||
Comment 46•15 years ago
|
||
This actually fixes the bug.
Attachment #474247 -
Flags: review?(roc)
Comment on attachment 474246 [details] [diff] [review]
Part 2. In nsViewManager::UpdateWidgetArea needs to adjust for popup widgets.
Why do we even want to recurse into popup widgets here? It seems to me we do not. Invalidates inside popups will invalidate the popup's view and then the popup's widget directly.
In fact, if we just skip popups there, that would take care of part 3 as well. We know that we don't create transparent child widgets.
Assignee | ||
Comment 49•15 years ago
|
||
Ok, so we can skip recursing on popup widgets. Removing the area to update from the parent widget when it is covered by a popup widget would still save some painting. Is it worth it?
I don't think so, and I don't even think it's correct on any platform where the window manager caches window contents.
Assignee | ||
Comment 51•15 years ago
|
||
Attachment #474246 -
Attachment is obsolete: true
Attachment #474247 -
Attachment is obsolete: true
Attachment #474332 -
Flags: review?(roc)
Attachment #474246 -
Flags: review?(roc)
Attachment #474247 -
Flags: review?(roc)
Attachment #474332 -
Flags: review?(roc) → review+
![]() |
||
Comment 52•15 years ago
|
||
(In reply to comment #44)
> Created attachment 474244 [details] [diff] [review]
> Part 1. Make nsWindow::GetBounds return in screen coordinates for popups.
Couldn't we make this the default behavior for all calls to GetBounds now that we've ditched child widgets?
Assignee | ||
Comment 53•15 years ago
|
||
There are still plugin widgets at least.
Comment 54•15 years ago
|
||
Comment on attachment 474332 [details] [diff] [review]
Part 2. Ignore popup child widgets when updating.
This shouldn't be necessary. You shouldn't find eWindowType_popup
widgets on any child list. Which platform did you see that on?
Assignee | ||
Comment 55•15 years ago
|
||
On Windows. I didn't actually look at the childlist pointers to verify, so I can double check if needed.
Assignee | ||
Comment 56•15 years ago
|
||
I know the parent pointer was set to our top level widget, and I don't see anything popup specific about how nsBaseWidget::AddChild is called.
Comment 57•15 years ago
|
||
nsWindow::mParent is set for all widgets on Windows, but it's not actually
used for anything (yet), it's just to hold a strong ref to wallpaper some
crash bugs. GetParent() on Windows uses the native window ancestors to
lookup the nsIWidget parent, except for top-level widgets like
eWindowType_popup where we just return null directly.
Comment 58•15 years ago
|
||
(the plan is that GetParent() should use mParent eventually (bug 569583))
Assignee | ||
Comment 59•15 years ago
|
||
What I meant by the parent part was that the code in nsBaseWidget::BaseCreate at http://mxr.mozilla.org/mozilla-central/source/widget/src/xpwidgets/nsBaseWidget.cpp#222 would then presumably add the popup widget as a child like any other.
Comment 60•15 years ago
|
||
It seems we have two kinds of eWindowType_popup widgets;
a top-level kind where GetParent()==nsnull and don't live on any child list
and a child kind that is added to its GetParent()'s child list.
I wasn't aware of that. Ok, carry on...
Assignee | ||
Comment 61•15 years ago
|
||
On Windows nsWindow::GetParent() is very different from mParent, and in fact I think it returns null for popup widgets. But the mParent pointer is still the toplevel Gecko widget for the auto-scroll popup.
Assignee | ||
Comment 62•15 years ago
|
||
Landed part 2
http://hg.mozilla.org/mozilla-central/rev/73855a9ef1fd
This bug as reported should be effectively resolved, leaving open to get the popup widget coordinate fix in in some form.
Comment 63•15 years ago
|
||
This bug also occurs on Windows XP, although this bug is filed under Windows 7.
Assignee | ||
Comment 64•15 years ago
|
||
Are you still seeing this bug? It should be fixed in 2010-09-12 nightlies.
Comment 65•15 years ago
|
||
It's fixed for my Win7 x64.
I think that XP is fixed too.
Comment 66•15 years ago
|
||
running 4.0b6 - still have the problem.
Comment 67•15 years ago
|
||
The fix will be in b7.
Comment 68•15 years ago
|
||
fixed in sep 15th nightly build.
Assignee | ||
Comment 70•15 years ago
|
||
Jim, you may have missed comment 53 in reply to your review comment.
![]() |
||
Comment 72•15 years ago
|
||
(In reply to comment #70)
> Jim, you may have missed comment 53 in reply to your review comment.
(In reply to comment #53)
> There are still plugin widgets at least.
I always forget about those dastardly plugins. Wish I could!
Do we have some sort of STR I could use to reproduce what this second patch fixes?
![]() |
||
Comment 73•15 years ago
|
||
(A test might be good too!)
Assignee | ||
Comment 74•15 years ago
|
||
(In reply to comment #72)
> Do we have some sort of STR I could use to reproduce what this second patch
> fixes?
I don't know of any problems that you can see that part 1 fixes. If part 2 is backed out then applying part 1 would move the rendering artifact from being a few pixels offset from the autoscroll, to being exactly under it.
I will try to put together a test for the main bug here, but I don't know if it will work or not.
Whiteboard: [needs review]
Comment 78•15 years ago
|
||
Bug 598583 is a duplicate of this, but I can't mark it as one. Would someone else be able to please?
Comment 80•15 years ago
|
||
This is being seen by users on various flavors of Windows over Fx4.0 Beta 6:
http://input.mozilla.com/en-US/search/?product=firefox&sentiment=sad&date_end=&date_start=&version=&q=middle+button+page+scroll
Whiteboard: [needs review] → [needs review] [Input]
Comment 83•15 years ago
|
||
@Aakash Desai - it is fixed in incoming Beta 7 :)
Comment 84•15 years ago
|
||
(In reply to comment #83)
> @Aakash Desai - it is fixed in incoming Beta 7 :)
Not completely as per comment 53.
Assignee | ||
Comment 85•15 years ago
|
||
This should be completely fixed from a user perspective. If not please let me know.
I noticed something else that should be fixed while working on this (what comment 53 is about and why this bug is still open), but as far as I know it doesn't cause any problems that a user could see.
Assignee | ||
Comment 86•15 years ago
|
||
(In reply to comment #74)
> I will try to put together a test for the main bug here, but I don't know if it
> will work or not.
Jim, I thought about how to write a test for this bug, but with our current testing infrastructure there is no way to. We invalidate the correct area, but the view manager intercepts it and subtracts an area wrongly before passing it to the widget. The invalidation before the view manager is the only one we have access to from reftests. So the incorrect invalidation isn't available to reftests. So I think we should just land the code correction here and resolve this.
Comment 87•15 years ago
|
||
Would looking at this test help?
toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js
Assignee | ||
Comment 88•15 years ago
|
||
That test checks that autoscrolling actually scrolls. We would need to test that the correct things get drawn to the screen.
![]() |
||
Comment 91•15 years ago
|
||
(In reply to comment #86)
> (In reply to comment #74)
> > I will try to put together a test for the main bug here, but I don't know if it
> > will work or not.
>
> Jim, I thought about how to write a test for this bug, but with our current
> testing infrastructure there is no way to. We invalidate the correct area, but
> the view manager intercepts it and subtracts an area wrongly before passing it
> to the widget. The invalidation before the view manager is the only one we have
> access to from reftests. So the incorrect invalidation isn't available to
> reftests. So I think we should just land the code correction here and resolve
> this.
Hmm, I don't think an api like GetBounds should return different values for different window types. Is there any way the caller could differentiate the window type and call separate apis on the widget?
Assignee | ||
Comment 92•15 years ago
|
||
I agree that the current API is not great. Is it reasonable to take a small bug fix to the current API then to redesign the API?
(In reply to comment #85)
> This should be completely fixed from a user perspective. If not please let me
> know.
What blocks marking the bug fixed? (And should that be a blocker?)
Whiteboard: [needs review] [Input] → [needs review] [Input][softblocker]
Assignee | ||
Comment 94•15 years ago
|
||
There is a correctness fix that I named part 1, it doesn't fix anything that I know about. That part should not be a blocker.
Whiteboard: [needs review] [Input][softblocker] → [needs review] [Input][softblocker][viewmanagerlink]
The unfixed part of this bug doesn't block.
blocking2.0: final+ → -
Whiteboard: [needs review] [Input][softblocker][viewmanagerlink] → [needs review] [Input][viewmanagerlink]
![]() |
||
Comment 96•15 years ago
|
||
(In reply to comment #92)
> I agree that the current API is not great. Is it reasonable to take a small bug
> fix to the current API then to redesign the API?
Hmm well if it doesn't actually fix anything we know of, do we really need the fix? Honestly I'm cool either way, it just seemed a little odd doing that one off for popups here.
Assignee | ||
Comment 97•15 years ago
|
||
The reason I noticed this bug was because the viewmanager set the size of a popup window based on the dimensions of its view, then later it checked if the window had the right size based on the view dimensions, found it did not (when it really did) and called window->Resize again. I didn't see anything visible that was affected but that just seems wrong to have happening. Who knows it might fix some issue some one sees, or it might become important in the future.
![]() |
||
Comment 98•15 years ago
|
||
Comment on attachment 474244 [details] [diff] [review]
Part 1. Make nsWindow::GetBounds return in screen coordinates for popups (checked in)
Ok, sounds good. Sorry for the long delay on this.
Attachment #474244 -
Flags: review?(jmathies) → review+
Assignee | ||
Comment 99•15 years ago
|
||
Thanks Jim.
I don't think this needs to land before FF4 ships. I'll land it after we branch.
Whiteboard: [needs review] [Input][viewmanagerlink] → [Input][viewmanagerlink][waiting for 2.0 to branch to land]
Assignee | ||
Updated•14 years ago
|
Keywords: checkin-needed
Whiteboard: [Input][viewmanagerlink][waiting for 2.0 to branch to land] → [Input][viewmanagerlink][part1 needs landing]
![]() |
||
Comment 100•14 years ago
|
||
Timothy, do you want to land this or should I try to push it to cedar? If the latter, is it just the last part1 attachment that needs landing?
Assignee | ||
Comment 101•14 years ago
|
||
Yes, just part 1 needs pushing, its been through try many times and should be fine. If someone wants to land this that would be great.
Comment 102•14 years ago
|
||
Part 1 landed on cedar: http://hg.mozilla.org/projects/cedar/rev/945c1c37b620
Keywords: checkin-needed
Whiteboard: [Input][viewmanagerlink][part1 needs landing] → [Input][viewmanagerlink][part1 fixed-on-cedar]
![]() |
||
Updated•14 years ago
|
Whiteboard: [Input][viewmanagerlink][part1 fixed-on-cedar] → [Input][viewmanagerlink][part1 fixed-in-cedar]
Comment 103•14 years ago
|
||
Part 1 landed on m-c: http://hg.mozilla.org/mozilla-central/rev/2a8d41b42688
No longer depends on: post2.0
Whiteboard: [Input][viewmanagerlink][part1 fixed-in-cedar] → [Input][viewmanagerlink]
Target Milestone: --- → mozilla2.2
Updated•14 years ago
|
Attachment #474244 -
Attachment description: Part 1. Make nsWindow::GetBounds return in screen coordinates for popups. → Part 1. Make nsWindow::GetBounds return in screen coordinates for popups (checked in)
Assignee | ||
Comment 104•14 years ago
|
||
Part 2 landed ages ago, so we are all done here! Thanks!
Status: REOPENED → RESOLVED
Closed: 15 years ago → 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•