Title: [91904] branches/chromium/782/Source/WebCore
Revision
91904
Author
tk...@chromium.org
Date
2011-07-27 22:05:26 -0700 (Wed, 27 Jul 2011)

Log Message

2011-07-27  Kent Tamura  <tk...@chromium.org>

        REGRESSION: [Chromium/782] Speech icon should be on the left side for dir=rtl
        https://bugs.webkit.org/show_bug.cgi?id=65239

        Reviewed by Ryosuke Niwa.

        * rendering/RenderTextControlSingleLine.cpp:
        (WebCore::RenderTextControlSingleLine::layout):
        For RTL, move the speech button to the left side and shift the
        inner text to the right by the width of the speech button and the
        spin button.

Modified Paths

Diff

Modified: branches/chromium/782/Source/WebCore/ChangeLog (91903 => 91904)


--- branches/chromium/782/Source/WebCore/ChangeLog	2011-07-28 04:59:12 UTC (rev 91903)
+++ branches/chromium/782/Source/WebCore/ChangeLog	2011-07-28 05:05:26 UTC (rev 91904)
@@ -1,3 +1,16 @@
+2011-07-27  Kent Tamura  <tk...@chromium.org>
+
+        REGRESSION: [Chromium/782] Speech icon should be on the left side for dir=rtl
+        https://bugs.webkit.org/show_bug.cgi?id=65239
+
+        Reviewed by Ryosuke Niwa.
+
+        * rendering/RenderTextControlSingleLine.cpp:
+        (WebCore::RenderTextControlSingleLine::layout):
+        For RTL, move the speech button to the left side and shift the
+        inner text to the right by the width of the speech button and the
+        spin button.
+
 2011-07-19  Steve Lacey  <s...@chromium.org>
 
         [chromium] Media player controls do not fade out.

Modified: branches/chromium/782/Source/WebCore/rendering/RenderTextControlSingleLine.cpp (91903 => 91904)


--- branches/chromium/782/Source/WebCore/rendering/RenderTextControlSingleLine.cpp	2011-07-28 04:59:12 UTC (rev 91903)
+++ branches/chromium/782/Source/WebCore/rendering/RenderTextControlSingleLine.cpp	2011-07-28 05:05:26 UTC (rev 91904)
@@ -338,8 +338,10 @@
             RenderBox* spinBox = innerSpinButtonElement() ? innerSpinButtonElement()->renderBox() : 0;
             if (style()->isLeftToRightDirection())
                 x -= spinBox ? spinBox->width() : 0;
-            else
-                innerTextRenderer->setX(paddingLeft() + borderLeft() + (spinBox ? spinBox->width() : 0));
+            else {
+                x = borderLeft() + paddingLeft() + (spinBox ? spinBox->width() : 0);
+                innerTextRenderer->setX(x + button->width());
+            }
             int y = (height() - button->height()) / 2;
             button->setLocation(IntPoint(x, y));
         }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to