This allows us to open the context menu directly from webconsole.html when it's
running as a top level window. Ultimately, I'd like to not have to use special
handling in the console - all top-level windows should get the edit menu working
automatically for HTML inputs - but this lets us prove it out as a first consumer.
MozReview-Commit-ID: BYisQDtXWe4
--HG--
extra : rebase_source : 8000147713000a30af48f1da17d50356a4cd4a04
Create a popugroup element to setup the context menu behind the scenes.
Create all the menu related elements with the XUL namespace.
MozReview-Commit-ID: DI24aNHHFON
Signed-off-by: Brendan Dahl <brendan.dahl@gmail.com>
--HG--
extra : rebase_source : cd2444bd8ce24e89c8aa6b78ecd203e41156a7fe
In a couple of places in DevTools we read back the value of the
"devtools.toolbox.zoomValue" pref and take that to be the zoom value. However,
at certain zoom levels these two can differ: the pref value representing the
ideal zoom and currentZoom giving the actual zoom value in use.
This patch makes us use the actual zoom value in the two places where this
occurs.
Unfortunately, we cannot easily adjust the browser_html_tooltip_zoom.js test for
this since it uses a separate XUL document that does not take into account the
pref value---as a result that test directly sets the currentZoom on the separate
doc and hence this problem won't occur.
Instead, this patch adjusts the browser_toolbox_zoom_popup.js test since the
toolbox menu positioning uses the same problematic pattern so we can reproduce
the bug in the browser_toolbox_zoom_popup.js. (This patch fixes both
occurances of this pattern.)
At least locally browser_toolbox_zoom_popup.js passes for me with a zoom of 1.5
but fails with a zoom of 1.4. Similarly in my testing of HTMLTooltip, zoom
values such as 1.2 and 1.4 often show significant misalignment whilst a zoom of
1.3 or 1.5 is fine.
With the code changes in this patch, the test passes with any given zoom factor.
(This patch also incidentally replaced isNaN with the more robust Number.isNaN.)
MozReview-Commit-ID: JmlRoidARVp
--HG--
extra : rebase_source : 39370089e38c473987c9bfb1a4ba582cc781db1b
Create a popugroup element to setup the context menu behind the scenes.
Create all the menu related elements with the XUL namespace.
MozReview-Commit-ID: DI24aNHHFON
Signed-off-by: Brendan Dahl <brendan.dahl@gmail.com>
--HG--
extra : rebase_source : 4f0863ec40cdb33be577671ee7f130b125101a74
The openPopupAtScreen() use the zoomed css coordinate value as position value,
devtools's caller of this function use css pixel value without zoom. So position
of popup will missaligned if zooming out/in the devtool panel.
MozReview-Commit-ID: 4vvEssO41bO
--HG--
extra : rebase_source : 6bb8d7288590f3d85bfef362ecda9fc823675d7b
Popup manager will eat click event when clicking outside of popup only if macOS
and Linux. This patch will add consumeoutesideclicks attribute to this popup in
order to prevent to react click event listener of a button which accessing to
this popup on all platform.
MozReview-Commit-ID: Sv3Hv9Olhn
--HG--
extra : rebase_source : 85bad58439dd9514acc6aac4977799f102777026