More PresShell debug logging draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Mon, 26 Dec 2016 12:01:09 +0100
changeset 453935 140a2dfcdb13525740455d7510089d567bc7da72
parent 453934 f2c33e49f6c5b58ecd76f811b4b6a430e83f3cd5
child 453936 77feac7e2be9a29440e440db51f2bfd9b23e4f15
push id39769
push usermozilla@buttercookie.de
push dateMon, 26 Dec 2016 18:12:31 +0000
milestone53.0a1
More PresShell debug logging MozReview-Commit-ID: EO3C6DaPClA
layout/base/PresShell.cpp
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -10861,27 +10861,33 @@ PresShell::SetupFontInflation()
   NotifyFontSizeInflationEnabledIsDirty();
 }
 
 void
 nsIPresShell::RecomputeFontSizeInflationEnabled()
 {
   mFontSizeInflationEnabledIsDirty = false;
 
+  PRES_LOG("%p: Font inflation is %s\n", this, mFontSizeInflationEnabled?"enabled":"disabled");
+  PRES_LOG("%p: Global zoom: %u\n", this, nsLayoutUtils::BrowserGlobalZoom());
+
   // When not doing global zooming, we can defer updating this bit of state
   // to the end of the calculation, if we still need to know it by then.
   if (nsLayoutUtils::BrowserGlobalZoom() != 0) {
     RecomputeDocEligibleForFontSizeInflation();
+    PRES_LOG("%p: Recompute - doc eligible: %s\n", this, mDocIsFontSizeInflationEligible?"true":"false");
     if (!mDocIsFontSizeInflationEligible) {
       mFontSizeInflationEnabled = false;
       return;
     }
   }
 
   MOZ_ASSERT(mPresContext, "our pres context should not be null");
+  PRES_LOG("%p: EmPerLine: %u\n", this, FontSizeInflationEmPerLine());
+  PRES_LOG("%p: MinTwips: %u\n", this, FontSizeInflationMinTwips());
   if ((FontSizeInflationEmPerLine() == 0 &&
       FontSizeInflationMinTwips() == 0) || mPresContext->IsChrome()) {
     mFontSizeInflationEnabled = false;
     return;
   }
 
   // Force-enabling font inflation always trumps the heuristics here.
   if (!FontSizeInflationForceEnabled()) {
@@ -10899,16 +10905,17 @@ nsIPresShell::RecomputeFontSizeInflation
         mFontSizeInflationEnabled = false;
         return;
       }
     }
   }
 
   if (nsLayoutUtils::BrowserGlobalZoom() == 0) {
     RecomputeDocEligibleForFontSizeInflation();
+    PRES_LOG("%p: Recompute - doc eligible: %s\n", this, mDocIsFontSizeInflationEligible?"true":"false");
     if (!mDocIsFontSizeInflationEligible) {
       mFontSizeInflationEnabled = false;
       return;
     }
   }
 
   mFontSizeInflationEnabled = true;
 }