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 277571 878d039dea2e8ffced1ff33e5524ecaed251a48e
parent 277570 937cd325aca5672011622d28cdb6cc2893323647
child 277572 22c0d857e4c4ec624a4a1a90828952362e903d77
push id8406
push userkwierso@gmail.com
push dateWed, 09 Sep 2015 19:21:44 +0000
treeherdermozilla-aurora@a8459b40a444 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, ritu
bugs1194842
milestone42.0a2
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) +