Bug 1387415 - Make empty toolbar spaces be drag handles for the window. r=dao, a=ritu
authorSam Foster <sfoster@mozilla.com>
Tue, 03 Oct 2017 16:34:49 -0700
changeset 432173 425fc16c98396fe1d54ff92bd6922c22d44e7aca
parent 432172 fd0f5f771d44e1edc000fc3c27d0ce991f7b54dc
child 432174 53c3484d629196c7ea461cca40df01ce59efa4ba
push id7896
push userryanvm@gmail.com
push dateThu, 05 Oct 2017 00:26:16 +0000
treeherdermozilla-beta@8c7645234f86 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao, ritu
bugs1387415, 1163113, 1404294
milestone57.0
Bug 1387415 - Make empty toolbar spaces be drag handles for the window. r=dao, a=ritu * Add -moz-window-drag: drag property to toolbars in toolkit, on Windows as support was added in bug 1163113 * Use the toolbar-drag binding for #nav-bar on Linux. * (Dao) Bug 1404294 - Enable dragging the window from empty toolbar areas when using the Light/Dark themes. r=sfoster MozReview-Commit-ID: 8ZABYMWswk1 MozReview-Commit-ID: B7sQzXr5MBV
browser/base/content/browser.css
browser/themes/linux/browser.css
browser/themes/windows/compacttheme.css
toolkit/content/xul.css
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -303,22 +303,16 @@ toolbarpaletteitem {
 #main-window[sizemode="maximized"] #titlebar-buttonbox {
   -moz-appearance: -moz-window-button-box-maximized;
 }
 
 #main-window[tabletmode] #titlebar-min,
 #main-window[tabletmode] #titlebar-max {
   display: none !important;
 }
-
-#main-window[tabsintitlebar] #TabsToolbar,
-#main-window[tabsintitlebar] #toolbar-menubar,
-#main-window[tabsintitlebar] #navigator-toolbox > toolbar:-moz-lwtheme {
-  -moz-window-dragging: drag;
-}
 %endif
 
 %endif
 
 #main-window[inFullscreen][inDOMFullscreen] #navigator-toolbox,
 #main-window[inFullscreen][inDOMFullscreen] #fullscr-toggler,
 #main-window[inFullscreen][inDOMFullscreen] #sidebar-box,
 #main-window[inFullscreen][inDOMFullscreen] #sidebar-splitter,
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -549,16 +549,17 @@ html|span.ac-emphasize-text-url {
   margin-bottom: calc(-1 * var(--tab-toolbar-navbar-overlap));
 }
 
 #TabsToolbar:not(:-moz-lwtheme) {
   -moz-appearance: menubar;
   color: -moz-menubartext;
 }
 
+#nav-bar,
 #toolbar-menubar:not([autohide="true"]):not(:-moz-lwtheme):-moz-system-metric(menubar-drag),
 #TabsToolbar:not(:-moz-lwtheme):-moz-system-metric(menubar-drag) {
   -moz-binding: url("chrome://browser/content/customizableui/toolbar.xml#toolbar-drag");
 }
 
 .tabbrowser-tab:focus > .tab-stack > .tab-content {
   outline: 1px dotted;
   outline-offset: -6px;
--- a/browser/themes/windows/compacttheme.css
+++ b/browser/themes/windows/compacttheme.css
@@ -115,21 +115,16 @@
 
 #navigator-toolbox {
   /* The side borders on the toolbox also look out-of-place because we don't paint over
    * the native background color at all, and these are !important for the same reason as above. */
   border-left: none !important;
   border-right: none !important;
 }
 
-/* Disable dragging like in the default theme: */
-#main-window[tabsintitlebar] #navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):-moz-lwtheme {
-  -moz-window-dragging: no-drag;
-}
-
 @media (-moz-os-version: windows-win10) {
   .titlebar-button:-moz-lwtheme {
     -moz-context-properties: stroke;
     stroke: currentColor;
   }
   #titlebar-min:-moz-lwtheme {
     list-style-image: url(chrome://browser/skin/window-controls/minimize.svg);
   }
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -250,17 +250,17 @@ caption {
 .groupbox-body {
   -moz-box-pack: inherit;
   -moz-box-align: inherit;
   -moz-box-orient: vertical;
 }
 
 /******** draggable elements *********/
 
-%ifdef XP_MACOSX
+%ifndef MOZ_WIDGET_GTK
 titlebar,
 toolbar:not([nowindowdrag="true"]):not([customizing="true"]),
 statusbar:not([nowindowdrag="true"]),
 %endif
 windowdragbox {
   -moz-window-dragging: drag;
 }