Bug 1287278 - dropmaker-icon direction is wrong in RTL locale on Linux. r?karlt draft
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 28 Sep 2016 17:36:16 +0900
changeset 418323 54fb3bc6455f2117cb0ddae06c4f895f58204d0f
parent 417914 66a77b9bfe5dcacd50eccf85de7c0e7e15ce0ffd
child 532328 cf49855c4a9c90ca0d40f38e215637adaa7aaf7a
push id30664
push userm_kato@ga2.so-net.ne.jp
push dateWed, 28 Sep 2016 08:42:51 +0000
reviewerskarlt
bugs1287278
milestone52.0a1
Bug 1287278 - dropmaker-icon direction is wrong in RTL locale on Linux. r?karlt MozReview-Commit-ID: 3mMCAGCIUYP
widget/gtk/gtk3drawing.cpp
--- a/widget/gtk/gtk3drawing.cpp
+++ b/widget/gtk/gtk3drawing.cpp
@@ -1258,18 +1258,21 @@ static gint
 moz_gtk_arrow_paint(cairo_t *cr, GdkRectangle* rect,
                     GtkWidgetState* state,
                     GtkArrowType arrow_type, GtkTextDirection direction)
 {
     GdkRectangle arrow_rect;
     gdouble arrow_angle;
 
     if (direction == GTK_TEXT_DIR_RTL) {
-        arrow_type = (arrow_type == GTK_ARROW_LEFT) ?
-                         GTK_ARROW_RIGHT : GTK_ARROW_LEFT;
+        if (arrow_type == GTK_ARROW_LEFT) {
+            arrow_type = GTK_ARROW_RIGHT;
+        } else if (arrow_type == GTK_ARROW_RIGHT) {
+            arrow_type = GTK_ARROW_LEFT;
+        }
     }
     switch (arrow_type) {
     case GTK_ARROW_LEFT:
         arrow_angle = ARROW_LEFT;
         break;
     case GTK_ARROW_RIGHT:
         arrow_angle = ARROW_RIGHT;
         break;