зеркало из https://github.com/mozilla/gecko-dev.git
Bug 381703. First-letter frames that are wrapping non-first-letter-content should behave like spans and not compute their size. r+sr=dbaron
This commit is contained in:
Родитель
09b089866b
Коммит
32a3b83c42
|
@ -78,6 +78,10 @@ public:
|
|||
InlineMinWidthData *aData);
|
||||
virtual void AddInlinePrefWidth(nsIRenderingContext *aRenderingContext,
|
||||
InlinePrefWidthData *aData);
|
||||
virtual nsSize ComputeSize(nsIRenderingContext *aRenderingContext,
|
||||
nsSize aCBSize, nscoord aAvailableWidth,
|
||||
nsSize aMargin, nsSize aBorder, nsSize aPadding,
|
||||
PRBool aShrinkWrap);
|
||||
NS_IMETHOD Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
|
@ -223,6 +227,21 @@ nsFirstLetterFrame::GetPrefWidth(nsIRenderingContext *aRenderingContext)
|
|||
return nsLayoutUtils::PrefWidthFromInline(this, aRenderingContext);
|
||||
}
|
||||
|
||||
/* virtual */ nsSize
|
||||
nsFirstLetterFrame::ComputeSize(nsIRenderingContext *aRenderingContext,
|
||||
nsSize aCBSize, nscoord aAvailableWidth,
|
||||
nsSize aMargin, nsSize aBorder, nsSize aPadding,
|
||||
PRBool aShrinkWrap)
|
||||
{
|
||||
if (GetPrevInFlow()) {
|
||||
// We're wrapping the text *after* the first letter, so behave like an
|
||||
// inline frame.
|
||||
return nsSize(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);
|
||||
}
|
||||
return nsFirstLetterFrameSuper::ComputeSize(aRenderingContext,
|
||||
aCBSize, aAvailableWidth, aMargin, aBorder, aPadding, aShrinkWrap);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFirstLetterFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aMetrics,
|
||||
|
|
Загрузка…
Ссылка в новой задаче