-
-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed ability to adjust density in CustomizeUI mode
- Loading branch information
1 parent
bd3c8d1
commit 99eedfd
Showing
4 changed files
with
615 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
src/browser/components/customizableui/content/customizeMode-inc-xhtml.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
diff --git a/browser/components/customizableui/content/customizeMode.inc.xhtml b/browser/components/customizableui/content/customizeMode.inc.xhtml | ||
index 38c9dbe15f9e89a63471c5ea4439b2f468f31073..d0f7998e158c9b391acea726231c79f188f20163 100644 | ||
--- a/browser/components/customizableui/content/customizeMode.inc.xhtml | ||
+++ b/browser/components/customizableui/content/customizeMode.inc.xhtml | ||
@@ -32,57 +32,6 @@ | ||
<button id="customization-toolbar-visibility-button" class="footer-button" type="menu" data-l10n-id="customize-mode-toolbars"> | ||
<menupopup id="customization-toolbar-menu" onpopupshowing="if (event.target == this) ToolbarContextMenu.onViewToolbarsPopupShowing(event)"/> | ||
</button> | ||
-<button id="customization-uidensity-button" | ||
- data-l10n-id="customize-mode-uidensity" | ||
- class="footer-button" | ||
- type="menu" | ||
- hidden="true"> | ||
- <panel type="arrow" id="customization-uidensity-menu" | ||
- orient="vertical" | ||
- onpopupshowing="gCustomizeMode.onUIDensityMenuShowing();" | ||
- position="topleft bottomleft" | ||
- flip="none" | ||
- role="menu"> | ||
- <menuitem id="customization-uidensity-menuitem-compact" | ||
- class="menuitem-iconic customization-uidensity-menuitem" | ||
- role="menuitemradio" | ||
- data-l10n-id="customize-mode-uidensity-menu-compact-unsupported" | ||
- tabindex="0" | ||
- onfocus="gCustomizeMode.updateUIDensity(this.mode);" | ||
- onmouseover="gCustomizeMode.updateUIDensity(this.mode);" | ||
- onblur="gCustomizeMode.resetUIDensity();" | ||
- onmouseout="gCustomizeMode.resetUIDensity();" | ||
- oncommand="gCustomizeMode.setUIDensity(this.mode);"/> | ||
- <menuitem id="customization-uidensity-menuitem-normal" | ||
- class="menuitem-iconic customization-uidensity-menuitem" | ||
- role="menuitemradio" | ||
- data-l10n-id="customize-mode-uidensity-menu-normal" | ||
- tabindex="0" | ||
- onfocus="gCustomizeMode.updateUIDensity(this.mode);" | ||
- onmouseover="gCustomizeMode.updateUIDensity(this.mode);" | ||
- onblur="gCustomizeMode.resetUIDensity();" | ||
- onmouseout="gCustomizeMode.resetUIDensity();" | ||
- oncommand="gCustomizeMode.setUIDensity(this.mode);"/> | ||
-#ifndef XP_MACOSX | ||
- <menuitem id="customization-uidensity-menuitem-touch" | ||
- class="menuitem-iconic customization-uidensity-menuitem" | ||
- role="menuitemradio" | ||
- data-l10n-id="customize-mode-uidensity-menu-touch" | ||
- tabindex="0" | ||
- onfocus="gCustomizeMode.updateUIDensity(this.mode);" | ||
- onmouseover="gCustomizeMode.updateUIDensity(this.mode);" | ||
- onblur="gCustomizeMode.resetUIDensity();" | ||
- onmouseout="gCustomizeMode.resetUIDensity();" | ||
- oncommand="gCustomizeMode.setUIDensity(this.mode);"> | ||
- </menuitem> | ||
- <spacer hidden="true" id="customization-uidensity-touch-spacer"/> | ||
- <checkbox id="customization-uidensity-autotouchmode-checkbox" | ||
- hidden="true" | ||
- data-l10n-id="customize-mode-uidensity-auto-touch-mode-checkbox" | ||
- oncommand="gCustomizeMode.updateAutoTouchMode(this.checked)"/> | ||
-#endif | ||
- </panel> | ||
-</button> | ||
<label is="text-link" | ||
id="customization-lwtheme-link" | ||
class="customization-link" |
56 changes: 56 additions & 0 deletions
56
src/browser/components/customizableui/test/browser_970511_undo_restore_default-js.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
diff --git a/browser/components/customizableui/test/browser_970511_undo_restore_default.js b/browser/components/customizableui/test/browser_970511_undo_restore_default.js | ||
index 5477b41b803eca4aa2e6e7d8c00811502908c286..363de1f00896e1630ae66af5159dcd24243568ea 100644 | ||
--- a/browser/components/customizableui/test/browser_970511_undo_restore_default.js | ||
+++ b/browser/components/customizableui/test/browser_970511_undo_restore_default.js | ||
@@ -26,51 +26,14 @@ add_task(async function () { | ||
); | ||
is(undoResetButton.hidden, true, "The undo button is hidden before reset"); | ||
|
||
- let densityButton = document.getElementById("customization-uidensity-button"); | ||
- let popup = document.getElementById("customization-uidensity-menu"); | ||
- let popupShownPromise = popupShown(popup); | ||
- EventUtils.synthesizeMouseAtCenter(densityButton, {}); | ||
- info("Clicked on density button"); | ||
- await popupShownPromise; | ||
- | ||
- let compactModeItem = document.getElementById( | ||
- "customization-uidensity-menuitem-compact" | ||
- ); | ||
- let win = document.getElementById("main-window"); | ||
- let densityChangedPromise = new Promise(resolve => { | ||
- let observer = new MutationObserver(() => { | ||
- if (win.getAttribute("uidensity") == "compact") { | ||
- resolve(); | ||
- observer.disconnect(); | ||
- } | ||
- }); | ||
- observer.observe(win, { | ||
- attributes: true, | ||
- attributeFilter: ["uidensity"], | ||
- }); | ||
- }); | ||
- | ||
- compactModeItem.doCommand(); | ||
- info("Clicked on compact density"); | ||
- await densityChangedPromise; | ||
|
||
await gCustomizeMode.reset(); | ||
|
||
ok(CustomizableUI.inDefaultState, "In default state after reset"); | ||
is(undoResetButton.hidden, false, "The undo button is visible after reset"); | ||
- is( | ||
- win.hasAttribute("uidensity"), | ||
- false, | ||
- "The window has been restored to normal density." | ||
- ); | ||
|
||
await gCustomizeMode.undoReset(); | ||
|
||
- is( | ||
- win.getAttribute("uidensity"), | ||
- "compact", | ||
- "Density has been reset to compact." | ||
- ); | ||
ok(!CustomizableUI.inDefaultState, "Not in default state after undo-reset"); | ||
is( | ||
undoResetButton.hidden, |
Oops, something went wrong.