Bug 1296907 - fix 1px offset of private browsing to 'normal' browsing window, r?mstange draft
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Mon, 22 Aug 2016 22:52:26 +0100
changeset 404080 49b93bf2ea77e42aa1ad5dbe4252351478ee63c9
parent 404063 3345f0e8ed3bd33d8af6e2b9bf1fd8bf397a45bc
child 529092 fed2dba5ff85908b5f819e5ddcbfa58fe1ee2ba7
push id27108
push usergijskruitbosch@gmail.com
push dateMon, 22 Aug 2016 21:52:56 +0000
reviewersmstange
bugs1296907
milestone51.0a1
Bug 1296907 - fix 1px offset of private browsing to 'normal' browsing window, r?mstange MozReview-Commit-ID: 2TkYag9o9Na
browser/base/content/browser.css
browser/themes/osx/devedition.css
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -261,16 +261,27 @@ toolbar[customizing] > .overflow-button 
 }
 
 #titlebar-secondary-buttonbox:-moz-locale-dir(rtl),
 #titlebar-buttonbox-container:-moz-locale-dir(ltr),
 .titlebar-placeholder[type="caption-buttons"]:-moz-locale-dir(ltr),
 .titlebar-placeholder[type="fullscreen-button"]:-moz-locale-dir(rtl) {
   -moz-box-ordinal-group: 0;
 }
+
+/* In private windows, the #titlebar-content is higher because of the
+ * private browsing indicator. With the margin-top the titlebar buttons
+ * align to the top correctly in that case, but only if we don't stretch
+ * the box they're in because the container is too high, so we override
+ * the default alignment value (stretch).
+ */
+#main-window[tabsintitlebar] > #titlebar > #titlebar-content > #titlebar-buttonbox-container {
+  -moz-box-align: start;
+}
+
 %else
 /* On non-OSX, these should be start-aligned */
 #titlebar-buttonbox-container {
   -moz-box-align: start;
 }
 %endif
 
 %if !defined(MOZ_WIDGET_GTK)
--- a/browser/themes/osx/devedition.css
+++ b/browser/themes/osx/devedition.css
@@ -27,26 +27,16 @@
 }
 
 /* Resize things so that the native titlebar is in line with the tabs */
 #main-window[tabsintitlebar] > #titlebar > #titlebar-content > #titlebar-buttonbox-container,
 #main-window[tabsintitlebar] > #titlebar > #titlebar-content > #titlebar-secondary-buttonbox > #titlebar-fullscreen-button {
   margin-top: 6px;
 }
 
-/* In private windows, the #titlebar-content is higher because of the
- * private browsing indicator. With the margin-top the titlebar buttons
- * align to the top correctly in that case, but only if we don't stretch
- * the box they're in because the container is too high, so we override
- * the default alignment value (stretch).
- */
-#main-window[tabsintitlebar] > #titlebar > #titlebar-content > #titlebar-buttonbox-container {
-  -moz-box-align: start;
-}
-
 /* Square back and forward buttons.  Need !important on these because there
    are a lot of more specific selectors sprinkled around elsewhere for changing
    background / shadows for different states */
 #back-button,
 #forward-button {
   height: 24px !important;
   box-shadow: none !important;
   border: 1px solid var(--chrome-nav-bar-controls-border-color) !important;