Bug 1194842 - Fix the width calculation of the textbox for editable XUL tree cells in RTL mode; r=jaws a=ritu
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 04 Sep 2015 13:34:10 -0400
changeset 282192 10f2173c5eebe4378ae5afce61528e1ae992daa8
parent 282191 da0ee59da1bac4c17b507dc0be20a1300d5fc487
child 282193 8008235a2429060025d736c2063ef53806427832
push id5046
push userkwierso@gmail.com
push dateWed, 09 Sep 2015 20:09:47 +0000
treeherdermozilla-beta@997cb9b3e15d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, ritu
bugs1194842
milestone41.0
Bug 1194842 - Fix the width calculation of the textbox for editable XUL tree cells in RTL mode; r=jaws a=ritu
toolkit/content/widgets/tree.xml
--- a/toolkit/content/widgets/tree.xml
+++ b/toolkit/content/widgets/tree.xml
@@ -365,17 +365,17 @@
             var topadj = parseInt(style.borderTopWidth) + parseInt(style.paddingTop);
             input.top = textRect.y - topadj;
 
             // The leftside of the textbox is aligned to the left side of the text
             // in LTR mode, and left side of the cell in RTL mode.
             var left, widthdiff;
             if (style.direction == "rtl") {
               left = cellRect.x;
-              widthdiff = cellRect.x + cellRect.width - textRect.x - textRect.width;
+              widthdiff = cellRect.x - textRect.x;
             } else {
               left = textRect.x;
               widthdiff = textRect.x - cellRect.x;
             }
 
             input.left = left;
             input.height = textRect.height + topadj +
                            parseInt(style.borderBottomWidth) +