Bug 1287278 - dropmaker-icon direction is wrong in RTL locale on Linux. r=karlt a=ritu
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 14 Oct 2016 13:37:08 +0900
changeset 350723 0df0ba10bc150c1485381f9243d87ccd4dd218b7
parent 350722 4411f5cae61678ffc2be3556ea708f9dfe9fa727
child 350724 2f3602ef7f015df38f0aed5c6d33864f47762e4f
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt, ritu
bugs1287278
milestone50.0
Bug 1287278 - dropmaker-icon direction is wrong in RTL locale on Linux. r=karlt a=ritu Change only right arrows to left arrows when direction is RTL MozReview-Commit-ID: 3mMCAGCIUYP
widget/gtk/gtk3drawing.cpp
--- a/widget/gtk/gtk3drawing.cpp
+++ b/widget/gtk/gtk3drawing.cpp
@@ -1410,18 +1410,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;