Commit Graph

1287 Commits

Author SHA1 Message Date
Csoregi Natalia
1246d3b6d6 Backed out 2 changesets (bug 1802338) for causing z-index failures. CLOSED TREE
Backed out changeset 0abf88b6f60a (bug 1802338)
Backed out changeset 6ded71887ed3 (bug 1802338)
2022-11-30 04:42:01 +02:00
Emilio Cobos Álvarez
abea4ce995 Bug 1802338 - Centralize z-indices that fight in the browser area. r=Gijs
Not sure if this is worth it, your call. But it's a bit clearer to
figure out what fights with what.

Depends on D163002

Differential Revision: https://phabricator.services.mozilla.com/D163003
2022-11-30 01:28:00 +00:00
Emilio Cobos Álvarez
c0c34eb571 Bug 1801840 - Go back to using .browserStack rather than .browserContainer for tab dialog box. r=Gijs,nchevobbe
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
2022-11-24 16:42:52 +00:00
Emilio Cobos Álvarez
b555c07235 Bug 1801172 - Preserve whitespace in bookmark items. r=Gijs,dao
white-space: pre also preserves newlines so I'd rather just do this for
bookmarks (which only take a line of input).

Differential Revision: https://phabricator.services.mozilla.com/D162330
2022-11-18 14:31:45 +00:00
Itiel
3d0bd22bd1 Bug 1796940 - Unify bookmark-related popups r=emilio,mak,mkaply
Differential Revision: https://phabricator.services.mozilla.com/D158460
2022-11-17 22:58:04 +00:00
Cosmin Sabou
bb17ead141 Backed out changeset 99db9921183c (bug 1796940) for bc failures on browser_parsable_css.js. CLOSED TREE 2022-11-18 00:08:28 +02:00
Itiel
c5c7610894 Bug 1577257 - Share logic behind panel headers across the UI r=willdurand,Gijs,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D160972
2022-11-17 21:34:34 +00:00
Itiel
b1e0feab9a Bug 1796940 - Unify bookmark-related popups r=emilio,mak,mkaply
Differential Revision: https://phabricator.services.mozilla.com/D158460
2022-11-17 20:34:58 +00:00
Emilio Cobos Álvarez
0163aeff65 Bug 1800473 - Remove custom devtools highlighters for XUL windows. r=nchevobbe
For a while we've supported nsCanvasFrame in XUL windows too, so this
shouldn't be needed.

Differential Revision: https://phabricator.services.mozilla.com/D162000
2022-11-15 19:14:59 +00:00
Emilio Cobos Álvarez
ab98ad7635 Bug 1799343 - Simplify XUL popup handling. r=TYLin
* 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
2022-11-09 20:38:04 +00:00
Emilio Cobos Álvarez
8439c8cb46 Bug 1799901 - Make panel animations a LookAndFeel int. r=dao,Gijs
This will allow us to enable panel animations in some Linux
configurations but not others. Also, it's cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D161693
2022-11-09 19:31:08 +00:00
Csoregi Natalia
4e859d7b1a Backed out 3 changesets (bug 1799343, bug 1799580) for causing failures on /browser_history_after_appMenu.js. CLOSED TREE
Backed out changeset 63c270ba91ad (bug 1799343)
Backed out changeset 713e6f0fbd20 (bug 1799580)
Backed out changeset 42d1b8742662 (bug 1799343)
2022-11-09 21:26:06 +02:00
Emilio Cobos Álvarez
64563d8526 Bug 1799343 - Simplify XUL popup handling. r=TYLin
* 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
2022-11-09 14:19:22 +00:00
Mike Conley
c759904dae Bug 1797836 - Part 2: Update CUI to have a general TYPE_PANEL instead of TYPE_MENU_PANEL. r=desktop-theme-reviewers,dao,sclements
Long ago, the menu panel in was a customizable area that users could drag things into.

That changed back around 2017 in bug 1354117 when the Photon redesign was built. The
menu panel become a static menu, but we also made it possible to permanently move things
to the overflow panel of the nav-bar.

It looks like we never updated the area type constant from referring to the old menu panel
though, so it's "TYPE_MENU_PANEL", and registering a node for it happens with
registerMenuPanel. This patch changes to constant to TYPE_PANEL and updates the registration
method to registerPanelNode.

I a check around the codebase as well as GitHub looking to see if there were any
system add-ons or experimental WebExtensions that rely on TYPE_MENU_PANEL / registerMenuPanel,
but I couldn't find any.

Differential Revision: https://phabricator.services.mozilla.com/D161078
2022-11-08 14:51:40 +00:00
Emilio Cobos Álvarez
4c8f2bb6f9 Bug 1799426 - Remove min-width override while customizing. r=Gijs,dao
If the user has a lot of bookmarks, there's a point in time where we're
computing the overflow menu arrow position, but we still haven't removed
the bookmark items from the toolbar.

