--- 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;
}