Bug 897066 - Underline tab titles if the tab is remote (r=gavin)
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -1324,16 +1324,21 @@
// Change the "remote" attribute.
let parent = aBrowser.parentNode;
parent.removeChild(aBrowser);
aBrowser.setAttribute("remote", aRemote ? "true" : "false");
parent.appendChild(aBrowser);
// Restore the progress listener.
aBrowser.webProgress.addProgressListener(filter, Ci.nsIWebProgress.NOTIFY_ALL);
+
+ if (aRemote)
+ tab.setAttribute("remote", "true");
+ else
+ tab.removeAttribute("remote");
]]>
</body>
</method>
<!--
Returns true if we want to load the content for this URL in a
remote process. Eventually this should just check whether aURL
is unprivileged. Right now, though, we would like to load
@@ -1406,16 +1411,18 @@
if (!aURI || isBlankPageURL(aURI))
t.setAttribute("label", this.mStringBundle.getString("tabs.emptyTabTitle"));
else
t.setAttribute("label", aURI);
t.setAttribute("crop", "end");
t.setAttribute("onerror", "this.removeAttribute('image');");
+ if (remote)
+ t.setAttribute("remote", "true");
t.className = "tabbrowser-tab";
this.tabContainer._unlockTabSizing();
// When overflowing, new tabs are scrolled into view smoothly, which
// doesn't go well together with the width transition. So we skip the
// transition in that case.
let animate = !aSkipAnimation &&
@@ -2903,16 +2910,17 @@
<constructor>
<![CDATA[
let browserStack = document.getAnonymousElementByAttribute(this, "anonid", "browserStack");
this.mCurrentBrowser = document.getAnonymousElementByAttribute(this, "anonid", "initialBrowser");
if (Services.prefs.getBoolPref("browser.tabs.remote")) {
browserStack.removeChild(this.mCurrentBrowser);
this.mCurrentBrowser.setAttribute("remote", true);
browserStack.appendChild(this.mCurrentBrowser);
+ this.tabContainer.firstChild.setAttribute("remote", "true");
}
this.mCurrentTab = this.tabContainer.firstChild;
document.addEventListener("keypress", this, false);
window.addEventListener("sizemodechange", this, false);
var uniqueId = "panel" + Date.now();
this.mPanelContainer.childNodes[0].id = uniqueId;
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -1657,16 +1657,20 @@ richlistitem[type~="action"][actiontype=
}
.tabbrowser-tab[selected="true"] {
background-image: linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 32%),
linear-gradient(-moz-dialog, -moz-dialog);
color: -moz-dialogtext;
}
+.tabbrowser-tab[remote] {
+ text-decoration: underline;
+}
+
#main-window[tabsontop=false]:not([disablechrome]) .tabbrowser-tab[selected=true]:not(:-moz-lwtheme) {
background-image: linear-gradient(to top, rgba(0,0,0,.3) 1px, transparent 1px),
linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 32%),
linear-gradient(-moz-dialog, -moz-dialog);
}
.tabbrowser-tab[selected="true"]:-moz-lwtheme {
background-image: linear-gradient(@selectedTabHighlight@, @toolbarHighlight@ 32%);
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -2252,16 +2252,20 @@ toolbarbutton.chevron > .toolbarbutton-m
text-shadow: @loweredShadow@;
margin: 0;
padding: 0;
border: none;
text-align: center;
-moz-box-align: stretch;
}
+.tabbrowser-tab[remote] {
+ text-decoration: underline;
+}
+
%define TABSONTOP_TAB #tabbrowser-tabs[tabsontop="true"] > .tabbrowser-tab
%define TABSONBOTTOM_TAB #tabbrowser-tabs[tabsontop="false"] > .tabbrowser-tab
%define TABSONTOP_TAB_STACK #tabbrowser-tabs[tabsontop="true"] > .tabbrowser-tab > .tab-stack
%define TABSONBOTTOM_TAB_STACK #tabbrowser-tabs[tabsontop="false"] > .tabbrowser-tab > .tab-stack
%define TABSONTOP_NEWTAB_BUTTON #tabbrowser-tabs[tabsontop="true"] > .tabbrowser-arrowscrollbox > .tabs-newtab-button
%define TABSONBOTTOM_NEWTAB_BUTTON #tabbrowser-tabs[tabsontop="false"] > .tabbrowser-arrowscrollbox > .tabs-newtab-button
@TABSONTOP_TAB_STACK@ > .tab-background {
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -1966,16 +1966,20 @@ richlistitem[type~="action"][actiontype=
margin: 0;
padding: 2px 0 4px;
border-width: 4px 3px 0;
border-style: solid;
border-image: url(tabbrowser/tab.png) 4 3 0 fill repeat stretch;
border-radius: 0;
}
+.tabbrowser-tab[remote] {
+ text-decoration: underline;
+}
+
.tabbrowser-tab:hover,
.tabs-newtab-button:hover {
background-image: @toolbarShadowOnTab@, @bgTabTextureHover@,
linear-gradient(-moz-dialog, -moz-dialog);
}
%ifndef WINDOWS_AERO
@media (-moz-windows-theme: luna-blue) {