Skip to content

Commit

Permalink
Bug 1869796 - Remove some unused chrome flags. r=smaug,sessionstore-r…
Browse files Browse the repository at this point in the history
…eviewers,dao

And rename CHROME_WINDOW_MIN to CHROME_WINDOW_MINIMIZE, for parallel
with the resize flag.

Differential Revision: https://phabricator.services.mozilla.com/D197869
  • Loading branch information
emilio committed Jan 9, 2024
1 parent 7a37901 commit ea8818c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion browser/components/sessionstore/SessionStore.sys.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const CHROME_FLAGS_MAP = [
[Ci.nsIWebBrowserChrome.CHROME_STATUSBAR, "status"],
[Ci.nsIWebBrowserChrome.CHROME_MENUBAR, "menubar"],
[Ci.nsIWebBrowserChrome.CHROME_WINDOW_RESIZE, "resizable"],
[Ci.nsIWebBrowserChrome.CHROME_WINDOW_MIN, "minimizable"],
[Ci.nsIWebBrowserChrome.CHROME_WINDOW_MINIMIZE, "minimizable"],
[Ci.nsIWebBrowserChrome.CHROME_SCROLLBARS, "", "scrollbars=0"],
[Ci.nsIWebBrowserChrome.CHROME_PRIVATE_WINDOW, "private"],
[Ci.nsIWebBrowserChrome.CHROME_NON_PRIVATE_WINDOW, "non-private"],
Expand Down
18 changes: 9 additions & 9 deletions toolkit/components/browser/nsIWebBrowserChrome.idl
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ interface nsIWebBrowserChrome : nsISupports
const unsigned long CHROME_TITLEBAR = 1 << 10;
const unsigned long CHROME_EXTRA = 1 << 11;

// createBrowserWindow specific flags
const unsigned long CHROME_WITH_SIZE = 1 << 12;
const unsigned long CHROME_WITH_POSITION = 1 << 13;
// Free bits here.
const unsigned long CHROME_ALL =
CHROME_WINDOW_BORDERS | CHROME_WINDOW_CLOSE | CHROME_WINDOW_RESIZE |
CHROME_MENUBAR | CHROME_TOOLBAR | CHROME_LOCATIONBAR |
CHROME_STATUSBAR | CHROME_PERSONAL_TOOLBAR | CHROME_SCROLLBARS |
CHROME_TITLEBAR | CHROME_EXTRA;

// special cases
const unsigned long CHROME_WINDOW_MIN = 1 << 14;
const unsigned long CHROME_WINDOW_MINIMIZE = 1 << 14;

// whether to open a new private window. CHROME_NON_PRIVATE_WINDOW
// forces the opened window to be non-private, and overrides
Expand Down Expand Up @@ -89,12 +91,10 @@ interface nsIWebBrowserChrome : nsISupports
const unsigned long CHROME_OPENAS_DIALOG = 1 << 30;
const unsigned long CHROME_OPENAS_CHROME = 1 << 31;

const unsigned long CHROME_ALL = 0x00000ffe;

const unsigned long CHROME_MINIMAL_POPUP =
CHROME_WINDOW_BORDERS | CHROME_WINDOW_CLOSE | CHROME_WINDOW_RESIZE |
CHROME_LOCATIONBAR | CHROME_STATUSBAR | CHROME_SCROLLBARS |
CHROME_TITLEBAR | CHROME_WINDOW_MIN;
CHROME_WINDOW_MINIMIZE | CHROME_LOCATIONBAR | CHROME_STATUSBAR |
CHROME_SCROLLBARS | CHROME_TITLEBAR;

/**
* The chrome flags for this browser chrome. The implementation should
Expand Down
2 changes: 1 addition & 1 deletion toolkit/components/windowwatcher/nsWindowWatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1814,7 +1814,7 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsHelper(
chromeFlags |= nsIWebBrowserChrome::CHROME_WINDOW_RESIZE;
}
if (aFeatures.GetBoolWithDefault("minimizable", false, presenceFlag)) {
chromeFlags |= nsIWebBrowserChrome::CHROME_WINDOW_MIN;
chromeFlags |= nsIWebBrowserChrome::CHROME_WINDOW_MINIMIZE;
}

if (aFeatures.GetBoolWithDefault("scrollbars", true, presenceFlag)) {
Expand Down

0 comments on commit ea8818c

Please sign in to comment.