Bug 1684641 - fixed gtk3drawing.cpp: do not use 'else' after 'return' r=stransky
authorAnurag Akella <anuragakellaak@gmail.com>
Mon, 04 Jan 2021 14:38:47 +0000
changeset 561997 84b14eca730aa066171b97cd4442596b7c1e4717
parent 561996 d9a0d4e6ef0d750604eb3ad461c9897416950f8a
child 561998 538b3438ea17555a7418c1397df560a2797aa566
push id38079
push userncsoregi@mozilla.com
push dateTue, 05 Jan 2021 21:56:58 +0000
treeherdermozilla-central@bcfbf7c9d108 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersstransky
bugs1684641
milestone86.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 1684641 - fixed gtk3drawing.cpp: do not use 'else' after 'return' r=stransky Differential Revision: https://phabricator.services.mozilla.com/D100651
widget/gtk/gtk3drawing.cpp
--- a/widget/gtk/gtk3drawing.cpp
+++ b/widget/gtk/gtk3drawing.cpp
@@ -3071,24 +3071,25 @@ gint moz_gtk_widget_paint(WidgetNodeType
     case MOZ_GTK_SCROLLBAR_VERTICAL:
       if (flags & MOZ_GTK_TRACK_OPAQUE) {
         GtkStyleContext* style = GetStyleContext(MOZ_GTK_WINDOW, direction);
         gtk_render_background(style, cr, rect->x, rect->y, rect->width,
                               rect->height);
       }
       if (gtk_check_version(3, 20, 0) == nullptr) {
         return moz_gtk_scrollbar_paint(widget, cr, rect, state, direction);
-      } else {
+      }
+      {
         WidgetNodeType trough_widget = (widget == MOZ_GTK_SCROLLBAR_HORIZONTAL)
                                            ? MOZ_GTK_SCROLLBAR_TROUGH_HORIZONTAL
                                            : MOZ_GTK_SCROLLBAR_TROUGH_VERTICAL;
         return moz_gtk_scrollbar_trough_paint(trough_widget, cr, rect, state,
                                               direction);
+        break;
       }
-      break;
     case MOZ_GTK_SCROLLBAR_TROUGH_HORIZONTAL:
     case MOZ_GTK_SCROLLBAR_TROUGH_VERTICAL:
       if (gtk_check_version(3, 20, 0) == nullptr) {
         return moz_gtk_scrollbar_trough_paint(widget, cr, rect, state,
                                               direction);
       }
       break;
     case MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL: