From 4576e41ddbc8effa83175dec12f618be940b9c1c Mon Sep 17 00:00:00 2001 From: Jared Wein Date: Sat, 8 Feb 2014 18:27:56 -0500 Subject: [PATCH] Bug 966905 - [Australis] Headers and footers of subviews should be outside scrollable bits of those panels/subviews. r=Gijs --- browser/base/content/browser.css | 4 - .../customizableui/content/panelUI.inc.xul | 155 +++++++++--------- .../customizableui/content/panelUI.xml | 28 +++- .../customizableui/panelUIOverlay.inc.css | 10 ++ 4 files changed, 112 insertions(+), 85 deletions(-) diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css index b9434c1921f3..5fcae9f5caa9 100644 --- a/browser/base/content/browser.css +++ b/browser/base/content/browser.css @@ -280,10 +280,6 @@ toolbarpaletteitem > #personal-bookmarks > #bookmarks-toolbar-placeholder, direction: rtl; } -#panelMenu_bookmarksMenu { - overflow-x: hidden; - overflow-y: auto; -} #panelMenu_bookmarksMenu > .bookmark-item { max-width: none; } diff --git a/browser/components/customizableui/content/panelUI.inc.xul b/browser/components/customizableui/content/panelUI.inc.xul index f952ffa3f637..5bfec9b569e2 100644 --- a/browser/components/customizableui/content/panelUI.inc.xul +++ b/browser/components/customizableui/content/panelUI.inc.xul @@ -52,34 +52,36 @@ diff --git a/browser/components/customizableui/content/panelUI.xml b/browser/components/customizableui/content/panelUI.xml index 80c164696024..63eb103049d2 100644 --- a/browser/components/customizableui/content/panelUI.xml +++ b/browser/components/customizableui/content/panelUI.xml @@ -200,8 +200,7 @@ this._currentSubView = viewNode; - // Now we have to transition to transition the panel. There are a few parts - // to this: + // Now we have to transition the panel. There are a few parts to this: // // 1) The main view content gets shifted so that the center of the anchor // node is at the left-most edge of the panel. @@ -222,7 +221,9 @@ this._viewContainer.removeEventListener("transitionend", trans); this._transitioning = false; }.bind(this)); - this._viewContainer.style.height = this._subViews.scrollHeight + "px"; + + let newHeight = this._heightOfSubview(viewNode); + this._viewContainer.style.height = newHeight + "px"; this._subViewObserver.observe(viewNode, { attributes: true, @@ -293,7 +294,7 @@ break; case "popuphidden": this.removeAttribute("panelopen"); - this._mainView.style.height = ""; + this._mainView.style.removeProperty("height"); this.showMainView(); break; } @@ -313,8 +314,8 @@ @@ -327,6 +328,21 @@ ]]> + + + + + diff --git a/browser/themes/shared/customizableui/panelUIOverlay.inc.css b/browser/themes/shared/customizableui/panelUIOverlay.inc.css index acaf0c4dca4a..c3e97e88b9e5 100644 --- a/browser/themes/shared/customizableui/panelUIOverlay.inc.css +++ b/browser/themes/shared/customizableui/panelUIOverlay.inc.css @@ -54,6 +54,16 @@ -moz-box-flex: 1; } +.panel-subview-body { + overflow-y: auto; + overflow-x: hidden; + -moz-box-flex: 1; +} + +#PanelUI-popup .panel-subview-body { + margin: -4px; +} + .panel-subview-header, .subviewbutton.panel-subview-footer { padding: 12px;