What we want is to not have a min-width from the default button styles,
but we still want it to take as much space as it needs, if available.
Differential Revision: https://phabricator.services.mozilla.com/D174468
Adds "forced-color-adjust: none" to the search tooltip psuedo styles in preferences.css to disable any backplating in forced color mode.
High contrast color are now specified in a forced-colors media query.
Differential Revision: https://phabricator.services.mozilla.com/D173781
* Original author was jaws, prathikshaprasadsuman got it reviewed and landed
* Update to non-hovered .tab-close-button width to avoid regressing bug 1818233 again.
Differential Revision: https://phabricator.services.mozilla.com/D115006
This code is untested since it's stubbing out functionality, which will
eventually use PageActions to open up a popup. The final code with the
popup will get tested, but for now rely on the existing test behavior,
without asserting new behavior.
Differential Revision: https://phabricator.services.mozilla.com/D173196
This code is untested since it's stubbing out functionality, which will
eventually use PageActions to open up a popup. The final code with the
popup will get tested, but for now rely on the existing test behavior,
without asserting new behavior.
Differential Revision: https://phabricator.services.mozilla.com/D173196
Some of this styling requires us to hack around with inline styles from JS since
the <panel-list>, <panel-item>'s and <xul:panel> are slotted. Bug 1823489 has been
filed to investigate not using slotted items to make it easier to style using the
migration-wizard.css stylesheet instead.
Differential Revision: https://phabricator.services.mozilla.com/D173064
Along with bringing us closer to the layout and spacing from Figma, this does the following:
1. Changes the header element to an <h1> and uses CSS to get the expected font size. This should
make the organization of the wizard make more sense to screenreaders.
2. Handles the "single resource" case for Variant 2, where we hide "Select All" and align the
resource list to the left if there's only a single resource to import.
3. Fixes a string to match the spec.
Differential Revision: https://phabricator.services.mozilla.com/D173054
Usually richlistboxes like this are scrollable and can shrink, but in
this particular case we want to avoid the scrolling and prevent it from
shrinking vertically.
My patch to allow XUL to shrink made it go from an effective
flex-shrink: 0 to 1, which combined with its min-height: 0 from the UA
stylesheet allows it to shrink when it previously didn't.
We could use flex-shrink: 0 for our purposes as well and it'd achieve
the same behavior, but min-height: auto works in grid as well, so is a
tad nicer IMO. Either way tho.
Differential Revision: https://phabricator.services.mozilla.com/D173091
That gets the right behavior even with flex-shrink: 1. An alternative
would be to also set flex-shrink: 0, but I don't see how this min-height
is useful so may as well remove code. Either way.
Depends on D172767
Differential Revision: https://phabricator.services.mozilla.com/D172768
This is not a new regression: that min-height which effectively prevents
shrinking of this list has been there since ~forever, so probably this
broke, if it broke at all, when we enabled modern flexbox emulation of
these dialogs.
Now that XUL can shrink this gets us the behavior we want (default to
18em, but allow both growing and shrinking).
Fix the sites list as well to behave similarly.
Differential Revision: https://phabricator.services.mozilla.com/D173034
That gets the right behavior even with flex-shrink: 1. An alternative
would be to also set flex-shrink: 0, but I don't see how this min-height
is useful so may as well remove code. Either way.
Depends on D172767
Differential Revision: https://phabricator.services.mozilla.com/D172768
That gets the right behavior even with flex-shrink: 1. An alternative
would be to also set flex-shrink: 0, but I don't see how this min-height
is useful so may as well remove code. Either way.
Depends on D172767
Differential Revision: https://phabricator.services.mozilla.com/D172768
Also, as a result, adjust panel headers to make it so that their toolbarseparator would be located in the same place as a toolbarseparator following a menuitem located in a menu with no panel header.
Differential Revision: https://phabricator.services.mozilla.com/D163778
The underlying issue here is an invalidation bug with XUL layout. When a
popup opens, we try to lay it out at full size, then post a reflow
callback to constrain it.
There's an intermediate step there where the popup might remain at full
size, and the constraining operates directly on mRect, which isn't quite
sound and doesn't update the scrollport of descendants.
Make nsMenuPopupFrame inherit from nsBlockFrame instead, doing
potentially two layout passes when constrained.
This fixes the issue at hand, and removes XUL layout from menu popups,
so it's a win-win.
To make reasoning about it a bit easier, factor out a bunch of the XUL
positioning code to be const. The mutation of mRect etc which was going
on otherwise was pretty hard to reason about.
Differential Revision: https://phabricator.services.mozilla.com/D170368
In a setup with:
<hbox>
<something flex="1"/>
<something-else/>
</hbox>
Before bug 1822131 <something flex="1"> ended up with flex-basis: auto,
but was the only thing able to shrink, so <something-else> stayed the
same size.
After that bug however <something-else> is able to shrink too, so both
elements shrink. This wouldn't happen if flex="1" actually worked like
flex: 1 does.
However flex: 1 causes stuff like explicit main sizes to be
(effectively) ignored, so we need to fix up a few cases where now we'd
start flexing too much. For that, add a debug assert to
nsFlexContainerFrame to catch the would-be behavior changes here.
For the most part they're actually no-op since they're setting tiny
sizes, but preferences and devtools needed a couple real fixes.
The profile selection spacer is useless (zero-size).
Hopefully the last xul.css change I need to do :')
Differential Revision: https://phabricator.services.mozilla.com/D172704
This patch adds support only for BLOCK permissions because ALLOW permissions
are double-keyed and will be included via a subsequent patch.
Support for a global BLOCK permission is not added here because of
inconsistencies in the way this interacts with device-specific ALLOW
permissions.
Differential Revision: https://phabricator.services.mozilla.com/D170303
Notably, this also updates the em ratio of the "base" font size and the deemphasized font-size.
In the Figma specification, the base font size is 13px, and the deemphasized font-size is 10px,
which is ~84% of 13px.
Differential Revision: https://phabricator.services.mozilla.com/D172443
Customize mode was already using display: flex, so the migration caused
some interesting interactions.
In particular -moz-box-flex: 1 rules had no effect at all, so remove
them (same for the flex="" attribute).
Un-flex items in the overflow menu so that they don't spread too much.
Use flex: 1 in the customization-content-container to reset flex-shrink
to 1 (XUL flex didn't allow shrinking by default, so xul.css has
flex-shrink: 0).
Differential Revision: https://phabricator.services.mozilla.com/D172144
While at it remove useless display declaration too.
vbox was setting -moz-box-orient: vertical, but that had no effect
because it had display: flex explicitly.
Differential Revision: https://phabricator.services.mozilla.com/D172145
drop-indicator-container is the direct child of places popups, so needs
-moz-box-flex for the time being until bug 1809084 lands (hopefully
soon).
Differential Revision: https://phabricator.services.mozilla.com/D172118
This prevents the tree header etc from overflowing when the window is
too small to fit that and the details pane together.
The overflow: clip declaration is just an in-depth defense against
overflow, but it isn't really needed because stuff in there should be
scrollable for the most part.
Differential Revision: https://phabricator.services.mozilla.com/D172037
Done mostly automatically via find/replace following the conversions
specified here:
https://groups.google.com/a/mozilla.org/g/firefox-dev/c/9sGpF1TNbLk/m/QpU3oTUuAgAJ
For the most part I think the "flex: N N" usage could be simplified to
just "flex: N", but I wanted to preserve behavior (-moz-box-flex sets
both flex-grow and flex-shrink).
I changed legacy layout to also look at the order property rather than
-moz-box-ordinal-group because it made splitters and treecols easier (we
don't need to deal with both orders).
Differential Revision: https://phabricator.services.mozilla.com/D171715
Done mostly automatically via find/replace following the conversions
specified here:
https://groups.google.com/a/mozilla.org/g/firefox-dev/c/9sGpF1TNbLk/m/QpU3oTUuAgAJ
For the most part I think the "flex: N N" usage could be simplified to
just "flex: N", but I wanted to preserve behavior (-moz-box-flex sets
both flex-grow and flex-shrink).
I changed legacy layout to also look at the order property rather than
-moz-box-ordinal-group because it made splitters and treecols easier (we
don't need to deal with both orders).
Differential Revision: https://phabricator.services.mozilla.com/D171715
Up until now, we've used the connectedCallback to initialize the MigrationWizard. That's
been fine, except that it requires us to remove and then re-add the element to the DOM
if we want to "reset" it and start over.
This patch adds a method "requestState" to the MigrationWizard that kicks off the
initialization. Embedders can set the `auto-request-state` attribute on the
element if they're happy to just use the connectedCallback.
Finally, this adds an intrinsic width to the entire MigrationWizard element to reduce
flicker when transitioning between states.
Differential Revision: https://phabricator.services.mozilla.com/D171742
When called with isLink=true, _getDragTargetTab returns null if the
pointer is around the edges of the tab. This is useful to decide whether
drag-and-drop should create a new tab, or reuse an existing one.
The problem was that _getDropIndex, used when creating a new tab, would
therefore always get a null tab on dragover events, and then fall back
to iterating all tabs sequentially until it would find the right index,
with an expensive getBoundingClientRect() for each tab.
So this patch:
- Renames unclear isLink to a more meaningful ignoreTabSides
- Makes _getDragTargetTab use the native Element#closest instead of
iterating the ancestors manually in JS.
- Makes _getDropIndex always pass ignoreTabSides=false
- Refactors _getDropIndex to never iterate tabs.
- Adds .tab-drop-indicator{pointer-events:none}. This is needed so that
the indicator doesn't become the event target, we want to get the tab
behind it.
Differential Revision: https://phabricator.services.mozilla.com/D166125
Now it's on by default everywhere, so all this is not needed. No behavior
change effectively since the xul.css bits being removed effectively achieve the
same.
Differential Revision: https://phabricator.services.mozilla.com/D170944
This icon has a viewbox, but not a width/height, so it was invisible
with old XUL images because XUL didn't know about image aspect-ratio.
Remove to keep the previous behavior.
Differential Revision: https://phabricator.services.mozilla.com/D170675
Hmm, I don't recall why I changed this min-height by a height, I didn't
write it down in the commit message either :/
This doesn't regress bug 1801607 and fixes the issue, so should be safe.
Differential Revision: https://phabricator.services.mozilla.com/D169647
That is, allow it to grow if something makes it take more space (like
the all tags text box). This works with and without flexbox emulation.
Differential Revision: https://phabricator.services.mozilla.com/D169531
contain works, but makes the intrinsic size be zero, which means that if
we flex something else in the tabs list, that is going to take all the
space.
Differential Revision: https://phabricator.services.mozilla.com/D169390
This patch changes the Firefox Suggest preference toggles to use the new `moz-toggle` element.
For testing purposes, set `browser.urlbar.quicksuggest.enabled` to `true` to make the toggles visible in `about:preferences#privacy`.
Differential Revision: https://phabricator.services.mozilla.com/D167881
I also renamed migration-dialog.[js|html|css] to migration-dialog-window.[js|html|css] to
make it clearer that those resources are for when the wizard is being shown in a separate
window. I also updated the documentation to reflect this.
Differential Revision: https://phabricator.services.mozilla.com/D169014
Use CSS rather than width attributes so that this keeps working when
flexbox emulation is used. Without this patch the width almost
collapses, which is not great!
Differential Revision: https://phabricator.services.mozilla.com/D168964