Backed out 3 changesets (bug 290125) for causing build bustages on nsFirstLetterFrame.cpp CLOSED TREE

Backed out changeset 0b6b18ea2634 (bug 290125)
Backed out changeset d8297eee88e7 (bug 290125)
Backed out changeset 3f341b8efb86 (bug 290125)
This commit is contained in:
Cristian Tuns
2022-12-19 12:34:05 -05:00
parent af3db6d9b4
commit 43ec8f0f93
15 changed files with 21 additions and 104 deletions

View File

@@ -52,7 +52,6 @@
#include "nsDisplayList.h"
#include "nsIFrame.h"
#include "nsIMathMLFrame.h"
#include "nsFirstLetterFrame.h"
#include "nsPlaceholderFrame.h"
#include "nsTextFrameUtils.h"
#include "nsTextRunTransformations.h"
@@ -5871,16 +5870,13 @@ void nsTextFrame::UnionAdditionalOverflow(nsPresContext* aPresContext,
AddStateBits(TEXT_SELECTION_UNDERLINE_OVERFLOWED);
}
nscoord nsTextFrame::ComputeLineHeight() const {
return ReflowInput::CalcLineHeight(GetContent(), Style(), PresContext(),
NS_UNCONSTRAINEDSIZE,
GetFontSizeInflation());
}
gfxFloat nsTextFrame::ComputeDescentLimitForSelectionUnderline(
nsPresContext* aPresContext, const gfxFont::Metrics& aFontMetrics) {
const gfxFloat lineHeight =
gfxFloat(ComputeLineHeight()) / aPresContext->AppUnitsPerDevPixel();
gfxFloat app = aPresContext->AppUnitsPerDevPixel();
nscoord lineHeightApp =
ReflowInput::CalcLineHeight(GetContent(), Style(), PresContext(),
NS_UNCONSTRAINEDSIZE, GetFontSizeInflation());
gfxFloat lineHeight = gfxFloat(lineHeightApp) / app;
if (lineHeight <= aFontMetrics.maxHeight) {
return aFontMetrics.maxDescent;
}
@@ -9710,14 +9706,10 @@ void nsTextFrame::ReflowText(nsLineLayout& aLineLayout, nscoord aAvailableWidth,
// The metrics for the text go in here
gfxTextRun::Metrics textMetrics;
gfxFont::BoundingBoxType boundingBoxType = gfxFont::LOOSE_INK_EXTENTS;
if (IsFloatingFirstLetterChild() || IsInitialLetterChild()) {
if (nsFirstLetterFrame* firstLetter = do_QueryFrame(GetParent())) {
if (firstLetter->UseTightBounds()) {
boundingBoxType = gfxFont::TIGHT_HINTED_OUTLINE_EXTENTS;
}
}
}
gfxFont::BoundingBoxType boundingBoxType =
IsFloatingFirstLetterChild() || IsInitialLetterChild()
? gfxFont::TIGHT_HINTED_OUTLINE_EXTENTS
: gfxFont::LOOSE_INK_EXTENTS;
int32_t limitLength = length;
int32_t forceBreak = aLineLayout.GetForcedBreakPosition(this);