Closed Bug 588403 Opened 15 years ago Closed 14 years ago

Auto-scroll can cause rendering artifacts

Categories

(Core :: Layout, defect)

x86
Windows 7
defect
Not set
normal

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.
Blocks: 130078
I first started seeing this after retained layers landed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
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.
(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.
Should be fixed by bug 588407.
Status: NEW → RESOLVED
Closed: 15 years ago
Depends on: 588407
Resolution: --- → FIXED
Weird. It definitely was fixed, but now is back.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
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.
Latest try server build still has the problem.
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.
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.
Attached image screenshot
Opening the bookmarks sidebar also does similar things. Not sure if these would all have the same fix.
(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: --- → ?
(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
(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
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?
Attached image screenshot
sidebar issue happened, but different rendering. [STR] Open sidebar
Filed bug 591834 for the sidebar issue. Is there any reason to think they are the same issue?
It looks like the sidebar issue would be looked at in bug 591671, no?
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.
I can confirm that I'm having a similar issue on both WinXP 32bit and Win7 64bit
Here's a 20second video showing the exact issue I've been having. http://tinyogg.com/files/UtNnB.ogv
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.
The layer tree's for both the autoscroll's widget and the main widget look okay though.
blocking2.0: ? → final+
Keywords: regression
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.
I think there is some problems with glass window or personas implementation of glass window Better to check this, why it is unstable
After I updated to FF4 beta5 I'm having this bug on both my computers with Windows XP.
It happens to me with latest nightly build. (20100908) Btw. I'm talking about middle click. OS is Windows 7.
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.
No longer depends on: 588407
Assignee: roc → tnikkel
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.
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.
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
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.
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.
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.
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)
(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?
There are still plugin widgets at least.
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?
On Windows. I didn't actually look at the childlist pointers to verify, so I can double check if needed.
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.
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.
(the plan is that GetParent() should use mParent eventually (bug 569583))
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.
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...
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.
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.
This bug also occurs on Windows XP, although this bug is filed under Windows 7.
Are you still seeing this bug? It should be fixed in 2010-09-12 nightlies.
It's fixed for my Win7 x64. I think that XP is fixed too.
running 4.0b6 - still have the problem.
The fix will be in b7.
fixed in sep 15th nightly build.
Jim, you may have missed comment 53 in reply to your review comment.
(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?
(A test might be good too!)
(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.
Bug 598583 is a duplicate of this, but I can't mark it as one. Would someone else be able to please?
Whiteboard: [needs review] → [needs review] [Input]
@Aakash Desai - it is fixed in incoming Beta 7 :)
(In reply to comment #83) > @Aakash Desai - it is fixed in incoming Beta 7 :) Not completely as per comment 53.
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.
(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.
Would looking at this test help? toolkit/content/tests/browser/browser_bug295977_autoscroll_overflow.js
That test checks that autoscrolling actually scrolls. We would need to test that the correct things get drawn to the screen.
(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?
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]
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]
(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.
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 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+
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]
Depends on: post2.0
Keywords: checkin-needed
Whiteboard: [Input][viewmanagerlink][waiting for 2.0 to branch to land] → [Input][viewmanagerlink][part1 needs landing]
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?
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.
Keywords: checkin-needed
Whiteboard: [Input][viewmanagerlink][part1 needs landing] → [Input][viewmanagerlink][part1 fixed-on-cedar]
Whiteboard: [Input][viewmanagerlink][part1 fixed-on-cedar] → [Input][viewmanagerlink][part1 fixed-in-cedar]
No longer depends on: post2.0
Whiteboard: [Input][viewmanagerlink][part1 fixed-in-cedar] → [Input][viewmanagerlink]
Target Milestone: --- → mozilla2.2
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)
Part 2 landed ages ago, so we are all done here! Thanks!
Status: REOPENED → RESOLVED
Closed: 15 years ago14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: