Bug 1491374 - Don't use backdrop state for scrollbars, r=jhorak
authorMartin Stransky <stransky@redhat.com>
Thu, 20 Sep 2018 14:15:30 +0000
changeset 437450 09210ae19019330ec2581480ba719176a309e98c
parent 437449 236d827dc1c5a6a25afa6486f86e50ad2725fb26
child 437451 83eda6b67672b552fa453529410972e11d3cf250
push id34683
push userapavel@mozilla.com
push dateThu, 20 Sep 2018 21:54:05 +0000
treeherdermozilla-central@4d3cd0ab7277 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjhorak
bugs1491374
milestone64.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 1491374 - Don't use backdrop state for scrollbars, r=jhorak Differential Revision: https://phabricator.services.mozilla.com/D6396
widget/gtk/nsNativeThemeGTK.cpp
--- a/widget/gtk/nsNativeThemeGTK.cpp
+++ b/widget/gtk/nsNativeThemeGTK.cpp
@@ -454,30 +454,16 @@ nsNativeThemeGTK::GetGtkWidgetAndState(S
     if (aWidgetType == StyleAppearance::MozWindowTitlebar ||
         aWidgetType == StyleAppearance::MozWindowTitlebarMaximized ||
         aWidgetType == StyleAppearance::MozWindowButtonClose ||
         aWidgetType == StyleAppearance::MozWindowButtonMinimize ||
         aWidgetType == StyleAppearance::MozWindowButtonMaximize ||
         aWidgetType == StyleAppearance::MozWindowButtonRestore) {
       aState->backdrop = !nsWindow::GetTopLevelWindowActiveState(aFrame);
     }
-
-    if (aWidgetType ==  StyleAppearance::ScrollbarbuttonUp ||
-        aWidgetType ==  StyleAppearance::ScrollbarbuttonDown ||
-        aWidgetType ==  StyleAppearance::ScrollbarbuttonLeft ||
-        aWidgetType ==  StyleAppearance::ScrollbarbuttonRight ||
-        aWidgetType == StyleAppearance::ScrollbarVertical ||
-        aWidgetType == StyleAppearance::ScrollbarHorizontal ||
-        aWidgetType == StyleAppearance::ScrollbartrackHorizontal ||
-        aWidgetType == StyleAppearance::ScrollbartrackVertical ||
-        aWidgetType == StyleAppearance::ScrollbarthumbVertical||
-        aWidgetType == StyleAppearance::ScrollbarthumbHorizontal) {
-      EventStates docState = aFrame->GetContent()->OwnerDoc()->GetDocumentState();
-      aState->backdrop = docState.HasState(NS_DOCUMENT_STATE_WINDOW_INACTIVE);
-    }
   }
 
   switch (aWidgetType) {
   case StyleAppearance::Button:
     if (aWidgetFlags)
       *aWidgetFlags = GTK_RELIEF_NORMAL;
     aGtkWidgetType = MOZ_GTK_BUTTON;
     break;
@@ -2128,26 +2114,16 @@ nsNativeThemeGTK::WidgetAppearanceDepend
 {
   switch (aWidgetType) {
     case StyleAppearance::MozWindowTitlebar:
     case StyleAppearance::MozWindowTitlebarMaximized:
     case StyleAppearance::MozWindowButtonClose:
     case StyleAppearance::MozWindowButtonMinimize:
     case StyleAppearance::MozWindowButtonMaximize:
     case StyleAppearance::MozWindowButtonRestore:
-    case StyleAppearance::ScrollbarbuttonUp:
-    case StyleAppearance::ScrollbarbuttonDown:
-    case StyleAppearance::ScrollbarbuttonLeft:
-    case StyleAppearance::ScrollbarbuttonRight:
-    case StyleAppearance::ScrollbarVertical:
-    case StyleAppearance::ScrollbarHorizontal:
-    case StyleAppearance::ScrollbartrackHorizontal:
-    case StyleAppearance::ScrollbartrackVertical:
-    case StyleAppearance::ScrollbarthumbVertical:
-    case StyleAppearance::ScrollbarthumbHorizontal:
       return true;
     default:
       return false;
   }
 }
 
 already_AddRefed<nsITheme>
 do_GetNativeTheme()