Bug 1695314 - Frame constructor shouldn't use nsIFrame::IsFloating to determine whether it should create a float. r=TYLin

It should just look at the float style. This shouldn't be a behavior
change because SVG text should pass false for aCanBeFloated.

This unblocks bug 1690701 because checking the out of flow frame bit
here would be wrong (we're deciding whether the frame should be out of
flow so the bit isn't set yet).

Differential Revision: https://phabricator.services.mozilla.com/D106664
This commit is contained in:
Emilio Cobos Álvarez
2021-02-26 20:03:24 +00:00
parent db896883ba
commit ce6bdba9e9

View File

@@ -1045,13 +1045,13 @@ AbsoluteFrameList* nsFrameConstructorState::GetOutOfFlowFrameList(
return &mPopupList;
}
#endif // MOZ_XUL
if (aCanBeFloated && aNewFrame->IsFloating()) {
const nsStyleDisplay* disp = aNewFrame->StyleDisplay();
if (aCanBeFloated && disp->IsFloatingStyle()) {
*aPlaceholderType = PLACEHOLDER_FOR_FLOAT;
return &mFloatedList;
}
if (aCanBePositioned) {
const nsStyleDisplay* disp = aNewFrame->StyleDisplay();
if (disp->mTopLayer != StyleTopLayer::None) {
*aPlaceholderType = PLACEHOLDER_FOR_TOPLAYER;
if (disp->mPosition == StylePositionProperty::Fixed) {