diff --git a/widget/gtk/nsNativeThemeGTK.cpp b/widget/gtk/nsNativeThemeGTK.cpp index eeb9344f5b32..9e0aa558b1f0 100644 --- a/widget/gtk/nsNativeThemeGTK.cpp +++ b/widget/gtk/nsNativeThemeGTK.cpp @@ -1095,7 +1095,14 @@ nsNativeThemeGTK::DrawWidgetBackground(nsRenderingContext* aContext, { GtkWidgetState state; WidgetNodeType gtkWidgetType; - GtkTextDirection direction = GetTextDirection(aFrame); + // For resizer drawing, we want IsFrameRTL, which treats vertical-rl modes + // as right-to-left (in addition to horizontal text with direction=RTL), + // rather than just considering the text direction. + // This will make resizers on vertically-oriented elements render properly. + GtkTextDirection direction = + aWidgetType == NS_THEME_RESIZER + ? (IsFrameRTL(aFrame) ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR) + : GetTextDirection(aFrame); gint flags; if (!GetGtkWidgetAndState(aWidgetType, aFrame, gtkWidgetType, &state, &flags))