Last Comment Bug 985947 - [10.9] Popups can shrink when switching to hidpi mode
: [10.9] Popups can shrink when switching to hidpi mode
Status: NEW
[STR in comment #29][tpi:+]
:
Product: Core
Classification: Components
Component: Widget: Cocoa (show other bugs)
: unspecified
: x86 Mac OS X
P2 normal with 8 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Markus Stange [:mstange]
Mentors:
: 1008103 1058711 (view as bug list)
Depends on:
Blocks: 968838
  Show dependency treegraph
 
Reported: 2014-03-20 06:56 PDT by Mike Hoye [:mhoye]
Modified: 2016-06-01 11:29 PDT (History)
28 users (show)
mmucci: firefox‑backlog-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Screenshot of bug (82.73 KB, image/jpeg)
2014-03-20 07:11 PDT, Jared Wein [:jaws] (please needinfo? me)
no flags Details
lldb all-thread stack trace (73.58 KB, text/plain)
2014-04-17 09:47 PDT, Steven Michaud [:smichaud] (Retired)
no flags Details
Debug patch used to get stack trace (917 bytes, patch)
2014-04-17 09:51 PDT, Steven Michaud [:smichaud] (Retired)
no flags Details | Diff | Splinter Review
Screen Shot 2014-05-09 at 09.33.04.png (14.01 KB, image/png)
2014-06-18 02:57 PDT, Ronan Crowley
no flags Details
Screen Shot 2014-05-09 at 09.38.43.png (14.23 KB, image/png)
2014-06-18 02:57 PDT, Ronan Crowley
no flags Details

Description User image Mike Hoye [:mhoye] 2014-03-20 06:56:09 PDT
See here: http://imgur.com/cezaqiv

The pancake menu appears, at some point after a period of use, decide to draw itself half-sized. I'm on a HiDPI display - Retina MBP.

Doesn't seem to be related to the known bug around E10s and HiDPI displays: https://bugzilla.mozilla.org/show_bug.cgi?id=978913  (Or at least, I can't duplicate it in the same way)

About:support tells me this about graphics:

Device ID	0x fd5
GPU Accelerated Windows	1/1 OpenGL (OMTC)
Vendor ID	0x10de
WebGL Renderer	NVIDIA Corporation -- NVIDIA GeForce GT 650M OpenGL Engine
windowLayerManagerRemote	true
AzureCanvasBackend	quartz
AzureContentBackend	quartz
AzureFallbackCanvasBackend	none
AzureSkiaAccelerated	0


browser.UICustomization.State is set to:

