Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().
This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.
Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".
GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.
nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().
The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).
Differential Revision: https://phabricator.services.mozilla.com/D160260
Implementations of nsIEmbeddingSiteWindow and nsIBaseWindow largely
overlap, and where they don't, the nsIEmbeddingSiteWindow implementation
of the otherwise shared interface is primarily stubbed out with the
exception of Get/SetDimensions().
This patch moves a reimplementation of Get/SetDimensions() from
nsIEmbeddingSiteWindow to nsIBaseWindow. The other methods of
nsIEmbeddingSiteWindow remain covered by nsIBaseWindow.
Get/SetDimensions() can be implemented as part of nsIWebBrowserChrome
where nsIBaseWindow is not necessary. This removes the need for
nsIEmbeddingSiteWindow.
Blur() has also been moved to nsIWebBrowserChrome, as only
nsContentTreeOwner has an actual implementation which we in theory also
want to call from BrowserChild/Parent, but the spec suggests to
"selectively or uniformly ignore calls".
GetVisibility() had an implementation in BrowserChild that pretended to
always be visible. Instead of providing an interface for that,
nsDocShell now handles the not implemented case for tree owners.
nsIEmbeddingSiteWindow::GetSiteWindow() used to call through to
nsIBaseWindow::GetParentNativeWindow().
The Get/SetDimensions() implementation has been replaced with a strongly
typed setter, which is now also used directly from nsGlobalWindowOuter
to avoid problems that come with autodetecting unchanged dimensions,
when the current dimensions are outdated (e.g. immediately reverting a
change can be ignored).
Differential Revision: https://phabricator.services.mozilla.com/D160260
This makes alert take the same area as the status panel, partially
backing out the regressing bug.
.browserStack is also relatively-positioned, so this works too. I think
I didn't realize this while writing bug 1791972 because the rule was in
a UA sheet (all <stack>s are relatively positioned, apparently).
This restores the behavior when devtools is toggled vertically. On
responsive mode this still covers the top toolbar, but that was the
pre-existing behavior. Could be fixed in a follow-up with some z-index
tweaking...
Differential Revision: https://phabricator.services.mozilla.com/D162739
Cmd or Ctrl + mousewheel on macOS should scroll instead of zooming the page. This new behavior will match Safari and Chrome on macOS and Firefox on Windows.
Cmd or Ctrl + horizontal mousewheel on macOS should scroll horizontally, like Safari and Chrome. The comments here mention a Left swipe+Cmd gesture, but AFAICT that gesture doesn't currently work (on my MacBook Air running macOS 12.6).
1. Set "mousewheel.with_control.action" to 1 (scroll) on macOS.
2. Stop setting "mousewheel.with_meta.action" to 3 (zoom) on macOS because we want the pref's default value 1 (scroll) from modules/libpref/init/all.js.
3. Stop setting "mousewheel.with_meta.action" to 1 (scroll) on Windows because that's pref's default value from modules/libpref/init/all.js.
4. Stop setting "mousewheel.with_control.action" to 3 (zoom) on Windows because that's pref's default value from modules/libpref/init/all.js.
5. Update the browser_mousewheel_zoom.js, browser_ext_mousewheel_zoom.js, and test_wheel_zoom_on_form_controls.html tests to re-enable mouse wheel zoom for macOS. Alternatively, I could change this test to expect scrolling instead of zooming on macOS (different from other platforms), but testing the zooming functionality for regressions seems more important than testing the mouse wheel pref's default value on macOS.
Differential Revision: https://phabricator.services.mozilla.com/D159974
* Make non-menulist popups just absolute positioned top-layer items.
* Simplify menulist popups to just be static-positioned items under
nsMenuFrame.
We need to keep kPopupList only for nsMenuFrame. In the future it can be
removed, see TODO in xul.css
Differential Revision: https://phabricator.services.mozilla.com/D161404
* Make non-menulist popups just absolute positioned top-layer items.
* Simplify menulist popups to just be static-positioned items under
nsMenuFrame.
We need to keep kPopupList only for nsMenuFrame. In the future it can be
removed, see TODO in xul.css
Differential Revision: https://phabricator.services.mozilla.com/D161404
The existing check didn't work for visibility: collapse items.
Before switching to modern flexbox, we were saved by the width==0 check, but
modern flexbox preserves the padding of collapsed items (even though they take
no space and aren't painted).
checkVisibility() is the right thing to check for this, and should also handle
visibility: hidden properly as a bonus.
Differential Revision: https://phabricator.services.mozilla.com/D161501
* Make non-menulist popups just absolute positioned top-layer items.
* Simplify menulist popups to just be static-positioned items under
nsMenuFrame.
We need to keep kPopupList only for nsMenuFrame. In the future it can be
removed, see TODO in xul.css
Differential Revision: https://phabricator.services.mozilla.com/D161404
`aboutSupport.js` was also missing a check for `AppConstants.MOZ_PLACES`.
As Kelsey pointed out, it may be good to have some protective code when iterating through `snapshotFormatters` to avoid breaking the entire page when one of the formatters errors out.
Differential Revision: https://phabricator.services.mozilla.com/D161593
* Make non-menulist popups just absolute positioned top-layer items.
* Simplify menulist popups to just be static-positioned items under
nsMenuFrame.
We need to keep kPopupList only for nsMenuFrame. In the future it can be
removed, see TODO in xul.css
Differential Revision: https://phabricator.services.mozilla.com/D161404