Bug 1274368 - Draw resizer as RTL for elements with vertical-rl writing mode. r=dholbert

This commit is contained in:
Jonathan Kew
2016-05-21 13:59:25 +01:00
parent 2b2b52b6ca
commit b87792ac80

View File

@@ -1095,7 +1095,14 @@ nsNativeThemeGTK::DrawWidgetBackground(nsRenderingContext* aContext,
{ {
GtkWidgetState state; GtkWidgetState state;
WidgetNodeType gtkWidgetType; 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; gint flags;
if (!GetGtkWidgetAndState(aWidgetType, aFrame, gtkWidgetType, &state, if (!GetGtkWidgetAndState(aWidgetType, aFrame, gtkWidgetType, &state,
&flags)) &flags))