Bug 1287278 - dropmaker-icon direction is wrong in RTL locale on Linux. r?karlt
MozReview-Commit-ID: 3mMCAGCIUYP
--- 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;