Bug 1194842 - Fix the width calculation of the textbox for editable XUL tree cells in RTL mode; r=jaws
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 04 Sep 2015 13:34:10 -0400
changeset 294053 8758ef717d4277ecb684d989385d4f4fc35c32a6
parent 294052 0a2a9972b4c74b55a8d19ca8add2ff4baf84ace0
child 294054 0cac9265651a6a82ff2638eb36668445885213c2
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1194842
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1194842 - Fix the width calculation of the textbox for editable XUL tree cells in RTL mode; r=jaws
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) +