mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 920158 - Make nsCSSFrameConstructor::ConstructFrameFromItemInternal handle frames that should suppress floating of descendants. r=bz
--HG-- extra : rebase_source : 3f0b806dad1c1381bd30bd25e943866415e226f2
This commit is contained in:
parent
602832e7f6
commit
a4bbce1e0f
@ -1031,6 +1031,10 @@ nsFrameConstructorState::PushFloatContainingBlock(nsIFrame* aNewFloatContainingB
|
||||
NS_PRECONDITION(!aNewFloatContainingBlock ||
|
||||
aNewFloatContainingBlock->IsFloatContainingBlock(),
|
||||
"Please push a real float containing block!");
|
||||
NS_ASSERTION(!aNewFloatContainingBlock ||
|
||||
!ShouldSuppressFloatingOfDescendants(aNewFloatContainingBlock),
|
||||
"We should not push a frame that is supposed to _suppress_ "
|
||||
"floats as a float containing block!");
|
||||
aSaveState.mItems = &mFloatedItems;
|
||||
aSaveState.mSavedItems = mFloatedItems;
|
||||
aSaveState.mChildListID = nsIFrame::kFloatList;
|
||||
@ -3588,12 +3592,11 @@ nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aIt
|
||||
}
|
||||
|
||||
if (bits & FCDATA_USE_CHILD_ITEMS) {
|
||||
NS_ASSERTION(!ShouldSuppressFloatingOfDescendants(newFrame),
|
||||
"uh oh -- this frame is supposed to _suppress_ floats, but "
|
||||
"we're about to push it as a float containing block...");
|
||||
|
||||
nsFrameConstructorSaveState floatSaveState;
|
||||
if (newFrame->IsFloatContainingBlock()) {
|
||||
|
||||
if (ShouldSuppressFloatingOfDescendants(newFrame)) {
|
||||
aState.PushFloatContainingBlock(nullptr, floatSaveState);
|
||||
} else if (newFrame->IsFloatContainingBlock()) {
|
||||
aState.PushFloatContainingBlock(newFrame, floatSaveState);
|
||||
}
|
||||
ConstructFramesFromItemList(aState, aItem.mChildItems, newFrame,
|
||||
|
Loading…
Reference in New Issue
Block a user