Bug 1478212 - Propagate MediaFeatureChangeReason::SystemMetricsChange into sub frames. r=emilio a=pascalc
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 05 Sep 2018 01:50:33 +0000
changeset 492581 20990ad02e181fe3b9cf8475aea19f817e153528
parent 492580 0aac7a06ae89b9dd678eb4f1eb8a01339cd348c3
child 492582 8d26699d84cfd47c0e4d80c84bbbedcbef2be87c
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio, pascalc
bugs1478212, 1486971
milestone63.0
Bug 1478212 - Propagate MediaFeatureChangeReason::SystemMetricsChange into sub frames. r=emilio a=pascalc A test case covers this will be introduced in bug 1486971. Differential Revision: https://phabricator.services.mozilla.com/D4998
layout/base/nsPresContext.cpp
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -1752,17 +1752,17 @@ nsPresContext::RefreshSystemMetrics()
   nsMediaFeatures::FreeSystemMetrics();
 
   // Changes to system metrics can change media queries on them.
   //
   // Changes in theme can change system colors (whose changes are
   // properly reflected in computed style data), system fonts (whose
   // changes are not), and -moz-appearance (whose changes likewise are
   // not), so we need to recascade for the first, and reflow for the rest.
-  MediaFeatureValuesChanged({
+  MediaFeatureValuesChangedAllDocuments({
     eRestyle_ForceDescendants,
     NS_STYLE_HINT_REFLOW,
     MediaFeatureChangeReason::SystemMetricsChange,
   });
 }
 
 void
 nsPresContext::UIResolutionChanged()