Bug 1640262 - Don't call nsPresContext::ThemeChanged from nsGfxScrollFrame. r=mstange
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 22 May 2020 19:57:50 +0000
changeset 531712 ccce96f9e591ea3427f5ee9d4d11e6a563541deb
parent 531711 4c53c244dba1049c7db3fa421e6888301d4ca202
child 531713 6ca84f6daedd9a5e4bc3da24d9d3d34ec35e8e66
push id37442
push userncsoregi@mozilla.com
push dateSat, 23 May 2020 09:21:24 +0000
treeherdermozilla-central@bbcc193fe0f0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1640262
milestone78.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 1640262 - Don't call nsPresContext::ThemeChanged from nsGfxScrollFrame. r=mstange nsChildView.mm already does this via systemMetricsChanged. There used to be a bug in which pref changes to the ui.* prefs didn't trigger ThemeChanged, but it was fixed a while ago. Differential Revision: https://phabricator.services.mozilla.com/D76530
layout/generic/nsGfxScrollFrame.cpp
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -1361,22 +1361,20 @@ nscoord ScrollFrameHelper::GetNondisappe
 }
 
 void ScrollFrameHelper::HandleScrollbarStyleSwitching() {
   // Check if we switched between scrollbar styles.
   if (mScrollbarActivity &&
       LookAndFeel::GetInt(LookAndFeel::eIntID_UseOverlayScrollbars) == 0) {
     mScrollbarActivity->Destroy();
     mScrollbarActivity = nullptr;
-    mOuter->PresContext()->ThemeChanged();
   } else if (!mScrollbarActivity &&
              LookAndFeel::GetInt(LookAndFeel::eIntID_UseOverlayScrollbars) !=
                  0) {
     mScrollbarActivity = new ScrollbarActivity(do_QueryFrame(mOuter));
-    mOuter->PresContext()->ThemeChanged();
   }
 }
 
 #if defined(MOZ_WIDGET_ANDROID)
 static bool IsFocused(nsIContent* aContent) {
   // Some content elements, like the GetContent() of a scroll frame
   // for a text input field, are inside anonymous subtrees, but the focus
   // manager always reports a non-anonymous element as the focused one, so