зеркало из https://github.com/mozilla/pjs.git
Don't propagate line layout in reflow state when we're not in the line. b=320502 r+sr=roc
This commit is contained in:
Родитель
1b89d1bd50
Коммит
48a5de0d15
|
@ -84,7 +84,8 @@ public:
|
|||
|
||||
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eReplaced));
|
||||
return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eReplaced |
|
||||
nsIFrame::eLineParticipant));
|
||||
}
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
|
|
|
@ -277,7 +277,6 @@ nsBlockReflowContext::ReflowBlock(const nsRect& aSpace,
|
|||
}
|
||||
}
|
||||
|
||||
aFrameRS.mLineLayout = nsnull;
|
||||
if (!aIsAdjacentWithTop) {
|
||||
aFrameRS.mFlags.mIsTopOfPage = PR_FALSE; // make sure this is cleared
|
||||
}
|
||||
|
|
|
@ -66,6 +66,8 @@ public:
|
|||
|
||||
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
|
||||
{
|
||||
if (!GetStyleDisplay()->IsFloating())
|
||||
aFlags = aFlags & ~(nsIFrame::eLineParticipant);
|
||||
return nsFirstLetterFrameSuper::IsFrameOfType(aFlags &
|
||||
~(nsIFrame::eBidiInlineContainer));
|
||||
}
|
||||
|
|
|
@ -158,7 +158,10 @@ nsHTMLReflowState::nsHTMLReflowState(nsPresContext* aPresContext,
|
|||
availableHeight = aAvailableSpace.height;
|
||||
|
||||
mSpaceManager = aParentReflowState.mSpaceManager;
|
||||
mLineLayout = aParentReflowState.mLineLayout;
|
||||
if (frame->IsFrameOfType(nsIFrame::eLineParticipant))
|
||||
mLineLayout = aParentReflowState.mLineLayout;
|
||||
else
|
||||
mLineLayout = nsnull;
|
||||
mFlags.mIsTopOfPage = aParentReflowState.mFlags.mIsTopOfPage;
|
||||
mFlags.mNextInFlowUntouched = aParentReflowState.mFlags.mNextInFlowUntouched &&
|
||||
CheckNextInFlowParenthood(aFrame, aParentReflowState.frame);
|
||||
|
|
|
@ -1435,6 +1435,9 @@ public:
|
|||
// Frame that contains a block but looks like a replaced element
|
||||
// from the outside
|
||||
eReplacedContainsBlock = 1 << 5,
|
||||
// A frame that participates in inline reflow, i.e., one that
|
||||
// requires nsHTMLReflowState::mLineLayout.
|
||||
eLineParticipant = 1 << 6,
|
||||
|
||||
|
||||
// These are to allow nsFrame::Init to assert that IsFrameOfType
|
||||
|
|
|
@ -103,7 +103,7 @@ public:
|
|||
virtual PRBool IsFrameOfType(PRUint32 aFlags) const
|
||||
{
|
||||
return nsInlineFrameSuper::IsFrameOfType(aFlags &
|
||||
~(nsIFrame::eBidiInlineContainer));
|
||||
~(nsIFrame::eBidiInlineContainer | nsIFrame::eLineParticipant));
|
||||
}
|
||||
|
||||
virtual PRBool IsEmpty();
|
||||
|
|
|
@ -331,7 +331,8 @@ public:
|
|||
{
|
||||
// Set the frame state bit for text frames to mark them as replaced.
|
||||
// XXX kipp: temporary
|
||||
return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eReplaced));
|
||||
return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eReplaced |
|
||||
nsIFrame::eLineParticipant));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
|
@ -374,7 +374,8 @@ public:
|
|||
{
|
||||
// Set the frame state bit for text frames to mark them as replaced.
|
||||
// XXX kipp: temporary
|
||||
return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eReplaced));
|
||||
return nsFrame::IsFrameOfType(aFlags & ~(nsIFrame::eReplaced |
|
||||
nsIFrame::eLineParticipant));
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
Загрузка…
Ссылка в новой задаче