Bug 1367576 - Remove unused ishtml parameter to moz_gtk_get_widget_border. r=karlt
authorL. David Baron <dbaron@dbaron.org>
Tue, 06 Jun 2017 22:27:17 -0700
changeset 413119 05cb421de1c392e23da293e03dd2d28a3d65457d
parent 413118 3853c5543f6e4e8ef24cc1ac47be5a65e4b672e0
child 413120 db68e1963b3974821cc065440f1b693a82721619
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1367576
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1367576 - Remove unused ishtml parameter to moz_gtk_get_widget_border. r=karlt This was needed for the (now-unused) GTK2 version of the code. MozReview-Commit-ID: GocgC4OZ76p
widget/gtk/gtk3drawing.cpp
widget/gtk/gtkdrawing.h
widget/gtk/nsNativeThemeGTK.cpp
--- a/widget/gtk/gtk3drawing.cpp
+++ b/widget/gtk/gtk3drawing.cpp
@@ -2069,18 +2069,17 @@ GetMarginBorderPadding(GtkStyleContext* 
     result.right = right;
     result.top = top;
     result.bottom = bottom;
     return result;
 }
 
 gint
 moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top,
-                          gint* right, gint* bottom, GtkTextDirection direction,
-                          gboolean inhtml)
+                          gint* right, gint* bottom, GtkTextDirection direction)
 {
     GtkWidget* w;
     GtkStyleContext* style;
     *left = *top = *right = *bottom = 0;
 
     switch (widget) {
     case MOZ_GTK_BUTTON:
     case MOZ_GTK_TOOLBAR_BUTTON:
--- a/widget/gtk/gtkdrawing.h
+++ b/widget/gtk/gtkdrawing.h
@@ -352,24 +352,21 @@ moz_gtk_widget_paint(WidgetNodeType widg
 
 
 /*** Widget metrics ***/
 /**
  * Get the border size of a widget
  * left/right:  [OUT] the widget's left/right border
  * top/bottom:  [OUT] the widget's top/bottom border
  * direction:   the text direction for the widget
- * inhtml:      boolean indicating whether this widget will be drawn as a HTML form control,
- *              in order to workaround a size issue (MOZ_GTK_BUTTON only, ignored otherwise)
  *
  * returns:    MOZ_GTK_SUCCESS if there was no error, an error code otherwise
  */
 gint moz_gtk_get_widget_border(WidgetNodeType widget, gint* left, gint* top,
-                               gint* right, gint* bottom, GtkTextDirection direction,
-                               gboolean inhtml);
+                               gint* right, gint* bottom, GtkTextDirection direction);
 
 /**
  * Get the border size of a notebook tab
  * left/right:  [OUT] the tab's left/right border
  * top/bottom:  [OUT] the tab's top/bottom border
  * direction:   the text direction for the widget
  * flags:       tab-dependant flags; see the GtkTabFlags definition.
  * widget:      tab widget
--- a/widget/gtk/nsNativeThemeGTK.cpp
+++ b/widget/gtk/nsNativeThemeGTK.cpp
@@ -1333,18 +1333,17 @@ nsNativeThemeGTK::GetWidgetBorder(nsDevi
     MOZ_FALLTHROUGH;
   default:
     {
       WidgetNodeType gtkWidgetType;
       gint unusedFlags;
       if (GetGtkWidgetAndState(aWidgetType, aFrame, gtkWidgetType, nullptr,
                                &unusedFlags)) {
         moz_gtk_get_widget_border(gtkWidgetType, &aResult->left, &aResult->top,
-                                  &aResult->right, &aResult->bottom, direction,
-                                  IsFrameContentNodeInNamespace(aFrame, kNameSpaceID_XHTML));
+                                  &aResult->right, &aResult->bottom, direction);
       }
     }
   }
 
   gint scale = ScreenHelperGTK::GetGTKMonitorScaleFactor();
   aResult->top *= scale;
   aResult->right *= scale;
   aResult->bottom *= scale;
@@ -1385,18 +1384,18 @@ nsNativeThemeGTK::GetWidgetPadding(nsDev
         if (!IsRegularMenuItem(aFrame))
           return false;
 
         aResult->SizeTo(0, 0, 0, 0);
         WidgetNodeType gtkWidgetType;
         if (GetGtkWidgetAndState(aWidgetType, aFrame, gtkWidgetType, nullptr,
                                  nullptr)) {
           moz_gtk_get_widget_border(gtkWidgetType, &aResult->left, &aResult->top,
-                                    &aResult->right, &aResult->bottom, GetTextDirection(aFrame),
-                                    IsFrameContentNodeInNamespace(aFrame, kNameSpaceID_XHTML));
+                                    &aResult->right, &aResult->bottom,
+                                    GetTextDirection(aFrame));
         }
 
         gint horizontal_padding;
 
         if (aWidgetType == NS_THEME_MENUITEM)
           moz_gtk_menuitem_get_horizontal_padding(&horizontal_padding);
         else
           moz_gtk_checkmenuitem_get_horizontal_padding(&horizontal_padding);