Bug 1476212 - Notify the system setting change corresponding to prefers-reduced-motion. r=jimm
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 25 Jul 2018 14:41:13 +0900
changeset 483734 c108e6f927d1483985981647ddff204c706baed7
parent 483733 45cf26c3c53c96eae955c24a1b4b7b05fb9ef6ea
child 483735 3b1b9fcf8b96d12bf5ebf9e6cb5503dbb972a87c
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs1476212, 1478212
milestone63.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 1476212 - Notify the system setting change corresponding to prefers-reduced-motion. r=jimm Even with this patch, the setting change doesn't affect media queries in sub frames due to bug 1478212. But the bug is a pre-existing issue, for example system color settings don't affect contents in sub frames either. So we can land this patch as it is. Note that there is no way to write an automation test for this unfortunately. MozReview-Commit-ID: L2Knhp1IjrU
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -5308,18 +5308,19 @@ nsWindow::ProcessMessage(UINT msg, WPARA
         fontEnum->UpdateFontList(&didChange);
         ForceFontUpdate();
       } //if (NS_SUCCEEDED(rv))
     }
     break;
 
     case WM_SETTINGCHANGE:
     {
-      if (wParam == SPI_SETKEYBOARDDELAY) {
-        // CaretBlinkTime is cached in nsLookAndFeel
+      if (wParam == SPI_SETCLIENTAREAANIMATION ||
+          // CaretBlinkTime is cached in nsLookAndFeel
+          wParam == SPI_SETKEYBOARDDELAY) {
         NotifyThemeChanged();
         break;
       }
       if (lParam) {
         auto lParamString = reinterpret_cast<const wchar_t*>(lParam);
         if (!wcscmp(lParamString, L"ImmersiveColorSet")) {
           // This might be the Win10 dark mode setting; only way to tell
           // is to actually force a theme change, since we don't get