This causes a wrong offset to be computed, because -moz-fit-content
computes a very large width to fit all the bookmarks.

In general, -moz-fit-content can cause stuff to overflow the browser
window (this didn't happen before modern flexbox because XUL didn't
respect min-width so aggressively). This comes from bug 993299 and I
believe we could get rid of it.

At least I don't think it has an effect on actual window width anymore,
because the ConvertsToLength() check doesn't pass here:

  https://searchfox.org/mozilla-central/rev/3c194fa1d6f339036d2ec9516bd310c6ad612859/layout/generic/nsContainerFrame.cpp#819-821

This is true at least since we switched to <html> root for
browser.xhtml.

Differential Revision: https://phabricator.services.mozilla.com/D161453
2022-11-07 15:33:48 +00:00
Shane Caraveo
e5c4d6af38 Bug 1784947 - Make browser action a custom widget to support unified extension button. r=desktop-theme-reviewers,zombie,Itiel
Co-Authored-By: William Durand <will+git@drnd.me>

Differential Revision: https://phabricator.services.mozilla.com/D154470
2022-11-03 09:30:22 +00:00
Emilio Cobos Álvarez
d8c7a6b908 Bug 1798483 - Improve behavior of devtools splitting to prevent overflow. r=jdescottes
Use resizebefore/after=sibling to avoid setting the width of anything
else that isn't the DevTools frame, and make the size not impose a min
size to allow it to shrink.

