diff --git a/content/base/src/nsStyleContext.cpp b/content/base/src/nsStyleContext.cpp index 235f7af75652..adf1c382f248 100644 --- a/content/base/src/nsStyleContext.cpp +++ b/content/base/src/nsStyleContext.cpp @@ -1810,6 +1810,9 @@ StyleContextImpl::RemapStyle(nsIPresContext* aPresContext) if (0 < cnt) { MapStyleData data(this, aPresContext); mRules->EnumerateForwards(MapStyleRuleFont, &data); + if (mFont.mFlags & NS_STYLE_FONT_USE_FIXED) { + mFont.mFont = mFont.mFixedFont; + } mRules->EnumerateForwards(MapStyleRule, &data); } if (-1 == mDataCode) { @@ -1852,6 +1855,9 @@ StyleContextImpl::RemapStyle(nsIPresContext* aPresContext) if (0 < numRules) { MapStyleData data(this, aPresContext); mRules->EnumerateForwards(MapStyleRuleFont, &data); + if (mFont.mFlags & NS_STYLE_FONT_USE_FIXED) { + mFont.mFont = mFont.mFixedFont; + } mRules->EnumerateForwards(MapStyleRule, &data); } // reset all font data for tables again @@ -1890,9 +1896,6 @@ void StyleContextImpl::ForceUnique(void) void StyleContextImpl::RecalcAutomaticData(nsIPresContext* aPresContext) { - if (mFont.mFlags & NS_STYLE_FONT_USE_FIXED) { - mFont.mFont = mFont.mFixedFont; - } mSpacing.RecalcData(aPresContext, mColor.mColor); } diff --git a/layout/base/src/nsStyleContext.cpp b/layout/base/src/nsStyleContext.cpp index 235f7af75652..adf1c382f248 100644 --- a/layout/base/src/nsStyleContext.cpp +++ b/layout/base/src/nsStyleContext.cpp @@ -1810,6 +1810,9 @@ StyleContextImpl::RemapStyle(nsIPresContext* aPresContext) if (0 < cnt) { MapStyleData data(this, aPresContext); mRules->EnumerateForwards(MapStyleRuleFont, &data); + if (mFont.mFlags & NS_STYLE_FONT_USE_FIXED) { + mFont.mFont = mFont.mFixedFont; + } mRules->EnumerateForwards(MapStyleRule, &data); } if (-1 == mDataCode) { @@ -1852,6 +1855,9 @@ StyleContextImpl::RemapStyle(nsIPresContext* aPresContext) if (0 < numRules) { MapStyleData data(this, aPresContext); mRules->EnumerateForwards(MapStyleRuleFont, &data); + if (mFont.mFlags & NS_STYLE_FONT_USE_FIXED) { + mFont.mFont = mFont.mFixedFont; + } mRules->EnumerateForwards(MapStyleRule, &data); } // reset all font data for tables again @@ -1890,9 +1896,6 @@ void StyleContextImpl::ForceUnique(void) void StyleContextImpl::RecalcAutomaticData(nsIPresContext* aPresContext) { - if (mFont.mFlags & NS_STYLE_FONT_USE_FIXED) { - mFont.mFont = mFont.mFixedFont; - } mSpacing.RecalcData(aPresContext, mColor.mColor); } diff --git a/layout/style/nsStyleContext.cpp b/layout/style/nsStyleContext.cpp index 235f7af75652..adf1c382f248 100644 --- a/layout/style/nsStyleContext.cpp +++ b/layout/style/nsStyleContext.cpp @@ -1810,6 +1810,9 @@ StyleContextImpl::RemapStyle(nsIPresContext* aPresContext) if (0 < cnt) { MapStyleData data(this, aPresContext); mRules->EnumerateForwards(MapStyleRuleFont, &data); + if (mFont.mFlags & NS_STYLE_FONT_USE_FIXED) { + mFont.mFont = mFont.mFixedFont; + } mRules->EnumerateForwards(MapStyleRule, &data); } if (-1 == mDataCode) { @@ -1852,6 +1855,9 @@ StyleContextImpl::RemapStyle(nsIPresContext* aPresContext) if (0 < numRules) { MapStyleData data(this, aPresContext); mRules->EnumerateForwards(MapStyleRuleFont, &data); + if (mFont.mFlags & NS_STYLE_FONT_USE_FIXED) { + mFont.mFont = mFont.mFixedFont; + } mRules->EnumerateForwards(MapStyleRule, &data); } // reset all font data for tables again @@ -1890,9 +1896,6 @@ void StyleContextImpl::ForceUnique(void) void StyleContextImpl::RecalcAutomaticData(nsIPresContext* aPresContext) { - if (mFont.mFlags & NS_STYLE_FONT_USE_FIXED) { - mFont.mFont = mFont.mFixedFont; - } mSpacing.RecalcData(aPresContext, mColor.mColor); }