Bug 634377 - Allow scrolling if scrollbox is not already at zero. [r=mbrubeck, a=blocking]
authorWes Johnston <wjohnston@mozilla.com>
Fri, 25 Feb 2011 10:11:21 -0800
changeset 2829 55eb906676b6bab989057461f9429ee518d18bf7
parent 2828 5d257f348005f9c2eee2d8e230aea32494eeac32
child 2830 c7ae590eca80a3c62919fc318dd287a0783330d9
push id2375
push userwjohnston@mozilla.com
push dateFri, 25 Feb 2011 18:12:35 +0000
reviewersmbrubeck, blocking
bugs634377
Bug 634377 - Allow scrolling if scrollbox is not already at zero. [r=mbrubeck, a=blocking]
chrome/content/input.js
themes/core/platform.css
--- a/chrome/content/input.js
+++ b/chrome/content/input.js
@@ -588,20 +588,23 @@ var ScrollUtils = {
 
   /**
    * The default dragger object used by MouseModule when dragging a scrollable
    * element that provides no customDragger.  Simply performs the expected
    * regular scrollBy calls on the scroller.
    */
   _defaultDragger: {
     isDraggable: function isDraggable(target, scroller) {
-      let sX = {}, sY = {};
+      let sX = {}, sY = {},
+          pX = {}, pY = {};
+      scroller.getPosition(pX, pY);
       scroller.getScrolledSize(sX, sY);
       let rect = target.getBoundingClientRect();
-      return { x: sX.value > rect.width, y: sY.value > rect.height };
+      return { x: (sX.value > rect.width  || pX.value != 0),
+               y: (sY.value > rect.height || pY.value != 0) };
     },
 
     dragStart: function dragStart(cx, cy, target, scroller) {
       scroller.element.addEventListener("PanBegin", this._showScrollbars, false);
     },
 
     dragStop: function dragStop(dx, dy, scroller) {
       scroller.element.removeEventListener("PanBegin", this._showScrollbars, false);
--- a/themes/core/platform.css
+++ b/themes/core/platform.css
@@ -409,29 +409,32 @@ richlistitem description.title {
   font-size: @font_normal@ !important;
 }
 
 richlistitem label.normal,
 richlistitem description.normal {
   color: gray;
   font-size: @font_small@ !important;
   white-space: pre-wrap;
+  word-wrap: break-word;
 }
 
 richlistitem label.normal-black,
 richlistitem description.normal-black {
   font-size: @font_small@  !important;
   white-space: pre-wrap;
+  word-wrap: break-word;
 }
 
 richlistitem label.normal-bold,
 richlistitem description.normal-bold {
   font-weight: bold;
   font-size: @font_small@  !important;
   white-space: pre-wrap;
+  word-wrap: break-word;
 }
 
 richlistitem[selected="true"] {
   color: black;
   background-color: white;
 }
 
 richlistitem:hover:active:not([selected="true"]):not([nohighlight="true"]) {