|
Lines 8211-8226
nsLayoutUtils::FontSizeInflationFor(const nsIFrame *aFrame)
|
Link Here
|
---|
|
8211 |
while (container->GetType() != nsGkAtoms::svgTextFrame) { |
8211 |
while (container->GetType() != nsGkAtoms::svgTextFrame) { |
8212 |
container = container->GetParent(); |
8212 |
container = container->GetParent(); |
8213 |
} |
8213 |
} |
8214 |
NS_ASSERTION(container, "expected to find an ancestor SVGTextFrame"); |
8214 |
NS_ASSERTION(container, "expected to find an ancestor SVGTextFrame"); |
8215 |
return |
8215 |
return |
8216 |
static_cast<const SVGTextFrame*>(container)->GetFontSizeScaleFactor(); |
8216 |
static_cast<const SVGTextFrame*>(container)->GetFontSizeScaleFactor(); |
8217 |
} |
8217 |
} |
8218 |
|
8218 |
|
|
|
8219 |
// Apply initial-letter's size to ::first-letter |
8220 |
// TODO: Maybe add a condition to only apply this while initial-letter is not "normal" |
8221 |
// FIXME: Need to modify the formula to agree with the spec. |
8222 |
if (aFrame->GetType() == nsGkAtoms::textFrame && |
8223 |
aFrame->GetStateBits() & TEXT_FIRST_LETTER) { |
8224 |
return aFrame->GetParent()->StyleTextReset()->mInitialLetterSize; |
8225 |
} |
8226 |
|
8219 |
if (!FontSizeInflationEnabled(aFrame->PresContext())) { |
8227 |
if (!FontSizeInflationEnabled(aFrame->PresContext())) { |
8220 |
return 1.0f; |
8228 |
return 1.0f; |
8221 |
} |
8229 |
} |
8222 |
|
8230 |
|
8223 |
return FontSizeInflationInner(aFrame, InflationMinFontSizeFor(aFrame)); |
8231 |
return FontSizeInflationInner(aFrame, InflationMinFontSizeFor(aFrame)); |
8224 |
} |
8232 |
} |
8225 |
|
8233 |
|
8226 |
/* static */ bool |
8234 |
/* static */ bool |