mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Pass block's reflow state to nsTextFrame::UnionAdditionalOverflow. (Bug 627842, patch 8) r=roc
This commit is contained in:
parent
1986127472
commit
0e16a65517
@ -2619,7 +2619,7 @@ nsLineLayout::RelativePositionFrames(PerSpanData* psd, nsOverflowAreas& aOverflo
|
||||
if (pfd->GetFlag(PFD_RECOMPUTEOVERFLOW) ||
|
||||
frame->GetStyleContext()->HasTextDecorationLines()) {
|
||||
nsTextFrame* f = static_cast<nsTextFrame*>(frame);
|
||||
r = f->RecomputeOverflow();
|
||||
r = f->RecomputeOverflow(*mBlockReflowState);
|
||||
}
|
||||
frame->FinishAndStoreOverflow(r, frame->GetSize());
|
||||
}
|
||||
|
@ -369,6 +369,9 @@ public:
|
||||
* context (e.g. MathML or floating first-letter).
|
||||
*/
|
||||
nsIFrame* GetLineContainerFrame() const { return mBlockReflowState->frame; }
|
||||
const nsHTMLReflowState* GetLineContainerRS() const {
|
||||
return mBlockReflowState;
|
||||
}
|
||||
const nsLineList::iterator* GetLine() const {
|
||||
return GetFlag(LL_GOTLINEBOX) ? &mLineBox : nsnull;
|
||||
}
|
||||
|
@ -264,7 +264,8 @@ public:
|
||||
PRUint32 aSkippedStartOffset = 0,
|
||||
PRUint32 aSkippedMaxLength = PR_UINT32_MAX);
|
||||
|
||||
nsOverflowAreas RecomputeOverflow();
|
||||
nsOverflowAreas
|
||||
RecomputeOverflow(const nsHTMLReflowState& aBlockReflowState);
|
||||
|
||||
void AddInlineMinWidthForFlow(nsRenderingContext *aRenderingContext,
|
||||
nsIFrame::InlineMinWidthData *aData);
|
||||
@ -434,6 +435,7 @@ protected:
|
||||
SelectionDetails* GetSelectionDetails();
|
||||
|
||||
void UnionAdditionalOverflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aBlockReflowState,
|
||||
PropertyProvider& aProvider,
|
||||
nsRect* aVisualOverflowRect,
|
||||
bool aIncludeTextDecorations);
|
||||
|
@ -4375,6 +4375,7 @@ nsTextFrame::GetTextDecorations(nsPresContext* aPresContext,
|
||||
|
||||
void
|
||||
nsTextFrame::UnionAdditionalOverflow(nsPresContext* aPresContext,
|
||||
const nsHTMLReflowState& aBlockReflowState,
|
||||
PropertyProvider& aProvider,
|
||||
nsRect* aVisualOverflowRect,
|
||||
bool aIncludeTextDecorations)
|
||||
@ -7306,8 +7307,8 @@ nsTextFrame::ReflowText(nsLineLayout& aLineLayout, nscoord aAvailableWidth,
|
||||
// When we have text decorations, we don't need to compute their overflow now
|
||||
// because we're guaranteed to do it later
|
||||
// (see nsLineLayout::RelativePositionFrames)
|
||||
UnionAdditionalOverflow(presContext, provider, &aMetrics.VisualOverflow(),
|
||||
false);
|
||||
UnionAdditionalOverflow(presContext, *aLineLayout.GetLineContainerRS(),
|
||||
provider, &aMetrics.VisualOverflow(), false);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// Clean up, update state
|
||||
@ -7544,7 +7545,7 @@ nsTextFrame::TrimTrailingWhiteSpace(nsRenderingContext* aRC)
|
||||
}
|
||||
|
||||
nsOverflowAreas
|
||||
nsTextFrame::RecomputeOverflow()
|
||||
nsTextFrame::RecomputeOverflow(const nsHTMLReflowState& aBlockReflowState)
|
||||
{
|
||||
nsRect bounds(nsPoint(0, 0), GetSize());
|
||||
nsOverflowAreas result(bounds, bounds);
|
||||
@ -7563,7 +7564,8 @@ nsTextFrame::RecomputeOverflow()
|
||||
&provider);
|
||||
nsRect &vis = result.VisualOverflow();
|
||||
vis.UnionRect(vis, RoundOut(textMetrics.mBoundingBox) + nsPoint(0, mAscent));
|
||||
UnionAdditionalOverflow(PresContext(), provider, &vis, true);
|
||||
UnionAdditionalOverflow(PresContext(), aBlockReflowState, provider,
|
||||
&vis, true);
|
||||
return result;
|
||||
}
|
||||
static PRUnichar TransformChar(const nsStyleText* aStyle, gfxTextRun* aTextRun,
|
||||
|
Loading…
Reference in New Issue
Block a user