{"placements":{"PanelUI-contents":["search-container","zoom-controls","new-window-button","save-page-button","print-button","history-panelmenu","fullscreen-button","find-button","preferences-button","add-ons-button","developer-button"],"addon-bar":["addonbar-closebutton","status-bar"],"PersonalToolbar":["personal-bookmarks"],"nav-bar":["urlbar-container","webrtc-status-button","bookmarks-menu-button","downloads-button","privatebrowsing-button","home-button","social-share-button","abp-toolbarbutton","greasemonkey-tbb"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button","tabs-closebutton"]},"seen":["abp-toolbarbutton"],"dirtyAreaCache":["PersonalToolbar","nav-bar","TabsToolbar","PanelUI-contents","addon-bar"],"newElementCount":0}
Comment 1 User image Mike Hoye [:mhoye] 2014-03-20 06:57:25 PDT
I should add that I've seen this on both Aurora and Nightly, as of March 20th.
Comment 2 User image Mike Conley (:mconley) 2014-03-20 06:58:12 PDT
Oh, can you also provide a list of the add-ons you have enabled?
Comment 3 User image Mike Conley (:mconley) 2014-03-20 07:00:00 PDT
Putting this at a P3 pending further analysis.
Comment 4 User image Mike Hoye [:mhoye] 2014-03-20 07:00:49 PDT
Adblock, Flashblock, GreaseMonkey and Linky. Plugins are Flash and Quicktime only.
Comment 5 User image Jared Wein [:jaws] (please needinfo? me) 2014-03-20 07:10:46 PDT
Maybe this is coming from a bug in the _scrollWidth calculations within panelUI.js?
Comment 6 User image Jared Wein [:jaws] (please needinfo? me) 2014-03-20 07:11:15 PDT
Created attachment 8394144 [details]
Screenshot of bug
Comment 7 User image Mike Conley (:mconley) 2014-03-20 08:20:56 PDT
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #5)
> Maybe this is coming from a bug in the _scrollWidth calculations within
> panelUI.js?

That's possible, yes. I'll be in the office later today, and if mhoye is in there, I'll do some poking about with the inspector to see wtf is going on.
Comment 8 User image Markus Stange [:mstange] 2014-03-20 11:49:55 PDT
Do you have an external screen connected?
Comment 9 User image Mike Conley (:mconley) 2014-03-21 08:11:45 PDT
He does, yes. And he's frequently connecting / disconnecting both the monitor and a USB mouse / keyboard throughout the day.

He's also running 10.9.

I'm waiting for him to hit it again, and then I'm going to:

1) Get a brain dump from him to recall his last 5 minutes of activity to see if we can get some STR
2) Use inspector to try to determine where these dimensions are getting set, which might help narrow down how this is happening.
Comment 10 User image Mike Hoye [:mhoye] 2014-03-21 12:17:51 PDT
HAHA GOT YOU.

OK, so: steps to reproduce:

- Have a Retina Pro with a non-HiDPI screen attached. 
- Open a new Firefox window, and put it on the non-retina screen, look at the pancake menu. All is normal, close it. 
- Pull the monitor cable.
- Find that Firefox window on the single screen, and look at the pancake menu. It's now half-sized. 

Gotcha, bug.
Comment 11 User image Mike Conley (:mconley) 2014-03-21 12:26:55 PDT
Does comment 10 help clear up what might be happening here, Markus?
Comment 12 User image Mike Conley (:mconley) 2014-03-24 07:39:30 PDT
I'm going to be doing some investigation on this today.
Comment 13 User image Mike Conley (:mconley) 2014-03-24 08:37:55 PDT
(In reply to Mike Hoye [:mhoye] from comment #10)
> HAHA GOT YOU.
> 
> OK, so: steps to reproduce:
> 
> - Have a Retina Pro with a non-HiDPI screen attached. 
> - Open a new Firefox window, and put it on the non-retina screen, look at
> the pancake menu. All is normal, close it. 
> - Pull the monitor cable.
> - Find that Firefox window on the single screen, and look at the pancake
> menu. It's now half-sized. 
> 
> Gotcha, bug.

These STR do not give me the bug on 10.8. I'll see if I can test on a different 10.8 laptop to confirm.
Comment 14 User image Mike Conley (:mconley) 2014-03-24 10:28:50 PDT
So, after some testing, I am only ever able to reproduce this on 10.9.

It seems that there's a height and width attribute being set on the panel which is constraining its size, and I think it's from nsXULPopupManager::PopupResized().

This whole thing seems really familiar, and that's because we've been here before with something similar: https://bugzilla.mozilla.org/show_bug.cgi?id=892994#c5.

Since this is Mavericks only, and involves multiple displays...I'm downgrading the priority on this one.
Comment 15 User image :Gijs 2014-03-24 10:33:47 PDT
These symptoms actually sound like bug 968838, sans crash.
Comment 16 User image Mike Conley (:mconley) 2014-03-25 13:12:56 PDT
(In reply to :Gijs Kruitbosch from comment #15)
> These symptoms actually sound like bug 968838, sans crash.

True, though applying mstange's patch from that bug didn't appear to help. :/
Comment 17 User image Mike Conley (:mconley) 2014-03-25 15:06:12 PDT
I'm afraid that I'm unlikely to make much more progress here, since I don't have Mavericks (and will not be updating until after Australis ships). The loaner I was using to debug this had to be returned.

Anyone else with Mavericks and an external display want a crack at this?
Comment 18 User image Mike Hoye [:mhoye] 2014-04-15 11:55:44 PDT
For what it's worth, I can demonstrate that this affects other display elements - right-click menus, other stuff - repeatedly and easily.
Comment 19 User image Mike Conley (:mconley) 2014-04-15 11:57:09 PDT
Right - this shouldn't even be on the Australis tracker - this is very much a platform bug.
Comment 20 User image Steven Michaud [:smichaud] (Retired) 2014-04-15 13:51:47 PDT
I don't see this testing with today's m-c nightly on OS X 10.9.2, using the STR from comment #10.
Comment 21 User image Mike Conley (:mconley) 2014-04-15 13:57:52 PDT
(In reply to Steven Michaud from comment #20)
> I don't see this testing with today's m-c nightly on OS X 10.9.2, using the
> STR from comment #10.

Hm - I wonder if we're missing a key step here - can you try using the "Spaces"-per-screen feature of OS X, and create multiples for each? Then, connect the external monitor, and put Firefox onto one of the spaces that your HiDPI display is _not_ on.

_Then_ do the disconnect. You'll need to swap over on your HiDPI display device to the space where Firefox is. _Then_ try opening a panel.

Can you reproduce with that additional step?
Comment 22 User image Steven Michaud [:smichaud] (Retired) 2014-04-15 14:03:29 PDT
> "Spaces"-per-screen feature of OS X

I don't know what this is.  Please describe it in more detail.
Comment 23 User image Steven Michaud [:smichaud] (Retired) 2014-04-15 14:13:57 PDT
>> "Spaces"-per-screen feature of OS X
> 
> I don't know what this is.  Please describe it in more detail.

I think I've now figured it out.  Your suggestion didn't "work" -- I didn't see the bug.

I didn't see it even if I moved the menu bar to the external (non-HiDPI) display before disconnecting it.

I'd like to see Mike Hoye retest with today's m-c nightly.  Something might have changed.
Comment 24 User image Steven Michaud [:smichaud] (Retired) 2014-04-15 14:15:23 PDT
Mike Conley, can *you* still reproduce this bug with today's m-c nightly?
Comment 25 User image Mike Conley (:mconley) 2014-04-15 14:31:37 PDT
(In reply to Steven Michaud from comment #24)
> Mike Conley, can *you* still reproduce this bug with today's m-c nightly?

Unfortunately, I don't have Mavericks so I cannot reproduce. :/
Comment 26 User image Mike Hoye [:mhoye] 2014-04-16 07:20:19 PDT
I can still replicate this on an up-to-date nightly using the STR given.
Comment 27 User image Mike Conley (:mconley) 2014-04-16 12:46:22 PDT
Here's a video of us reproducing with last night's Nightly: http://www.youtube.com/watch?v=4jjk372TITI
Comment 28 User image Steven Michaud [:smichaud] (Retired) 2014-04-16 13:14:29 PDT
The STR from comment #10 are wrong!  Or at least seriously ambiguous.

I can see from the video that I read them differently from what you intended.

I'll try again today or tomorrow.
Comment 29 User image Steven Michaud [:smichaud] (Retired) 2014-04-16 14:35:28 PDT
Yes, I can now reproduce this bug.  Here's better STR:

1) On a Retina Mac running OS X 10.9.2 and with a non-Retina display attached, run Firefox (with Australis) and move the browser window to the external display.
2) Click once on the "hamburger" icon on the right end of the Toolbar.  Notice that it displays correctly.  Then click again to close it.
3) Disconnect the external monitor, so that Firefox moves to the built-in monitor.
4) Click again on the "hamburger" icon.  Notice that it displays incorrectly.

The bug doesn't happen if you just drag the Firefox window back to the Retina display -- only if you disconnect the display.  This, together with the fact that this bug only happens on OS X 10.9, leads me to think this is probably some kind of Apple bug.

I still can't reproduce this with other kinds of popup windows (like context menus).
Comment 30 User image Steven Michaud [:smichaud] (Retired) 2014-04-16 14:36:28 PDT
How important is this?  I frankly think the answer is "not very".

So I'll put it on my list.  But I'm not sure when I'll be able to get to it.
Comment 31 User image Steven Michaud [:smichaud] (Retired) 2014-04-16 14:48:15 PDT
> I still can't reproduce this with other kinds of popup windows (like context menus).

With tooltips, the first time I hover over one in step 4 it appears far to the right of its correct location -- though otherwise it's displayed correctly.
Comment 32 User image Steven Michaud [:smichaud] (Retired) 2014-04-16 14:55:27 PDT
This is a recent regression.  I'm looking for the regression range.
Comment 33 User image Mike Conley (:mconley) 2014-04-16 14:57:24 PDT
Is bug 892994 recent enough? I worked on that one a while back for shrinking panels in Cocoa...
Comment 34 User image Steven Michaud [:smichaud] (Retired) 2014-04-16 15:12:54 PDT
Here's the regression range:

firefox-2014-03-13-03-02-02-mozilla-central
firefox-2014-03-14-03-02-02-mozilla-central

http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=46041cc216fd&tochange=f073b3d6db1f

> Is bug 892994 recent enough?

It's *way* too old :-)
Comment 35 User image Steven Michaud [:smichaud] (Retired) 2014-04-16 15:17:18 PDT
Nothing stands out.  I guess I'll have to hg bisect.
Comment 36 User image Mike Conley (:mconley) 2014-04-16 15:18:31 PDT
Bug 968838 tops my list of suspects in that range...
Comment 37 User image Steven Michaud [:smichaud] (Retired) 2014-04-16 15:54:38 PDT
> Bug 968838 tops my list of suspects in that range...

You're right.  That's the trigger.

Which means we've got some seriously nasty behavior to fix in Gecko :-(

Or at least to work around in Cocoa widgets.
Comment 38 User image Steven Michaud [:smichaud] (Retired) 2014-04-16 15:59:41 PDT
For what it's worth, this bug effects the current FF 29 beta.

But it's probably too late to try to fix it there.
Comment 39 User image Steven Michaud [:smichaud] (Retired) 2014-04-16 16:06:57 PDT
The specific trigger is the part 2 patch for bug 968838:

 Bug 968838 - Refuse reentrant calls to nsCocoaWindow::DoResize. r=smichaud
author	Markus Stange <mstange@themasta.com>
	Thu Mar 13 13:21:56 2014 +0100 (at Thu Mar 13 13:21:56 2014 +0100)
changeset 173408	0daba7f5bcf7

http://hg.mozilla.org/mozilla-central/rev/0daba7f5bcf7
Comment 40 User image Timothy Nikkel (:tnikkel) 2014-04-16 17:04:02 PDT
A stack of when it re-enters would be useful I think.
Comment 41 User image Steven Michaud [:smichaud] (Retired) 2014-04-17 09:47:44 PDT
Created attachment 8408365 [details]
lldb all-thread stack trace

I made this using a debugging patch and the STR from comment #29.
Comment 42 User image Steven Michaud [:smichaud] (Retired) 2014-04-17 09:51:48 PDT
Created attachment 8408370 [details] [diff] [review]
Debug patch used to get stack trace

To make sure I broke (in lldb) at exactly the right point, I did "kill -28 firefoxpid" from a Terminal prompt just before I performed the last step of the STR.
Comment 43 User image Markus Stange [:mstange] 2014-04-22 07:30:15 PDT
I'm curious, does the part 1 patch from bug 968838 fix this?
Comment 44 User image Steven Michaud [:smichaud] (Retired) 2014-04-22 08:58:56 PDT
> I'm curious, does the part 1 patch from bug 968838 fix this?

I thought part 1 had already landed, but apparently it hasn't.

I'll try it and see.
Comment 45 User image :Gijs 2014-05-09 04:00:03 PDT
*** Bug 1008103 has been marked as a duplicate of this bug. ***
Comment 46 User image Mike Conley (:mconley) 2014-06-17 08:53:47 PDT
Hey Marco - just curious to know why this has been backlog minused? I do think we'll want to address that at some point, especially as more and more folks start using 10.9 and up.
Comment 47 User image Marco Mucci [:MarcoM] 2014-06-17 08:55:47 PDT
(In reply to Mike Conley (:mconley) from comment #46)
> Hey Marco - just curious to know why this has been backlog minused? I do
> think we'll want to address that at some point, especially as more and more
> folks start using 10.9 and up.

Hi Mike, sorry I forgot to add a comment.  At the estimation meeting this morning the team reviewed this bug and decided it should be removed from the Backlog.
Comment 48 User image Mike Conley (:mconley) 2014-06-17 13:42:30 PDT
(In reply to Marco Mucci [:MarcoM] from comment #47)
> (In reply to Mike Conley (:mconley) from comment #46)
> > Hey Marco - just curious to know why this has been backlog minused? I do
> > think we'll want to address that at some point, especially as more and more
> > folks start using 10.9 and up.
> 
> Hi Mike, sorry I forgot to add a comment.  At the estimation meeting this
> morning the team reviewed this bug and decided it should be removed from the
> Backlog.

Ok, the explains what happened - but _why_ did the team decide to remove this from the backlog? Can you or any part of the team that decided please include a comment in here about the reasoning behind its removal?
Comment 49 User image Marco Mucci [:MarcoM] 2014-06-17 14:53:51 PDT
(In reply to Mike Conley (:mconley) from comment #48)
> (In reply to Marco Mucci [:MarcoM] from comment #47)
> > (In reply to Mike Conley (:mconley) from comment #46)
> > > Hey Marco - just curious to know why this has been backlog minused? I do
> > > think we'll want to address that at some point, especially as more and more
> > > folks start using 10.9 and up.
> > 
> > Hi Mike, sorry I forgot to add a comment.  At the estimation meeting this
> > morning the team reviewed this bug and decided it should be removed from the
> > Backlog.
> 
> Ok, the explains what happened - but _why_ did the team decide to remove
> this from the backlog? Can you or any part of the team that decided please
> include a comment in here about the reasoning behind its removal?

I added a 'needinfo' to Gavin as I couldn't attend today's meeting.
Comment 50 User image :Gavin Sharp [email: gavin@gavinsharp.com] 2014-06-17 14:55:11 PDT
My bad for not commenting during triage. Given that this is a Widget: Cocoa bug, it didn't seem suitable for our backlog. Should it be reclassified?
Comment 51 User image Mike Conley (:mconley) 2014-06-17 16:26:54 PDT
OK, yes, I guess that makes sense. Up until now, I've been treating firefox-backlog+ as "front-end bugs affecting Firefox users", with no regard to where the underlying problem lay. I suppose it does make more sense to add the proviso that it's also a bug that would realistically be part of the front-end team's workload.

In this case, yes, the underlying problem is indeed within Widget: Cocoa (or thereabouts), and I think it's more likely that our Cocoa hackers will attack it than the front-end team. So I think we're good here.

Thanks for clearing that up, gavin and MarcoM!
Comment 52 User image Ronan Crowley 2014-06-18 02:57:19 PDT
Created attachment 8441989 [details]
Screen Shot 2014-05-09 at 09.33.04.png
Comment 53 User image Ronan Crowley 2014-06-18 02:57:42 PDT
Created attachment 8441990 [details]
Screen Shot 2014-05-09 at 09.38.43.png
Comment 54 User image Ronan Crowley 2014-06-18 03:00:23 PDT
Added 2 further screenshots showing this Bug and the annoyance its causing.
Comment 55 User image :Gijs 2014-08-26 10:14:44 PDT
*** Bug 1058711 has been marked as a duplicate of this bug. ***
Comment 56 User image Daniel Maher [:phrawzty] 2014-09-04 08:37:42 PDT
I confirm that this bug exists on Aurora and yesterday's Nightly, but I couldn't repro on Release.
Comment 57 User image André Reinald 2014-09-04 09:56:38 PDT
I use Release (FF 32) and I often have this pb. The STR work perfectly. Maybe Dan and me have to spot if something else differs between our configurations.
Comment 58 User image Mike Hoye [:mhoye] 2014-10-27 12:31:37 PDT
I can no longer reproduce this on 10.10, for what it's worth.
Comment 59 User image Brandon Johnson 2014-11-17 05:57:21 PST
I can reproduce this on release FF33.0.2 running Mac 10.9.4. Are you saying the OS upgrade fixes this Mike?
Comment 60 User image Mike Hoye [:mhoye] 2014-11-17 06:47:23 PST
I'm saying I can no longer reproduce this in 10.10 with the STR given, and haven't seen it since upgrading.
Comment 61 User image Jacopo Gobbi 2015-06-05 02:16:23 PDT
This issue is removing me the possibility to make visible my bookmarks bar as shown in the photo.
It happens in Firefox Developer Edition 40.0a2 (2015-06-04) and in Firefox 38.0.5 on Mac OS X 10.10.3. Please if you could review it and help me it would be helpful. When not in full screen the popup is reduced size just if my addons are enabled (Search Preview, No Close Buttons), so this is a very weird behaviour and seems difficult for me to find another type of solution.
Here's a screenshot: http://i.imgur.com/D2dUJMM.png (if going on the top arrow it will be shown bottom arrow and top arrow looping forever...)
Comment 62 User image Charlie Herron 2015-12-05 14:05:48 PST
Still no love for this bug? OS 10.9 is still supported by Apple, and I have no intention of upgrading until support ends.

Note You need to log in before you can comment on or make changes to this bug.