Weird scrollbar artifacts with Lion scrollbars enabled and USB mouse plugged in

VERIFIED FIXED

Status

()

defect
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: mconley, Assigned: spohl)

Tracking

(Blocks 1 bug, {regression})

unspecified
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox21 unaffected, firefox22 unaffected, firefox23+ wontfix, firefox24+ fixed, firefox25 verified, firefox-esr17 unaffected)

Details

(Whiteboard: [lion-scrollbars+])

Attachments

(5 attachments, 1 obsolete attachment)

STR:

1) Get a UX build after the patch in bug 870574 lands (you can get a UX Nightly from http://people.mozilla.org/~jwein/ux-nightly/)
2) Make the window relatively small
3) Enter Customization Mode by clicking on the menu button (far right on the nav bar) and choose "Customize"

At least for me, I get these scrollbar artifacts in the customization palette. And the scrollbar doesn't appear to let me scroll through the overflowing palette.

I'm on OS X 10.8.3. I have graphics acceleration enabled, and a second monitor. I also have a USB mouse plugged in (I think that's relevant because I believe OSX shows the scrollbar all the time if it detects a mouse).
Does this also happen with nightly builds?
I should note that the problem goes away when I go into System Preferences > General, and choose to always have scrollbars.
(In reply to Robert Strong [:rstrong] (do not email) from comment #1)
> Does this also happen with nightly builds?

I'll give a Nightly a try and report back.
(In reply to Mike Conley (:mconley) from comment #0)
> 
> I'm on OS X 10.8.3. I have graphics acceleration enabled, and a second
> monitor. I also have a USB mouse plugged in (I think that's relevant because
> I believe OSX shows the scrollbar all the time if it detects a mouse).

The fact that you have an external mouse connected might indicate that this is a duplicate of bug 868498. Changes to the system preferences don't immediately propagate to the browser's scrollbars yet and can cause unexpected behavior.

If the problem only occurs in the UX branch, maybe the latest patches for the lion-style scrollbars didn't land there yet (bug 636564)?
I'm unable to reproduce this using a Nightly, but this is because Nightly's not using our new fancy customization palette yet. :) I tried a few other windows and dialogs, and forced scrollbars on an overflowable via DOM Inspector, but no dice.

Bug 636564 exists in the UX builds - it's pretty up to date.
Ah, my USB mouse appears to be the trigger. Removing it causes the artifact to disappear in UX Nightly.
Summary: Weird scrollbar artifacts when Lion scrollbars enabled → Weird scrollbar artifacts when Lion scrollbars enabled and USB mouse plugged in
I can reproduce this on nightly and have been seeing this between a few days to just under a week now (don't recall exactly).
Whiteboard: [lion-scrollbars+]
Assignee: nobody → spohl.mozilla.bugs
Status: NEW → ASSIGNED
Running Nightly on a new profile.

STR (from video):
0) System Preferences > General > Show scroll bars set to Auto
1) Plug in mouse
2) Load http://www.youtube.com. Scrollbars are shown (as expected).
3) Unplug mouse. The scrollbars disappear from the sides of the document but a space appears above the content (presumably with the hidden scrollbars). The scrollbars do not appear upon scrolling with the trackpad as they should.
4) Plug a mouse back in. You can see that the area that appeared above the content now contains artifacts from the gutter. The scrollbars do not appear on the side of the document.

Expected result:
Scrollbars should appear and disappear depending on whether a trackpad or mouse is used. When scrollbars appear, they should be positioned at the right and/or bottom of the document.

Reproducible: Always

Not reproducible on Aurora for me.
Matt, this likely also affects Firefox 23. Can you verify that it can be reproduced there?
I did check that I can't reproduce the artifacts on 23:

