mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 970710 - ensure GetTrimmedOffsets is called with consistent parameters from PropertyProvider::InitializeForMeasure and SetupJustificationSpacing. r=roc
This commit is contained in:
parent
0621f133e7
commit
a51fad7aea
@ -2890,7 +2890,7 @@ public:
|
||||
const gfxSkipCharsIterator& GetEndHint() { return mTempIterator; }
|
||||
|
||||
protected:
|
||||
void SetupJustificationSpacing();
|
||||
void SetupJustificationSpacing(bool aPostReflow);
|
||||
|
||||
void InitFontGroupAndFontMetrics() {
|
||||
float inflation = (mWhichTextRun == nsTextFrame::eInflated)
|
||||
@ -3274,7 +3274,7 @@ PropertyProvider::InitializeForDisplay(bool aTrimAfter)
|
||||
mFrame->GetTrimmedOffsets(mFrag, aTrimAfter);
|
||||
mStart.SetOriginalOffset(trimmed.mStart);
|
||||
mLength = trimmed.mLength;
|
||||
SetupJustificationSpacing();
|
||||
SetupJustificationSpacing(true);
|
||||
}
|
||||
|
||||
void
|
||||
@ -3284,7 +3284,7 @@ PropertyProvider::InitializeForMeasure()
|
||||
mFrame->GetTrimmedOffsets(mFrag, true, false);
|
||||
mStart.SetOriginalOffset(trimmed.mStart);
|
||||
mLength = trimmed.mLength;
|
||||
SetupJustificationSpacing();
|
||||
SetupJustificationSpacing(false);
|
||||
}
|
||||
|
||||
|
||||
@ -3326,7 +3326,7 @@ PropertyProvider::FindJustificationRange(gfxSkipCharsIterator* aStart,
|
||||
}
|
||||
|
||||
void
|
||||
PropertyProvider::SetupJustificationSpacing()
|
||||
PropertyProvider::SetupJustificationSpacing(bool aPostReflow)
|
||||
{
|
||||
NS_PRECONDITION(mLength != INT32_MAX, "Can't call this with undefined length");
|
||||
|
||||
@ -3338,7 +3338,7 @@ PropertyProvider::SetupJustificationSpacing()
|
||||
// called with false for aTrimAfter, we still shouldn't be assigning
|
||||
// justification space to any trailing whitespace.
|
||||
nsTextFrame::TrimmedOffsets trimmed =
|
||||
mFrame->GetTrimmedOffsets(mFrag, true);
|
||||
mFrame->GetTrimmedOffsets(mFrag, true, aPostReflow);
|
||||
end.AdvanceOriginal(trimmed.mLength);
|
||||
gfxSkipCharsIterator realEnd(end);
|
||||
FindJustificationRange(&start, &end);
|
||||
|
Loading…
Reference in New Issue
Block a user