Add-on popups are tiny and unusable with apz.allow_zooming=true
Categories
(Core :: Panning and Zooming, defect, P3)
Tracking
()
People
(Reporter: yoasif, Assigned: botond)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
STR:
- Install uBlock Origin
- set apz.allow_zooming=true
- restart Firefox
- click uBlock Origin icon in toolbar
What happens:
The popup is tiny and unusuable.
Expected result:
Popup should work like when apz.allow_zooming=false.
This has been an issue since at least version 57, based on a quick mozregression check -- at least on my Ubuntu Eoan machine.
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Interestingly, if the add-on icon is moved into the overflow menu, the popup will then display properly. FF 68.0.1 on macOS 10.14.5.
Description of the bug:
When apz.allow_zooming
is true
in about:config
, the html body fails to display the Add-on.
Versions of Firefox tested:
- Firefox Developer Edition 69.0b10 (64-bit)
- Firefox Stable 68.0.1 (64-bit)
Workarounds:
- setting
apz.allow_zooming
back tofalse
restores previous functionality - When pinned to overflow menu, the exrension's DOM elements render as expected
Comment 8•5 years ago
|
||
Botond, do you have any idea what the cause of this might be?
Assignee | ||
Comment 9•5 years ago
|
||
I've spent several hours debugging this today, but haven't gotten very far.
I've traced the issue as far as the width and height of the resolved styles of popup's nsSubDocumentFrame
being zero. What I'd like to do next is look at the corresponding <iframe> element in the Browser Toolbox and see where its resolved width and height are coming from in the Inspector, but it doesn't look like you can actually look at popup content in the Browser Toolbox (trying to interact with the toolbox causes the popup to close).
Assignee | ||
Comment 10•5 years ago
|
||
I was able to trace the issue further, to nsDocumentViewer::GetContentSizeInternal()
returning an empty size with desktop zooming enabled.
That in turn is due to this branch being taken in PresShell::ResizeReflow()
. We early-exit here and never get to ResizeReflowIgnoreOverride
, and therefore never give the popup's content document a chance to tell us the size it wants.
Conceptually, we are trying to give the popup document "as much space as it needs", and so ask it to compute its size without a viewport size as a starting point. However, with desktop zooming we use MobileViewportManager's sizing logic which requires a viewport size as a starting point.
Assignee | ||
Comment 11•5 years ago
•
|
||
While we could try to tweak MVM's sizing logic, I think the simpler thing to do here is not to use MVM for the popup's content document. After all, we're not going to allow zooming the popup's content, at least not for now.
Assignee | ||
Comment 12•5 years ago
|
||
Assignee | ||
Comment 13•5 years ago
|
||
Assignee | ||
Comment 14•5 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #13)
Somehow, I'm managing to leak the world with these patches...
Assignee | ||
Comment 15•5 years ago
|
||
Oh, I'm using an API that expects to be used with getter_AddRefs
.
Assignee | ||
Comment 16•5 years ago
|
||
Comment 17•5 years ago
|
||
Comment 18•5 years ago
|
||
bugherder |
Comment 19•5 years ago
|
||
I still see this problem on Mac with 20191022094606 which includes this fix.
Updated•5 years ago
|
Assignee | ||
Comment 20•5 years ago
|
||
Hmm. The fix was broken either during the process of fixing the leaks, or during the subsequent rebase.
Assignee | ||
Comment 21•5 years ago
|
||
GetNearestWidget() requires the frame tree to have been constructed, which
may not be the case at the case UseMobileViewportManager() is called.
Updated•5 years ago
|
Comment 22•5 years ago
|
||
Comment 24•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 29•5 years ago
|
||
Confirmed issue with 69.0a1 (2019-06-23) on Windows 10.
Fix verified with 72.0b5 on Windows 10, macOS 10.15, Ubuntu 18.04
Description
•