(Quoting Matthew N. [:MattN] from comment #8)
> Not reproducible on Aurora for me.

The scrollbar doesn't auto-hide without a mouse on Aurora. I'm not sure what bug implemented that but it could be the cause.

Perhaps a follow-up not on 23 or some other bug caused this to regress?
Interesting and thanks for the info!
Summary: Weird scrollbar artifacts when Lion scrollbars enabled and USB mouse plugged in → Weird scrollbar artifacts with Lion scrollbars enabled and USB mouse plugged in
I'm able to consistently reproduce the scrollbar artifacts by following these steps:
1. Select "Show scroll bars: Automatically..." in system preferences.
2. Open Firefox.
3. Switch system preference to "Show scroll bars: Always".
4. Resize browser window.

The artifacts will appear in the top left corner of the page.

I'm concerned about the fact that we keep hitting one particular assertion twice (probably once for each scrollbar) when resizing. The assertion is:
WARNING: Someone passed native anonymous content directly into frame construction.  Stop doing that!
http://mxr.mozilla.org/mozilla-central/source/layout/base/nsCSSFrameConstructor.cpp#6049

After hitting these assertions the scrollbars don't display correctly anymore, even when switching system preferences again.

Markus, does this assertion seem familiar to you at all? Any idea what might be happening here?
Flags: needinfo?(mstange)
Duplicate of this bug: 887977
(In reply to Stephen Pohl [:spohl] from comment #12)
> Markus, does this assertion seem familiar to you at all? Any idea what might
> be happening here?

I figured out what is causing this. In nativescrollbars.css, this section applies to overlay scrollbars only:
@media all and (-moz-overlay-scrollbars) {
  scrollbar {
    position: relative;
    z-index: 2147483647;
  }
}
http://mxr.mozilla.org/mozilla-central/source/toolkit/themes/osx/global/nativescrollbars.css#20

When we switch between scrollbars these properties are still set on the scrollbar's content. This appears to be causing the assertions.

I'm finishing up a patch for bug 868498 that should fix this as well.
Flags: needinfo?(mstange)
Depends on: 868498
I was able to reproduce this problem in FF23 with the latest beta:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:23.0) Gecko/20100101 Firefox/23.0

This will be fixed by the patch for bug 868498 which is already tracking for FF23.
Duplicate of this bug: 890376
Now that bug 868498 has landed on m-c, this is fixed.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
The assertion fix from bug 868498 is being backed out due to regressions (bug 894931), so this bug will arise again. I'll use this bug to track progress on the assertion fix.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attaching roc's patch from bug 868498 comment 51. This patch works great for me, risk is limited to overlay scrollbars and therefore doesn't risk injections like the previous assertion fix (see bug 894931).
Attachment #777547 - Flags: review?(matt.woodrow)
Removes position:relative and z-index from nativescrollbars.css
Attachment #777548 - Flags: review?(roc)
XUL trees will need a similar fix as the one in comment 19 before we can call this bug fixed. The page info dialog is a good example (cmd+i and select Media tab).
(In reply to Stephen Pohl [:spohl] from comment #21)
> XUL trees will need a similar fix as the one in comment 19 before we can
> call this bug fixed. The page info dialog is a good example (cmd+i and
> select Media tab).

Can you just set position:relative on the scrollbars in tree.xml? That should be quite safe and hoist them above the tree body content.
Posted patch XUL tree fix (not working) (obsolete) — Splinter Review
Unless I'm doing this wrong, this doesn't display the scrollbars on top of content. They are visible for a split second while fading, but they aren't visible when the content is actively being scrolled (unexpected) or when the scrollbars are inactive (expected)...
Attachment #777566 - Flags: feedback?(roc)
You need to use style="position:relative; z-index:..."
Posted patch XUL tree fixSplinter Review
Indeed!
Attachment #777566 - Attachment is obsolete: true
Attachment #777566 - Flags: feedback?(roc)
Attachment #777569 - Flags: review?(roc)
Comment on attachment 777547 [details] [diff] [review]
Workaround for assertions by :roc

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 636564
User impact if declined: When connecting a mouse or external monitor, the scrollbars on OSX may no longer display correctly until the page is refreshed or the browser restarted.
Testing completed (on m-c, etc.): Tested locally.
Risk to taking this patch (and alternatives if risky): low (limited to overlay scrollbars)
String or IDL/UUID changes made by this patch: none
Attachment #777547 - Flags: approval-mozilla-beta?
Attachment #777547 - Flags: approval-mozilla-aurora?
Comment on attachment 777548 [details] [diff] [review]
Remove CSS rules

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 636564
User impact if declined: When connecting a mouse or external monitor, the scrollbars on OSX may no longer display correctly until the page is refreshed or the browser restarted.
Testing completed (on m-c, etc.): Tested locally.
Risk to taking this patch (and alternatives if risky): low (limited to overlay scrollbars)
String or IDL/UUID changes made by this patch: none
Attachment #777548 - Flags: approval-mozilla-beta?
Attachment #777548 - Flags: approval-mozilla-aurora?
Comment on attachment 777569 [details] [diff] [review]
XUL tree fix

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 636564
User impact if declined: When connecting a mouse or external monitor, the scrollbars on OSX may no longer display correctly until the page is refreshed or the browser restarted.
Testing completed (on m-c, etc.): Tested locally.
Risk to taking this patch (and alternatives if risky): low
String or IDL/UUID changes made by this patch: none
Attachment #777569 - Flags: approval-mozilla-beta?
Attachment #777569 - Flags: approval-mozilla-aurora?
Attachment #777547 - Flags: review?(matt.woodrow) → review+
Blocks: 895421
Closing this bug here per comment 29, since comment 30 isn't in beta and we may want to uplift the patches here to beta.
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Comment on attachment 777547 [details] [diff] [review]
Workaround for assertions by :roc

We're not taking these on beta because of disabling the overlay scrollbars but let's get this on Aurora.
Attachment #777547 - Flags: approval-mozilla-beta?
Attachment #777547 - Flags: approval-mozilla-beta-
Attachment #777547 - Flags: approval-mozilla-aurora?
Attachment #777547 - Flags: approval-mozilla-aurora+
Attachment #777548 - Flags: approval-mozilla-beta?
Attachment #777548 - Flags: approval-mozilla-beta-
Attachment #777548 - Flags: approval-mozilla-aurora?
Attachment #777548 - Flags: approval-mozilla-aurora+
Attachment #777569 - Flags: approval-mozilla-beta?
Attachment #777569 - Flags: approval-mozilla-beta-
Attachment #777569 - Flags: approval-mozilla-aurora?
Attachment #777569 - Flags: approval-mozilla-aurora+
Blocks: 896443
This should be fixed in 24 beta, right? Because I still have this issue...
(In reply to swrobel from comment #34)
> This should be fixed in 24 beta, right? Because I still have this issue...

Please make sure that you're running the latest beta [1]. If that doesn't fix the problem, please do this:
1. Close browser.
2. Disconnect USB mouse.
3. Open browser and navigate to page that reproduced this problem.
4. Connect USB mouse.
5. Resize browser window.

If these steps cause the artifacts, then we're looking at the same problem. Please tell us what OS you're on and if all pages (or only specific ones) reproduce this problem. If you're unable to reproduce the problem with the steps given above, please file a new bug and give precise STR for how to reproduce the issue. Thanks!

[1] http://www.mozilla.org/en-US/firefox/beta/
I have the same experience as Matthew N reported and screencasted here: https://bug870941.bugzilla.mozilla.org/attachment.cgi?id=754970

It doesn't require resizing the browser window to make the artifacts appear...

(In reply to Stephen Pohl [:spohl] from comment #35)
> (In reply to swrobel from comment #34)
> > This should be fixed in 24 beta, right? Because I still have this issue...
> 
> Please make sure that you're running the latest beta [1]. If that doesn't
> fix the problem, please do this:
> 1. Close browser.
> 2. Disconnect USB mouse.
> 3. Open browser and navigate to page that reproduced this problem.
> 4. Connect USB mouse.
> 5. Resize browser window.
> 
> If these steps cause the artifacts, then we're looking at the same problem.
> Please tell us what OS you're on and if all pages (or only specific ones)
> reproduce this problem. If you're unable to reproduce the problem with the
> steps given above, please file a new bug and give precise STR for how to
> reproduce the issue. Thanks!
> 
> [1] http://www.mozilla.org/en-US/firefox/beta/
(In reply to Stefan Wrobel from comment #36)
> I have the same experience as Matthew N reported

Stefan, could you please provide more detail? In particular, I'm interested in your OS and version, the specific URL you're seeing this problem on and what steps you're going through to make the problem appear. Thanks!
Interesting, on a hunch, I tested this with the stock theme and the issue doesn't occur. It only seems to happen with 3rd-party themes ... I would hope that this fix doesn't need to be integrated into every 3rd-party theme, though.

For reference, the theme I was using is mx4 development channel: https://addons.mozilla.org/en-US/firefox/addon/mx4/

System information:
Firefox 24.0beta7
MacOS 10.8.4
Retina Macbook Pro 13"
Thanks Stefan! I can reproduce the issue now. I'll investigate tomorrow and file a new bug as appropriate.
Blocks: 912686
I could not reproduce the initial issue on a mini Mac 10.8. Could anyone who reproduced the initial issue confirm this is fixed on Firefox 24 RC?
Flags: needinfo?
Mike, if you have any time to spear, could you please verify this is fixed on Firefox 25 beta?

Thanks.
Flags: needinfo? → needinfo?(mconley)
Yep, I can't seem to reproduce this issue on the latest beta. Thanks!
Status: RESOLVED → VERIFIED
Flags: needinfo?(mconley)
Thanks Mike!

Based on Comment 42, I'm setting the status for Firefox 25 to verified.
You need to log in before you can comment on or make changes to this bug.