Bug 869543: move findbar to the top. r=dao

This commit is contained in:
Mike de Boer 2013-07-11 12:44:34 +02:00
parent 0dcea61e3d
commit 66757c1a9a
6 changed files with 36 additions and 4 deletions

View File

@ -158,7 +158,8 @@
let findBar = document.createElementNS(this.namespaceURI, "findbar");
let browser = this.getBrowserForTab(aTab);
let browserContainer = this.getBrowserContainer(browser);
browserContainer.appendChild(findBar);
findBar.setAttribute("position", "top");
browserContainer.insertBefore(findBar, browserContainer.firstChild);
// Force a style flush to ensure that our binding is attached.
findBar.clientTop;

View File

@ -2139,7 +2139,7 @@ sidebarheader > .tabs-closebutton > .toolbarbutton-text {
.browserContainer > findbar {
background: @scopeBarBackground@;
border-top: @scopeBarSeparatorBorder@;
border-bottom: @scopeBarSeparatorBorder@;
color: -moz-DialogText;
text-shadow: none;
}

View File

@ -207,10 +207,9 @@
</toolbox>
<vbox id="appcontent" flex="1">
<findbar id="FindToolbar" browserid="content" position="top"/>
<browser id="content" type="content-primary" name="content" src="about:blank" flex="1"
context="viewSourceContextMenu" showcaret="true" tooltip="aHTMLTooltip"/>
<findbar id="FindToolbar" browserid="content"/>
</vbox>
<statusbar id="status-bar" class="chromeclass-status">

View File

@ -14,6 +14,12 @@ findbar {
transition-timing-function: ease-in-out, ease-in-out, linear;
}
findbar[position="top"] {
border-top-style: none;
border-bottom: 1px solid ThreeDShadow;
transition-property: margin-top, opacity, visibility;
}
findbar[hidden] {
/* Override display:none to make the transition work. */
display: -moz-box;
@ -23,6 +29,11 @@ findbar[hidden] {
transition-delay: 0s, 0s, 150ms;
}
findbar[position="top"][hidden] {
margin-bottom: auto;
margin-top: -1em;
}
.findbar-closebutton {
-moz-margin-start: 4px;
list-style-image: url("moz-icon://stock/gtk-close?size=menu");

View File

@ -15,6 +15,12 @@ findbar {
transition-timing-function: ease-in-out, ease-in-out, linear;
}
findbar[position="top"] {
border-top: none;
border-bottom: @scopeBarSeparatorBorder@;
transition-property: margin-top, opacity, visibility;
}
findbar[hidden] {
/* Override display:none to make the transition work. */
display: -moz-box;
@ -24,6 +30,11 @@ findbar[hidden] {
transition-delay: 0s, 0s, 150ms;
}
findbar[position="top"][hidden] {
margin-bottom: auto;
margin-top: -1em;
}
findbar:-moz-lwtheme {
-moz-appearance: none;
background: none;

View File

@ -16,6 +16,11 @@ findbar {
transition-timing-function: ease-in-out, ease-in-out, linear;
}
findbar[position="top"] {
box-shadow: 0 -1px 1px rgba(0,0,0,.1) inset;
transition-property: margin-top, opacity, visibility;
}
findbar[hidden] {
/* Override display:none to make the transition work. */
display: -moz-box;
@ -25,6 +30,11 @@ findbar[hidden] {
transition-delay: 0s, 0s, 150ms;
}
findbar[position="top"][hidden] {
margin-bottom: auto;
margin-top: -1em;
}
.findbar-closebutton {
-moz-margin-start: 4px;
border: none;