Bug 578028 - Move Progress Line to Location Bar, if loading tab is active r=gavin a=blocking

This commit is contained in:
Margaret Leibovic 2010-09-15 17:46:17 -07:00
parent c3f11f707d
commit dc2ae9f33a
7 changed files with 205 additions and 49 deletions

View File

@ -140,6 +140,10 @@ toolbar[mode="icons"] > #reload-button[displaystop] {
-moz-binding: url(chrome://browser/content/urlbarBindings.xml#urlbar);
}
#urlbar-progress {
-moz-binding: url("chrome://global/content/bindings/progressmeter.xml#progressmeter");
}
/* Some child nodes want to be ordered based on the locale's direction, while
everything else should be ltr. */
.urlbar-input-box:-moz-locale-dir(rtl) {

View File

@ -4026,7 +4026,7 @@ var XULBrowserWindow = {
get statusMeter () {
delete this.statusMeter;
return this.statusMeter = document.getElementById("statusbar-icon");
return this.statusMeter = document.getElementById("urlbar-progress");
},
get stopCommand () {
delete this.stopCommand;
@ -4162,7 +4162,7 @@ var XULBrowserWindow = {
this._progressCollapseTimer = 0;
}
else
this.statusMeter.parentNode.collapsed = false;
this.statusMeter.collapsed = false;
// XXX: This needs to be based on window activity...
this.stopCommand.removeAttribute("disabled");
@ -4226,7 +4226,7 @@ var XULBrowserWindow = {
// Turn the progress meter and throbber off.
this._progressCollapseTimer = setTimeout(function (self) {
self.statusMeter.parentNode.collapsed = true;
self.statusMeter.collapsed = true;
self._progressCollapseTimer = 0;
}, 100, this);

View File

@ -953,6 +953,7 @@
tooltiptext="&goEndCap.tooltip;"
onclick="gURLBar.handleCommand(event);"/>
</hbox>
<progressmeter id="urlbar-progress" mode="normal"/>
<toolbarbutton id="urlbar-go-button"
onclick="gURLBar.handleCommand(event);"
tooltiptext="&goEndCap.tooltip;"/>
@ -1287,9 +1288,6 @@
#endif
>
<statusbarpanel id="statusbar-display" label="" flex="1"/>
<statusbarpanel class="statusbarpanel-progress" collapsed="true" id="statusbar-progresspanel">
<progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/>
</statusbarpanel>
<statusbarpanel id="download-monitor" class="statusbarpanel-iconic-text"
tooltiptext="&downloadMonitor2.tooltip;" hidden="true"
command="Tools:Downloads"/>

View File

@ -47,53 +47,58 @@
<binding id="urlbar" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete">
<content sizetopopup="pref">
<xul:hbox class="urlbar-frontcap-and-textbox" flex="1">
<xul:hbox class="urlbar-frontcap">
<children includes="image|deck|stack|box">
<xul:image class="autocomplete-icon" allowevents="true"/>
</children>
</xul:hbox>
<xul:stack anonid="stack" class="urlbar-stack" flex="1">
<xul:scrollbox class="urlbar-over-link-layer" flex="1"
xbl:inherits="overlinkstate" align="center">
<xul:label anonid="origin-label" class="urlbar-origin-label" flex="1"
crop="end"/>
<xul:hbox anonid="over-link-box" class="urlbar-over-link-box"
xbl:inherits="overlinkstate" align="center">
<xul:label anonid="over-link-host-label"
class="urlbar-over-link-host-label"/>
<xul:label anonid="over-link-path-label"
class="urlbar-over-link-path-label" flex="1"/>
</xul:hbox>
</xul:scrollbox>
<xul:hbox anonid="textbox-container"
class="autocomplete-textbox-container urlbar-textbox-container"
flex="1" xbl:inherits="focused,overlinkstate">
<xul:hbox anonid="textbox-input-box"
class="textbox-input-box urlbar-input-box"
flex="1" xbl:inherits="tooltiptext=inputtooltiptext">
<xul:vbox class="urlbar-contents" flex="1">
<xul:hbox class="urlbar-frontcap-and-textbox" flex="1">
<xul:hbox class="urlbar-frontcap">
<children includes="image|deck|stack|box">
<xul:image class="autocomplete-icon" allowevents="true"/>
</children>
</xul:hbox>
<xul:stack anonid="stack" class="urlbar-stack" flex="1">
<xul:scrollbox class="urlbar-over-link-layer" flex="1"
xbl:inherits="overlinkstate" align="center">
<xul:label anonid="origin-label" class="urlbar-origin-label" flex="1"
crop="end"/>
<xul:hbox anonid="over-link-box" class="urlbar-over-link-box"
xbl:inherits="overlinkstate" align="center">
<xul:label anonid="over-link-host-label"
class="urlbar-over-link-host-label"/>
<xul:label anonid="over-link-path-label"
class="urlbar-over-link-path-label" flex="1"/>
</xul:hbox>
</xul:scrollbox>
<xul:hbox anonid="textbox-container"
class="autocomplete-textbox-container urlbar-textbox-container"
flex="1" xbl:inherits="focused,overlinkstate">
<xul:hbox anonid="textbox-input-box"
class="textbox-input-box urlbar-input-box"
flex="1" xbl:inherits="tooltiptext=inputtooltiptext">
<xul:hbox class="urlbar-textbox-container-children"
xbl:inherits="overlinkstate">
<children/>
</xul:hbox>
<html:input anonid="input"
class="autocomplete-textbox urlbar-input textbox-input"
flex="1" allowevents="true"
xbl:inherits="tooltiptext=inputtooltiptext,onfocus,onblur,value,type,maxlength,disabled,size,readonly,placeholder,tabindex,accesskey"/>
</xul:hbox>
<xul:hbox class="urlbar-textbox-container-children"
xbl:inherits="overlinkstate">
<children/>
<children includes="hbox"/>
</xul:hbox>
<html:input anonid="input"
class="autocomplete-textbox urlbar-input textbox-input"
flex="1" allowevents="true"
xbl:inherits="tooltiptext=inputtooltiptext,onfocus,onblur,value,type,maxlength,disabled,size,readonly,placeholder,tabindex,accesskey"/>
</xul:hbox>
<xul:hbox class="urlbar-textbox-container-children"
xbl:inherits="overlinkstate">
<children includes="hbox"/>
</xul:hbox>
</xul:hbox>
</xul:stack>
</xul:hbox>
<xul:dropmarker anonid="historydropmarker"
class="autocomplete-history-dropmarker urlbar-history-dropmarker"
allowevents="true"
xbl:inherits="open,enablehistory,parentfocused=focused"/>
<xul:popupset anonid="popupset"
class="autocomplete-result-popupset"/>
</xul:stack>
<xul:dropmarker anonid="historydropmarker"
class="autocomplete-history-dropmarker urlbar-history-dropmarker"
allowevents="true"
xbl:inherits="open,enablehistory,parentfocused=focused"/>
<xul:popupset anonid="popupset"
class="autocomplete-result-popupset"/>
</xul:hbox>
<xul:vbox class="urlbar-progress-container" flex="1" pack="end">
<children includes="progressmeter"/>
</xul:vbox>
</xul:vbox>
<children includes="toolbarbutton"/>
</content>

View File

@ -953,6 +953,56 @@ toolbar[iconsize="small"] #sync-button[status="active"] {
margin: 0;
}
/* urlbar progress */
#urlbar-progress {
-moz-appearance: none;
min-height: 0px;
height: 3px;
border: 0;
margin: -2px 0 -1px;
background-color: transparent;
}
#urlbar-progress[busy][stalled][value="0"] {
/* TODO: add connecting state (bug 596812) */
}
#urlbar-progress > .progress-bar {
-moz-appearance: none;
min-width: 3px;
border-top: 1px solid rgba(100,100,100,.1);
border-bottom: 1px solid rgba(0,0,0,.2);
background-color: Highlight;
background-image: -moz-linear-gradient(left, rgba(255,255,255,.1) 50%,
rgba(255,255,255,.4) 90%,
rgba(255,255,255,.8));
}
#urlbar-progress > .progress-bar:-moz-locale-dir(rtl) {
background-image: -moz-linear-gradient(right, rgba(255,255,255,.1) 50%,
rgba(255,255,255,.4) 90%,
rgba(255,255,255,.8));
}
#urlbar-progress > .progress-remainder {
border-top: 1px solid rgba(100,100,100,.1);
border-bottom: 1px solid rgba(0,0,0,.2);
background-image: -moz-linear-gradient(right, ThreeDShadow 80%, ThreeDLightShadow);
}
#urlbar-progress > .progress-remainder:-moz-locale-dir(rtl) {
background-image: -moz-linear-gradient(left, ThreeDShadow 80%, ThreeDLightShadow);
}
.urlbar-contents {
-moz-margin-end: -2px;
}
.urlbar-history-dropmarker {
-moz-margin-end: 2px;
}
/* Favicon */
#page-proxy-favicon,
#urlbar-throbber {

