bug 841470 - don't call AppUnitsPerDevPixelChanged unless the value has actually changed. r=roc
authorJonathan Kew <jkew@mozilla.com>
Sun, 17 Feb 2013 21:27:24 +0000
changeset 132059 fe1aa97b77a6e9de2aaf56733c9d77f87473d7e0
parent 132058 de56ae61946d17ca9015dc2ab817bc0da0ff276b
child 132060 841077d27df82a4723a0f2b79e652779835f9e8d
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs841470
milestone21.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 841470 - don't call AppUnitsPerDevPixelChanged unless the value has actually changed. r=roc
layout/base/nsPresContext.cpp
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -1655,17 +1655,19 @@ nsPresContext::UIResolutionChangedSubdoc
 }
 
 void
 nsPresContext::UIResolutionChangedInternal()
 {
   mPendingUIResolutionChanged = false;
 
   mDeviceContext->CheckDPIChange();
-  AppUnitsPerDevPixelChanged();
+  if (mCurAppUnitsPerDevPixel != AppUnitsPerDevPixel()) {
+    AppUnitsPerDevPixelChanged();
+  }
 
   mDocument->EnumerateSubDocuments(UIResolutionChangedSubdocumentCallback,
                                    nullptr);
 }
 
 void
 nsPresContext::RebuildAllStyleData(nsChangeHint aExtraHint)
 {