bug 1301194 don't modify the direction when fetching a cached style context if no direction is explicitly requested r?stransky draft
authorKarl Tomlinson <karlt+@karlt.net>
Wed, 07 Sep 2016 21:18:27 +1200
changeset 411295 53da5c41e263c08d5abe52be8cf1002f5f47f507
parent 411294 2ed5d24007c9995a0e3dc5e8cffe4be1ff415efb
child 530714 4465a373e976099970e424e5c895686a1ead6ef3
push id28878
push userktomlinson@mozilla.com
push dateWed, 07 Sep 2016 22:16:10 +0000
reviewersstransky
bugs1301194
milestone51.0a1
bug 1301194 don't modify the direction when fetching a cached style context if no direction is explicitly requested r?stransky This is important for RTL locales which are drawn with explicit direction but measured with no direction. MozReview-Commit-ID: C4k5vgpKggD
widget/gtk/WidgetStyleCache.h
--- a/widget/gtk/WidgetStyleCache.h
+++ b/widget/gtk/WidgetStyleCache.h
@@ -32,17 +32,17 @@ CreateStyleForWidget(GtkWidget* aWidget,
 GtkStyleContext*
 CreateCSSNode(const char*      aName,
               GtkStyleContext* aParentStyle,
               GType            aType = G_TYPE_NONE);
 
 // Callers must call ReleaseStyleContext() on the returned context.
 GtkStyleContext*
 ClaimStyleContext(WidgetNodeType aNodeType,
-                  GtkTextDirection aDirection = GTK_TEXT_DIR_LTR,
+                  GtkTextDirection aDirection = GTK_TEXT_DIR_NONE,
                   GtkStateFlags aStateFlags = GTK_STATE_FLAG_NORMAL,
                   StyleFlags aFlags = NO_STYLE_FLAGS);
 void
 ReleaseStyleContext(GtkStyleContext* style);
 
 void
 ResetWidgetCache(void);