View File

@ -912,6 +912,55 @@ statusbarpanel#statusbar-display {
margin: 0;
}
/* urlbar progress */
#urlbar-progress {
-moz-appearance: none;
height: 3px;
margin: -2px 0 -1px;
}
#urlbar-progress[busy][stalled][value="0"] {
/* TODO: add connecting state (bug 596812) */
}
#urlbar-progress > .progress-bar {
-moz-appearance: none;
border: 0;
border-top: 1px solid rgba(0,0,0,.4);
border-bottom: 1px solid rgba(0,0,0,.3);
-moz-background-origin: border;
background-image: -moz-linear-gradient(left, rgb(107,160,193), rgb(169,223,251));
}
#urlbar-progress > .progress-bar:-moz-window-inactive {
border-top: 1px solid rgba(0,0,0,.2);
border-bottom: 1px solid rgba(0,0,0,.1);
background-image: -moz-linear-gradient(left, rgb(150,150,150), rgb(210,210,210));
}
#urlbar-progress > .progress-bar:-moz-locale-dir(rtl) {
background-image: -moz-linear-gradient(right, rgb(107,160,193), rgb(169,223,251));
}
#urlbar-progress > .progress-bar:-moz-window-inactive:-moz-locale-dir(rtl) {
background-image: -moz-linear-gradient(right, rgb(150,150,150), rgb(210,210,210));
}
#urlbar-progress > .progress-remainder {
border-top: 1px solid rgba(0,0,0,.1);
border-bottom: 1px solid rgba(0,0,0,.1);
background-color: rgba(0,0,0,.3);
}
.urlbar-contents {
-moz-margin-end: -2px;
}
.urlbar-history-dropmarker {
-moz-margin-end: 2px;
}
/* ----- AUTOCOMPLETE ----- */
#treecolAutoCompleteImage {

