PresShell debug logging draft
authorJan Henning <jh+bugzilla@buttercookie.de>
Sun, 25 Dec 2016 17:55:58 +0100
changeset 453926 fa841811e17aa15fba1f80f6929b1e0dfb50d9e6
parent 453925 770ca6f02079ee5fa355372e603ed33a50d2fdc6
child 453927 72c8cda23e06512fa688685eac8198660e862036
push id39769
push usermozilla@buttercookie.de
push dateMon, 26 Dec 2016 18:12:31 +0000
milestone53.0a1
PresShell debug logging MozReview-Commit-ID: 3qp1WfG9LmK
layout/base/PresShell.cpp
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -211,16 +211,18 @@ using namespace mozilla::tasktracer;
 
 #define ANCHOR_SCROLL_FLAGS \
   (nsIPresShell::SCROLL_OVERFLOW_HIDDEN | nsIPresShell::SCROLL_NO_PARENT_FRAMES)
 
   // define the scalfactor of drag and drop images
   // relative to the max screen height/width
 #define RELATIVE_SCALEFACTOR 0.0925f
 
+#define PRES_LOG(...) printf_stderr("Pres: " __VA_ARGS__)
+
 using namespace mozilla;
 using namespace mozilla::css;
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
 using namespace mozilla::layers;
 using namespace mozilla::gfx;
 using namespace mozilla::layout;
 using PaintFrameFlags = nsLayoutUtils::PaintFrameFlags;
@@ -8770,16 +8772,18 @@ FreezeSubDocument(nsIDocument *aDocument
     shell->Freeze();
 
   return true;
 }
 
 void
 PresShell::Freeze()
 {
+  PRES_LOG("%p: Freeze()\n", this);
+
   mUpdateApproximateFrameVisibilityEvent.Revoke();
 
   MaybeReleaseCapturingContent();
 
   mDocument->EnumerateActivityObservers(FreezeElement, nullptr);
 
   if (mCaret) {
     SetCaretEnabled(false);
@@ -8844,16 +8848,17 @@ ThawSubDocument(nsIDocument *aDocument, 
     shell->Thaw();
 
   return true;
 }
 
 void
 PresShell::Thaw()
 {
+  PRES_LOG("%p: Thaw()\n", this);
   nsPresContext* presContext = GetPresContext();
   if (presContext &&
       presContext->RefreshDriver()->GetPresContext() == presContext) {
     presContext->RefreshDriver()->Thaw();
   }
 
   mDocument->EnumerateActivityObservers(ThawElement, this);
 
@@ -10836,16 +10841,18 @@ nsIPresShell::SetScrollPositionClampingS
     }
     MarkFixedFramesForReflow(nsIPresShell::eResize);
   }
 }
 
 void
 PresShell::SetupFontInflation()
 {
+  PRES_LOG("%p: SetupFontInflation()\n", this);
+
   mFontSizeInflationEmPerLine = nsLayoutUtils::FontSizeInflationEmPerLine();
   mFontSizeInflationMinTwips = nsLayoutUtils::FontSizeInflationMinTwips();
   mFontSizeInflationLineThreshold = nsLayoutUtils::FontSizeInflationLineThreshold();
   mFontSizeInflationForceEnabled = nsLayoutUtils::FontSizeInflationForceEnabled();
   mFontSizeInflationDisabledInMasterProcess = nsLayoutUtils::FontSizeInflationDisabledInMasterProcess();
 
   NotifyFontSizeInflationEnabledIsDirty();
 }
@@ -10923,18 +10930,19 @@ nsIPresShell::RecomputeFontSizeInflation
   mFontSizeInflationEnabled = true;
 }
 
 bool
 nsIPresShell::FontSizeInflationEnabled()
 {
   if (mFontSizeInflationEnabledIsDirty) {
     RecomputeFontSizeInflationEnabled();
-  }
-
+    PRES_LOG("%p: recomputed FontSizeInflationEnabled: %s\n", this, mFontSizeInflationEnabled?"true":"false");
+  }
+  // PRES_LOG("%p: FSIE: %s\n", this, mFontSizeInflationEnabled?"true":"false");
   return mFontSizeInflationEnabled;
 }
 
 void
 PresShell::PausePainting()
 {
   if (GetPresContext()->RefreshDriver()->GetPresContext() != GetPresContext())
     return;