Bug 887397 - Make the window click and drag target larger above background tabs. r=Gijs
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Thu, 06 Mar 2014 15:32:17 -0500
changeset 189645 5bb78bdc6c5c58aa2632a26aa434175c306daa07
parent 189644 4166c73bace4785747cf6cfbcc4e2aedc78c6ccf
child 189646 00a76d6b935cf4e567f0fbbfc8705ad5c25ca9a5
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs887397
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 887397 - Make the window click and drag target larger above background tabs. r=Gijs
browser/base/content/tab-shape.inc.svg
browser/themes/shared/tabs.inc.css
--- a/browser/base/content/tab-shape.inc.svg
+++ b/browser/base/content/tab-shape.inc.svg
@@ -4,8 +4,12 @@
 
 <svg:clipPath id="tab-curve-clip-path-start" clipPathUnits="objectBoundingBox">
   <svg:path d="m 1,0.0625 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.0625 z"/>
 </svg:clipPath>
 
 <svg:clipPath id="tab-curve-clip-path-end" clipPathUnits="objectBoundingBox">
   <svg:path d="m 0,0.0625 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.0625 z"/>
 </svg:clipPath>
+
+<svg:clipPath id="tab-hover-clip-path" clipPathUnits="objectBoundingBox">
+  <svg:path d="M 0,0.2 0,1 1,1, 1,0.2 z"/>
+</svg:clipPath>
--- a/browser/themes/shared/tabs.inc.css
+++ b/browser/themes/shared/tabs.inc.css
@@ -222,16 +222,30 @@
 .tab-background-start[selected=true]:-moz-lwtheme::before,
 .tab-background-end[selected=true]:-moz-lwtheme::before,
 .tab-background-middle[selected=true]:-moz-lwtheme {
   background-color: transparent;
 }
 
 /* End selected tab */
 
+/* Background tabs */
+
+/* Decrease the height of the hoverable region of background tabs whenever the tabs are at the top
+   of the window (e.g. no menubar, tabs in titlebar, etc.) to make it easier to drag the window by
+   the titlebar. We don't need this in fullscreen since window dragging is not an issue there. */
+%ifdef XP_MACOSX
+#main-window[tabsintitlebar][sizemode="maximized"] .tab-background-middle:not([selected=true]),
+%endif
+#main-window[tabsintitlebar]:not([sizemode="maximized"]):not([inFullscreen]) #toolbar-menubar:-moz-any([autohide="true"][inactive], :not([autohide])) + #TabsToolbar .tab-background-middle:not([selected=true]) {
+  clip-path: url(chrome://browser/content/browser.xul#tab-hover-clip-path);
+}
+
+/* End background tabs */
+
 /* new tab button border and gradient on hover */
 .tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected=true]),
 .tabs-newtab-button:hover {
   background-image: url(chrome://browser/skin/tabbrowser/tab-background-start.png),
                     url(chrome://browser/skin/tabbrowser/tab-background-middle.png),
                     url(chrome://browser/skin/tabbrowser/tab-background-end.png);
   background-position: left bottom, @tabCurveWidth@ bottom, right bottom;
   background-repeat: no-repeat;