Bug 633390 - Crop long link URLs in the middle instead of at the end. ui-r=faaborg r+a=gavin
authorDão Gottwald <dao@mozilla.com>
Mon, 28 Feb 2011 12:58:44 +0100
changeset 63166 19160e387553b117dc7a95eff27a48d3f818cb5a
parent 63165 1cb5acba0d4f86dd5accfcbb36e6d14f8ae8bfea
child 63167 4f2b60e7cd68448f27491feed55d52d271a9a2b2
push idunknown
push userunknown
push dateunknown
reviewersfaaborg
bugs633390
milestone2.0b13pre
first release with
nightly win64
19160e387553 / 4.0b13pre / 20110228030201 / files
nightly linux32
nightly linux64
nightly mac
nightly win32
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly win64
Bug 633390 - Crop long link URLs in the middle instead of at the end. ui-r=faaborg r+a=gavin
browser/base/content/browser.js
browser/base/content/tabbrowser.xml
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4173,16 +4173,17 @@ var XULBrowserWindow = {
 
     // check the current value so we don't trigger an attribute change
     // and cause needless (slow!) UI updates
     if (this.statusText != text) {
       let field = this.statusTextField;
       field.setAttribute("previoustype", field.getAttribute("type"));
       field.setAttribute("type", type);
       field.label = text;
+      field.setAttribute("crop", type == "overLink" ? "center" : "end");
       this.statusText = text;
     }
   },
 
   // Called before links are navigated to to allow us to retarget them if needed.
   onBeforeLinkTraversal: function(originalTarget, linkURI, linkNode, isAppTab) {
     // Don't modify non-default targets or targets that aren't in top-level app
     // tab docshells (isAppTab will be false for app tab subframes).
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -3733,17 +3733,17 @@
     </handlers>
   </binding>
 
   <binding id="statuspanel" display="xul:hbox">
     <content>
       <xul:hbox class="statuspanel-inner">
         <xul:label class="statuspanel-label"
                    role="status"
-                   xbl:inherits="value=label,mirror"
+                   xbl:inherits="value=label,crop,mirror"
                    flex="1"
                    crop="end"/>
       </xul:hbox>
     </content>
 
     <implementation>
       <property name="label">
         <setter><![CDATA[