Differential Revision: https://phabricator.services.mozilla.com/D161058
2022-11-03 00:23:32 +00:00
Emilio Cobos Álvarez
8ab75b80ef Bug 1797052 - Improve behavior of customize mode in small windows. r=Gijs
There was only a min-height: 0 missing. I also cleaned-up a bit because
flex: 1 is the same as flex: 1 1 auto, and flex attribute (which only
sets -moz-box-flex) is not doing anything because it was inside flex
layout (so legacy properties aren't looked at).

Differential Revision: https://phabricator.services.mozilla.com/D160094
2022-10-24 18:26:26 +00:00
Emilio Cobos Álvarez
a3e0beddb1 Bug 1795972 - Prevent offscreen view container from growing the popup. r=Gijs
This depends on bug 1795892 and restores the sizing behavior that XUL had for
this case (making the overflow: hidden element not contribute to the intrinsic
size of the container).

If this were to be written today, we couldd probably use absolute positioning
or transforms, and maybe this could be simplified a bit. This is the less risky
change tho.

Differential Revision: https://phabricator.services.mozilla.com/D159639
2022-10-19 11:06:13 +00:00
Emilio Cobos Álvarez
3ca0827c68 Bug 1790616 - Use modern flexbox for the toolbox. r=dao,Gijs
The min-width / contain are as usual to allow elements to shrink under
their intrinsic size. You can only see its effects with relatively thin
windows (or with a very large number of tabs in the tabstrip case).

Differential Revision: https://phabricator.services.mozilla.com/D157216
2022-10-17 17:19:09 +00:00
Emilio Cobos Álvarez
8021f0ab2a Bug 1795260 - Make a too-big searchbar not push the rest of the UI out. r=Gijs
For that, we need to min-width: 0 the nav-bar target, which itself
requires us to tweak the overflow detection so that we look at all
children of the customization target, not only the target itself.

Differential Revision: https://phabricator.services.mozilla.com/D159377
2022-10-17 17:07:15 +00:00
Norisz Fay
cd21b7de3e Backed out changeset fb32775d2def (bug 1790616) as requested by dev CLOSED TREE 2022-10-14 20:00:05 +03:00
Emilio Cobos Álvarez
e37158e61c Bug 1790616 - Use modern flexbox for the toolbox. r=dao,Gijs
The min-width / contain are as usual to allow elements to shrink under
their intrinsic size. You can only see its effects with relatively thin
windows (or with a very large number of tabs in the tabstrip case).

Differential Revision: https://phabricator.services.mozilla.com/D157216
2022-10-13 17:13:08 +00:00
Emilio Cobos Álvarez
a0663b0c84 Bug 1794630 - Use resizebefore="sibling" for resizing the sidebar. r=Gijs
This is really what we want. Remove the CSS hack so we always flex.

Depends on D159069

Differential Revision: https://phabricator.services.mozilla.com/D159070
2022-10-12 10:59:20 +00:00
Emilio Cobos Álvarez
e1dd6a3361 Bug 1794353 - Make appcontent always flex. r=Gijs
This matches the old XUL behavior. Note that this is fixed by bug
1790616, but we probably don't want to depend on that.

Differential Revision: https://phabricator.services.mozilla.com/D158948
2022-10-10 12:30:31 +00:00
Emilio Cobos Álvarez
d55a5fb96c Bug 1792748 - Persist sidebar style attribute rather than width attribute. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D158291
2022-09-30 09:41:32 +00:00
Marian-Vasile Laza
8e644bcc01 Backed out changeset bce6dc799630 (bug 1790843) for causing bc failures on browser_909779_overflow_toolbars_new_window.js. CLOSED TREE 2022-09-26 23:58:49 +03:00
William Durand
d04b6ba91b Bug 1790843 - Reduce the min width of the urlbar on small screens. r=dao
This patch adds some space after the menu button in the toolbar, which
makes things a lot better on MacOS and I noticed a small improvement on
Windows too.

Differential Revision: https://phabricator.services.mozilla.com/D158138
2022-09-26 18:34:00 +00:00
Emilio Cobos Álvarez
11f34416e8 Bug 1791972 - Simplify dialog stack and rdm styles. r=Gijs,devtools-reviewers,jdescottes
.browserContainer is relatively positioned, so we can position the
tab-modal dialogs absolutely inside it instead of making them part of
the browser stack.

While at it, make the rdm toolbar part of the regular browserContainer,
just like the regular devtools toolbox is. That way there's no need to
do ResizeObserver shenanigans to be able to let it grow. Keep it also
absolutely positioned tho, because we need to overlay the whole
container when the device modal is opened. That's somewhat gross.

This should in general be simpler to understand than the current set-up,
and more performant to since it avoids the dialog stack from forming
part of the browser element's flow.

Differential Revision: https://phabricator.services.mozilla.com/D157912
2022-09-23 22:23:37 +00:00
Emilio Cobos Álvarez
9886d5e3ac Bug 1789168 - Use modern flexbox emulation in the main browser area. r=Gijs
Now that DevTools splitters work this should be doable.

Differential Revision: https://phabricator.services.mozilla.com/D156385
2022-09-23 16:16:49 +00:00
Cristian Tuns
06d4e9b7af Backed out changeset b290a56391fe (bug 1789168) for causing mochitest failures on test_link.html CLOSED TREE 2022-09-22 17:11:58 -04:00
Emilio Cobos Álvarez
a671d8704a Bug 1789168 - Use modern flexbox emulation in the main browser area. r=Gijs
Now that DevTools splitters work this should be doable.

Differential Revision: https://phabricator.services.mozilla.com/D156385
2022-09-22 20:24:37 +00:00
Emilio Cobos Álvarez
1d46b07024 Bug 1790920 - Remove nsButtonBoxFrame. r=smaug
Create XULButtonElement instead to do the event handling. Pretty much a
straight port, this allows these elements to respect CSS display
properly (and use modern flexbox rather than old XUL layout).

Differential Revision: https://phabricator.services.mozilla.com/D157509
2022-09-19 17:02:37 +00:00
William Durand
313a3beac7 Bug 1784223 - Move unified extensions button "after" the overflow menu. r=rpl,dao
This patch also adjusts some `min-width` rules like it was done for the
downloads button. It should work with either buttons OR both, which is
going to happen since the unified extensions button will be most likely
always visible in the toolbar.

Differential Revision: https://phabricator.services.mozilla.com/D154360
2022-09-15 16:34:38 +00:00
Emilio Cobos Álvarez
e8751b0a67 Bug 1790297 - Clean-up -moz-box-emulation-specific rules. r=dao
Most of the display: block stuff isn't needed anymore because we changed
the blockification behavior in bug 1789123.

.tab-stack, and stacks in general now uses CSS grid so doesn't need that
anymore.

DevTools is the only consumer of <xul:iframe> and width/height was
getting ignored in XUL because flexibility takes precedence, so just
remove the relevant declarations.

Differential Revision: https://phabricator.services.mozilla.com/D157070
2022-09-12 13:18:34 +00:00
Emilio Cobos Álvarez
bd0ccbd151 Bug 1790304 - Remove useless rule that makes dialogs unreadable with emulated flexbox. r=dao
Trivial test-case: data:text/html,<script>alert("foo")</script>

The dialog grows because of the grid container, and -moz-box prefers
honoring flexibility to the explicit height, so this declaration is
useless.

Emulated flexbox actually honors it and crops the dialog. Just remove
it.

Differential Revision: https://phabricator.services.mozilla.com/D157069
2022-09-12 13:16:35 +00:00
Emilio Cobos Álvarez
e4bcc13cb9 Bug 1789877 - Hide inactive statuspanel. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D156921
2022-09-12 09:55:30 +00:00
Shane Hughes
3deb6aea98 Bug 1786509 - Fix Spotlight modal overflow scroll behavior. r=pdahiya
Make the dialog frame for Spotlight modal dialogs cover the full window,
prevent the fixed sizing in SubDialog for these dialogs, and vertically
center the dialog relative to its frame. Make the scrollport accommodate
the full Spotlight so it can be scrolled, without wasting any scroll
distance on margins. So, the top margin will shrink with the window,
like the other margins do.

Differential Revision: https://phabricator.services.mozilla.com/D156127
2022-09-10 07:40:14 +00:00
criss
f0ee3574ff Backed out changeset d1823131fc19 (bug 1786509) for causing mochitest failures on browser_modal_resize.js . CLOSED TREE 2022-09-10 08:12:55 +03:00
Shane Hughes
165c9d04bd Bug 1786509 - Fix Spotlight modal overflow scroll behavior. r=pdahiya
Make the dialog frame for Spotlight modal dialogs cover the full window,
prevent the fixed sizing in SubDialog for these dialogs, and vertically
center the dialog relative to its frame. Make the scrollport accommodate
the full Spotlight so it can be scrolled, without wasting any scroll
distance on margins. So, the top margin will shrink with the window,
like the other margins do.

Differential Revision: https://phabricator.services.mozilla.com/D156127
2022-09-10 03:50:16 +00:00
Emilio Cobos Álvarez
a1107cbac0 Bug 1789892 - Simplify statuspanel a bit. r=dao
I'm a bit baffled about bug 1789877. My best theory so far is that we're
inserting the element a bit deeper in the DOM and that causes us to
reflow slightly more stuff when tab-switching, but...

In any case while going through the code the status panel can be
simplified a bit now, so do that.

Differential Revision: https://phabricator.services.mozilla.com/D156876
2022-09-09 19:36:21 +00:00
Bernard Igiri
adad7e83e9 Bug 1784054 - Enable full height scrolling in Colorway Closet modal in small windows r=dao
Updated SubDialog.jsm's sizeTo=available to have better support for responsive layouts with the ability to specify max height and widths on the dialog.

Differential Revision: https://phabricator.services.mozilla.com/D155014
2022-09-08 17:43:58 +00:00
Emilio Cobos Álvarez
98196eb0a8 Bug 1789125 - Explicitly position statuspanel vertically. r=dao
Right now, the vertical position of the status panel is the "auto"
position, which ends up working out, but mostly by chance, and relies on
behavior that's different from the standard flexbox, see bug 1789165.

Instead of using `position: fixed` and relying on not having any
sidebars or other content to the inline-end (otherwise the [mirror] rule
would be incorrect), explicitly position it against the
.browserContainer.

Differential Revision: https://phabricator.services.mozilla.com/D156384
2022-09-06 19:05:54 +00:00
Dão Gottwald
b4631d5760 Bug 1786604 - Add horizontal margin to dialogBox. r=pbz
Differential Revision: https://phabricator.services.mozilla.com/D156416
2022-09-06 14:08:50 +00:00
Tooru Fujisawa
196c966416 Bug 1788778 - Part 2: Add "pointer-events: none" style to the drop indicator to avoid affecting the drag leave event of the container. r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D156251
2022-09-06 03:50:52 +00:00
Emilio Cobos Álvarez
d0cb660668 Bug 1789124 - Clear padding of auto-hidden menubar. r=aminomancer
This doesn't change behavior by default but makes the menubar not show
up when emulating legacy flexbox
(layout.css.moz-box-flexbox-emulation.enabled=true).

Differential Revision: https://phabricator.services.mozilla.com/D156374
2022-09-05 00:27:55 +00:00
Itiel
d75c8df1e9 Bug 1788775 - Fix the All Tabs drag-drop indicator for RTL r=arai
Differential Revision: https://phabricator.services.mozilla.com/D156232
2022-09-01 20:34:43 +00:00
Tooru Fujisawa
ca98419193 Bug 1771831 - Make it possible to reorder tabs in "List all tabs" list by drag-and-drop. r=NeilDeakin
Also the tab list item can be dragged to the tab bar to reorder, or moved to
other window, or detached.

Differential Revision: https://phabricator.services.mozilla.com/D147709
2022-08-31 13:22:53 +00:00
Butkovits Atila
3f8c432241 Backed out changeset f47d9c27992d (bug 1771831) for causing failures at browser_tabdetach.js. CLOSED TREE 2022-08-31 03:54:04 +03:00
Tooru Fujisawa
2736be1ef4 Bug 1771831 - Make it possible to reorder tabs in "List all tabs" list by drag-and-drop. r=NeilDeakin
Also the tab list item can be dragged to the tab bar to reorder, or moved to
other window, or detached.

Differential Revision: https://phabricator.services.mozilla.com/D147709
2022-08-30 22:49:43 +00:00