Bug 630564 - Ctrl+Shift+X in the location bar in RTL mode should change the text alignment in addition to directionality; r=roc a=blocking-final+
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 03 Feb 2011 01:31:14 -0500
changeset 61845 108aec53a28051831834d4f909e1336046c57dcb
parent 61844 dfe5ab77a706b6d795d406b9a13f56c666e8cc0c
child 61846 ba7090bbf9fe42387f589659f75686517e9f4838
push id18519
push usereakhgari@mozilla.com
push dateThu, 03 Feb 2011 16:57:38 +0000
treeherdermozilla-central@108aec53a280 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, blocking-final
bugs630564
milestone2.0b12pre
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 630564 - Ctrl+Shift+X in the location bar in RTL mode should change the text alignment in addition to directionality; r=roc a=blocking-final+
browser/base/content/browser.css
layout/style/forms.css
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -202,17 +202,16 @@ splitmenu {
   -moz-binding: url(chrome://browser/content/urlbarBindings.xml#urlbar);
 }
 
 .uri-element-right-align:-moz-locale-dir(rtl),
 html|input.uri-element-right-align:-moz-locale-dir(rtl),
 .ac-url-text:-moz-locale-dir(rtl),
 .ac-title:-moz-locale-dir(rtl) > description {
   direction: ltr !important;
-  text-align: right !important;
 }
 
 /* For results that are actions, their description text is shown instead of
    the URL - this needs to follow the locale's direction, unlike URLs. */
 panel:not([noactions]) > richlistbox > richlistitem[type~="action"]:-moz-locale-dir(rtl) > .ac-url-box {
   direction: rtl;
 }
 
--- a/layout/style/forms.css
+++ b/layout/style/forms.css
@@ -109,16 +109,30 @@ input {
 }
 
 input > .anonymous-div {
   word-wrap: normal !important;
   /* Make the line-height equal to the available height */
   line-height: -moz-block-height;
 }
 
+/* Make sure that the location bar's alignment in RTL mode changes according
+   to the input box direction if the user switches the text direction using
+   cmd_switchTextDirection (which applies a dir attribute to the input box's
+   anonymous div. */
+@-moz-document url-prefix(chrome://) {
+  input.uri-element-right-align:-moz-locale-dir(rtl) > .anonymous-div {
+    text-align: right !important;
+  }
+
+  input.uri-element-right-align:-moz-locale-dir(rtl) > .anonymous-div[dir=ltr] {
+    text-align: left !important;
+  }
+}
+
 textarea {
   margin: 1px 0 1px 0;
   border: 2px inset ThreeDFace;
   background-color: -moz-Field;
   color: -moz-FieldText;
   font: medium -moz-fixed;
   text-rendering: optimizeLegibility;
   text-align: start;