Skip to content

Commit ea8818c

Browse files
committed
Bug 1869796 - Remove some unused chrome flags. r=smaug,sessionstore-reviewers,dao
And rename CHROME_WINDOW_MIN to CHROME_WINDOW_MINIMIZE, for parallel with the resize flag. Differential Revision: https://phabricator.services.mozilla.com/D197869
1 parent 7a37901 commit ea8818c

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

browser/components/sessionstore/SessionStore.sys.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const CHROME_FLAGS_MAP = [
7373
[Ci.nsIWebBrowserChrome.CHROME_STATUSBAR, "status"],
7474
[Ci.nsIWebBrowserChrome.CHROME_MENUBAR, "menubar"],
7575
[Ci.nsIWebBrowserChrome.CHROME_WINDOW_RESIZE, "resizable"],
76-
[Ci.nsIWebBrowserChrome.CHROME_WINDOW_MIN, "minimizable"],
76+
[Ci.nsIWebBrowserChrome.CHROME_WINDOW_MINIMIZE, "minimizable"],
7777
[Ci.nsIWebBrowserChrome.CHROME_SCROLLBARS, "", "scrollbars=0"],
7878
[Ci.nsIWebBrowserChrome.CHROME_PRIVATE_WINDOW, "private"],
7979
[Ci.nsIWebBrowserChrome.CHROME_NON_PRIVATE_WINDOW, "non-private"],

toolkit/components/browser/nsIWebBrowserChrome.idl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ interface nsIWebBrowserChrome : nsISupports
4141
const unsigned long CHROME_TITLEBAR = 1 << 10;
4242
const unsigned long CHROME_EXTRA = 1 << 11;
4343

44-
// createBrowserWindow specific flags
45-
const unsigned long CHROME_WITH_SIZE = 1 << 12;
46-
const unsigned long CHROME_WITH_POSITION = 1 << 13;
44+
// Free bits here.
45+
const unsigned long CHROME_ALL =
46+
CHROME_WINDOW_BORDERS | CHROME_WINDOW_CLOSE | CHROME_WINDOW_RESIZE |
47+
CHROME_MENUBAR | CHROME_TOOLBAR | CHROME_LOCATIONBAR |
48+
CHROME_STATUSBAR | CHROME_PERSONAL_TOOLBAR | CHROME_SCROLLBARS |
49+
CHROME_TITLEBAR | CHROME_EXTRA;
4750

48-
// special cases
49-
const unsigned long CHROME_WINDOW_MIN = 1 << 14;
51+
const unsigned long CHROME_WINDOW_MINIMIZE = 1 << 14;
5052

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

92-
const unsigned long CHROME_ALL = 0x00000ffe;
93-
9494
const unsigned long CHROME_MINIMAL_POPUP =
9595
CHROME_WINDOW_BORDERS | CHROME_WINDOW_CLOSE | CHROME_WINDOW_RESIZE |
96-
CHROME_LOCATIONBAR | CHROME_STATUSBAR | CHROME_SCROLLBARS |
97-
CHROME_TITLEBAR | CHROME_WINDOW_MIN;
96+
CHROME_WINDOW_MINIMIZE | CHROME_LOCATIONBAR | CHROME_STATUSBAR |
97+
CHROME_SCROLLBARS | CHROME_TITLEBAR;
9898

9999
/**
100100
* The chrome flags for this browser chrome. The implementation should

toolkit/components/windowwatcher/nsWindowWatcher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1814,7 +1814,7 @@ uint32_t nsWindowWatcher::CalculateChromeFlagsHelper(
18141814
chromeFlags |= nsIWebBrowserChrome::CHROME_WINDOW_RESIZE;
18151815
}
18161816
if (aFeatures.GetBoolWithDefault("minimizable", false, presenceFlag)) {
1817-
chromeFlags |= nsIWebBrowserChrome::CHROME_WINDOW_MIN;
1817+
chromeFlags |= nsIWebBrowserChrome::CHROME_WINDOW_MINIMIZE;
18181818
}
18191819

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

0 commit comments

Comments
 (0)