Bug 1047928 patch 12 - Optimize nsDocShell::SetDeviceSizeIsPageSize better, since changing results of media queries should not require forcing restyling if media queries don't change. r=bzbarsky
authorL. David Baron <dbaron@dbaron.org>
Wed, 08 Oct 2014 14:27:04 -0700
changeset 209479 096b2b23db0d60368d0db5ee2aaa33696c8e64c1
parent 209478 56ac899771e6995161c23e2095c12bf98e85cb4e
child 209480 fd52f15d25d343cad18c17177b80c7f1b82ebd08
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersbzbarsky
bugs1047928
milestone35.0a1
Bug 1047928 patch 12 - Optimize nsDocShell::SetDeviceSizeIsPageSize better, since changing results of media queries should not require forcing restyling if media queries don't change. r=bzbarsky
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -4377,17 +4377,17 @@ nsDocShell::GetWindow()
 NS_IMETHODIMP
 nsDocShell::SetDeviceSizeIsPageSize(bool aValue)
 {
   if (mDeviceSizeIsPageSize != aValue) {
     mDeviceSizeIsPageSize = aValue;
     nsRefPtr<nsPresContext> presContext;
     GetPresContext(getter_AddRefs(presContext));
     if (presContext) {
-      presContext->MediaFeatureValuesChanged(eRestyle_Subtree);
+      presContext->MediaFeatureValuesChanged(nsRestyleHint(0));
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocShell::GetDeviceSizeIsPageSize(bool* aValue)
 {