mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 495350. Do a better job of keeping track of our line participant count. r+sr=roc
This commit is contained in:
parent
1220485428
commit
f25879a0a0
9
layout/base/crashtests/495350-1.html
Normal file
9
layout/base/crashtests/495350-1.html
Normal file
@ -0,0 +1,9 @@
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div style="display: -moz-inline-box;">
|
||||
<br style="position: fixed;">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -237,3 +237,4 @@ load 490747.html
|
||||
load 492014.xhtml
|
||||
load 492112-1.xhtml
|
||||
load 492163-1.xhtml
|
||||
load 495350-1.html
|
||||
|
@ -5421,7 +5421,7 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
|
||||
// it's conservative in the sense that anything that will really end up
|
||||
// as an in-flow non-inline will have false mIsAllInline. It just might
|
||||
// be that even an inline that has mIsAllInline false doesn't need an
|
||||
// {ib} split. So this is just an optimization to keep from doint to
|
||||
// {ib} split. So this is just an optimization to keep from doing too
|
||||
// much work when that happens.
|
||||
(!(bits & FCDATA_DISALLOW_OUT_OF_FLOW) &&
|
||||
aState.GetGeometricParent(display, nsnull)) ||
|
||||
@ -5433,7 +5433,14 @@ nsCSSFrameConstructor::AddFrameConstructionItemsInternal(nsFrameConstructorState
|
||||
aItems.InlineItemAdded();
|
||||
}
|
||||
|
||||
if (bits & FCDATA_IS_LINE_PARTICIPANT) {
|
||||
// Our item should be treated as a line participant if we have the relevant
|
||||
// bit and are going to be in-flow. Note that this really only matters if
|
||||
// our ancestor is a box or some such, so the fact that we might have an
|
||||
// inline ancestor that might become a containing block is not relevant here.
|
||||
if ((bits & FCDATA_IS_LINE_PARTICIPANT) &&
|
||||
((bits & FCDATA_DISALLOW_OUT_OF_FLOW) ||
|
||||
!aState.GetGeometricParent(display, nsnull))) {
|
||||
item->mIsLineParticipant = PR_TRUE;
|
||||
aItems.LineParticipantItemAdded();
|
||||
}
|
||||
}
|
||||
@ -11550,7 +11557,7 @@ AdjustCountsForItem(FrameConstructionItem* aItem, PRInt32 aDelta)
|
||||
if (aItem->mIsAllInline) {
|
||||
mInlineCount += aDelta;
|
||||
}
|
||||
if (aItem->mFCData->mBits & FCDATA_IS_LINE_PARTICIPANT) {
|
||||
if (aItem->mIsLineParticipant) {
|
||||
mLineParticipantCount += aDelta;
|
||||
}
|
||||
mDesiredParentCounts[aItem->DesiredParentType()] += aDelta;
|
||||
|
@ -841,7 +841,8 @@ private:
|
||||
mNameSpaceID(aNameSpaceID), mStyleContext(aStyleContext),
|
||||
mIsText(PR_FALSE), mIsGeneratedContent(PR_FALSE),
|
||||
mIsRootPopupgroup(PR_FALSE), mIsAllInline(PR_FALSE),
|
||||
mHasInlineEnds(PR_FALSE), mIsPopup(PR_FALSE)
|
||||
mHasInlineEnds(PR_FALSE), mIsPopup(PR_FALSE),
|
||||
mIsLineParticipant(PR_FALSE)
|
||||
{}
|
||||
~FrameConstructionItem() {
|
||||
if (mIsGeneratedContent) {
|
||||
@ -887,6 +888,8 @@ private:
|
||||
// Whether construction from this item will create a popup that needs to
|
||||
// go into the global popup items.
|
||||
PRPackedBool mIsPopup;
|
||||
// Whether this item should be treated as a line participant
|
||||
PRPackedBool mIsLineParticipant;
|
||||
|
||||
// Child frame construction items.
|
||||
FrameConstructionItemList mChildItems;
|
||||
|
Loading…
Reference in New Issue
Block a user