mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 842128 - Don't call nsLayoutUtils::GetFontMetricsForFrame in nsProgressFrame::ComputeAutoSize. r=dbaron.
This commit is contained in:
parent
22fc7b9770
commit
7b2e2416d3
@ -236,15 +236,10 @@ nsProgressFrame::ComputeAutoSize(nsRenderingContext *aRenderingContext,
|
||||
nsSize aMargin, nsSize aBorder,
|
||||
nsSize aPadding, bool aShrinkWrap)
|
||||
{
|
||||
float inflation = nsLayoutUtils::FontSizeInflationFor(this);
|
||||
nsRefPtr<nsFontMetrics> fontMet;
|
||||
NS_ENSURE_SUCCESS(nsLayoutUtils::GetFontMetricsForFrame(this,
|
||||
getter_AddRefs(fontMet),
|
||||
inflation),
|
||||
nsSize(0, 0));
|
||||
|
||||
nsSize autoSize;
|
||||
autoSize.height = autoSize.width = fontMet->Font().size; // 1em
|
||||
autoSize.height = autoSize.width =
|
||||
NSToCoordRound(StyleFont()->mFont.size *
|
||||
nsLayoutUtils::FontSizeInflationFor(this)); // 1em
|
||||
|
||||
if (StyleDisplay()->mOrient == NS_STYLE_ORIENT_VERTICAL) {
|
||||
autoSize.height *= 10; // 10em
|
||||
|
Loading…
Reference in New Issue
Block a user