This patch implements -moz-gtk-csd-hide-titlebar-by-default media query
to check if the system titlebar should be disabled by default on Linux systems
(it's already disabled on Window/Mac).
It also removes explicit definition of browser.tabs.drawInTitlebar preference on Linux.
When browser.tabs.drawInTitlebar is missing the -moz-gtk-csd-hide-titlebar-by-default
is used to obtain the titlebar state. When browser.tabs.drawInTitlebar is set
in about:config or by Customize menu, the user peference is used instead of the default.
It also fixes a -moz-gtk-csd-available media query,
it was always true regardless the actual system setting.
Differential Revision: https://phabricator.services.mozilla.com/D16036
--HG--
extra : moz-landing-system : lando
This patch implements -moz-gtk-csd-hide-titlebar-by-default media query
to check if the system titlebar should be disabled by default on Linux systems
(it's already disabled on Window/Mac).
It also removes explicit definition of browser.tabs.drawInTitlebar preference on Linux.
When browser.tabs.drawInTitlebar is missing the -moz-gtk-csd-hide-titlebar-by-default
is used to obtain the titlebar state. When browser.tabs.drawInTitlebar is set
in about:config or by Customize menu, the user peference is used instead of the default.
It also fixes a -moz-gtk-csd-available media query,
it was always true regardless the actual system setting.
Differential Revision: https://phabricator.services.mozilla.com/D16036
--HG--
extra : moz-landing-system : lando
Automatic changes by ESLint, except for manual corrections for .xml files.
Differential Revision: https://phabricator.services.mozilla.com/D4439
--HG--
extra : moz-landing-system : lando
Two fixes here:
updateAppearance really depends on the tabbrowser.xml updateVisibility(), so
make that dependency explicit and remove the event handling from tabbrowser.
After the previous patch, TabsInTitlebar.init() runs much earlier, which means
that the initialization check that bails out from update() is not taken. Turns
out that this is definitely not an edge case, and that tons of initialization
code all over gBrowser.onDOMContentLoaded call updateAppearance(true), causing
tons of extra invalidation and reflows that aren't really needed.
Ensure we only do the work once.
MozReview-Commit-ID: 2E9b12aBast
There are still known issues with the browser chrome when emulating, but this changeset is
done in service of getting the UI to be close enough to start running Talos tests against
it in Bug 1425330.
MozReview-Commit-ID: B0w1aOmi4FJ
--HG--
extra : rebase_source : e8b13f9203f0e368fb6f36bc9d2059fff7061b54
We got rid of drawing lwthemes inside the titlebar on OSX in bug 1392219 but
there was still some code that adjusted the titlebar, which we forgot
remove. Incidentally, that code was also causing a bug (even before we
removed the in-titlebar drawing) which we now don't need to worry about
anymore now.
MozReview-Commit-ID: 44HR25Uyp8B
--HG--
extra : rebase_source : 12a9d427a021d00553be8949dd5f9fa7e37eef47
This commit:
- Makes the window controls have exactly the same height as tabs when the
menubar is hidden, and have the same height as the menubar when it is shown.
This requires us to remove the menubar height before flushing layout in
case it is shown, since we need its original height for the calculation.
- Removes the top margin between the menu bar and the window border
that was present on Windows 10 and makes it apply on Windows 7 only.
The border was causing miscalculations of the window control height,
which could have been handled in browser-tabsintitlebar.js, but since
it's not part of the Photon spec we decide to remove it entirely.
- Makes window control height calculations ignore vertical tabs toolbar
margins. The only margin it has right now is -1px and the calculation
code doesn't work right with negative margins.
MozReview-Commit-ID: HJXxUUJFX8x
--HG--
extra : rebase_source : d5e741cc4ca897ef125ab3e807bc009cd540ade6
This commit:
- Makes the window controls have exactly the same height as tabs when the
menubar is hidden, and have the same height as the menubar when it is shown.
This requires us to remove the menubar height before flushing layout in
case it is shown, since we need its original height for the calculation.
- Removes the top margin between the menu bar and the window border
that was present on Windows 10 and makes it apply on Windows 7 only.
The border was causing miscalculations of the window control height,
which could have been handled in browser-tabsintitlebar.js, but since
it's not part of the Photon spec we decide to remove it entirely.
- Makes window control height calculations ignore vertical tabs toolbar
margins. The only margin it has right now is -1px and the calculation
code doesn't work right with negative margins.
MozReview-Commit-ID: HJXxUUJFX8x
--HG--
extra : rebase_source : fdb5db7e5b410cb45cef054d5cbec41048211f75
This commit:
- Makes the window controls have exactly the same height as tabs when the
menubar is hidden, and have the same height as the menubar when it is shown.
This requires us to remove the menubar height before flushing layout in
case it is shown, since we need its original height for the calculation.
- Removes the top margin between the menu bar and the window border
that was present on Windows 10 and makes it apply on Windows 7 only.
The border was causing miscalculations of the window control height,
which could have been handled in browser-tabsintitlebar.js, but since
it's not part of the Photon spec we decide to remove it entirely.
- Makes window control height calculations ignore vertical tabs toolbar
margins. The only margin it has right now is -1px and the calculation
code doesn't work right with negative margins.
MozReview-Commit-ID: HJXxUUJFX8x
--HG--
extra : rebase_source : d3dc3a1c7d21b8ca8304b25fb67b50a58a5e4ce3
* Track window states: active, fullscreen and tabsintitlebar for each window
* Use toolbar.id and window state to store and retrieve values from cache
* Note: As each window has its own ToolbarIconColor object, the cache is not currently shared across windows
* inferFromText callers pass in a reason and associated value, which is used to update the state we track, and potentially clear out the cache
* Create new windows test directory for browser-window-specific tests like this
* Test for the ToolbarIconColor changes to avoid sync style flushes when windows activate/deactivate
MozReview-Commit-ID: JDJ3RtL4Lge
--HG--
extra : rebase_source : f944ccd1c2340a5d2973bf47480a6eb78b2aae3b
* Track window states: active, fullscreen and tabsintitlebar for each window
* Use toolbar.id and window state to store and retrieve values from cache
* Note: As each window has its own ToolbarIconColor object, the cache is not currently shared across windows
* inferFromText callers pass in a reason and associated value, which is used to update the state we track, and potentially clear out the cache
* Create new windows test directory for browser-window-specific tests like this
* Test for the ToolbarIconColor changes to avoid sync style flushes when windows activate/deactivate
* Skip test for windows 8, follow-up filed as bug 1356684
MozReview-Commit-ID: JDJ3RtL4Lge
--HG--
extra : rebase_source : e97bb5c09b2e6d7b264363ccba1b34bf666f31e9