View File

@ -1090,6 +1090,56 @@ html|*.urlbar-input:-moz-lwtheme:-moz-placeholder,
margin: 0;
}
/* urlbar progress */
#urlbar-progress {
-moz-appearance: none;
min-height: 0px;
height: 3px;
border: 0;
margin: -2px 0 -1px;
background-color: transparent;
}
#urlbar-progress[busy][stalled][value="0"] {
/* TODO: add connecting state (bug 596812) */
}
#urlbar-progress > .progress-bar {
-moz-appearance: none;
min-width: 3px;
border-top: 1px solid rgba(100,100,100,.1);
border-bottom: 1px solid rgba(0,0,0,.2);
background-color: Highlight;
background-image: -moz-linear-gradient(left, rgba(255,255,255,.1) 50%,
rgba(255,255,255,.4) 90%,
rgba(255,255,255,.8));
}
#urlbar-progress > .progress-bar:-moz-locale-dir(rtl) {
background-image: -moz-linear-gradient(right, rgba(255,255,255,.1) 50%,
rgba(255,255,255,.4) 90%,
rgba(255,255,255,.8));
}
#urlbar-progress > .progress-remainder {
border-top: 1px solid rgba(100,100,100,.1);
border-bottom: 1px solid rgba(0,0,0,.2);
background-image: -moz-linear-gradient(right, ThreeDShadow 80%, ThreeDLightShadow);
}
#urlbar-progress > .progress-remainder:-moz-locale-dir(rtl) {
background-image: -moz-linear-gradient(left, ThreeDShadow 80%, ThreeDLightShadow);
}
.urlbar-contents {
-moz-margin-end: -2px;
}
.urlbar-history-dropmarker {
-moz-margin-end: 2px;
}
/* identity box */
#identity-box {