mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-04 15:51:37 +00:00
Bug 973701: Check NS_FRAME_OUT_OF_FLOW state bit instead of IsAbsolutelyPositioned(), when excluding out-of-flow frames from being considered as flex items. r=mats
This commit is contained in:
parent
3ecbe42550
commit
dfd6a77df9
5
layout/generic/crashtests/973701-1.xhtml
Normal file
5
layout/generic/crashtests/973701-1.xhtml
Normal file
@ -0,0 +1,5 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body style="display: flex;">
|
||||
<munderover xmlns="http://www.w3.org/1998/Math/MathML" style="position: absolute;" />
|
||||
</body>
|
||||
</html>
|
6
layout/generic/crashtests/973701-2.xhtml
Normal file
6
layout/generic/crashtests/973701-2.xhtml
Normal file
@ -0,0 +1,6 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<body style="display: flex;">
|
||||
<munderover xmlns="http://www.w3.org/1998/Math/MathML" style="position: absolute;" />
|
||||
<munderover xmlns="http://www.w3.org/1998/Math/MathML" style="position: absolute;" />
|
||||
</body>
|
||||
</html>
|
@ -525,4 +525,6 @@ test-pref(layout.css.sticky.enabled,true) load 915475.xhtml
|
||||
load 943509-1.html
|
||||
asserts(4-8) load 944909-1.html
|
||||
test-pref(layout.css.sticky.enabled,true) load 949932.html
|
||||
load 973701-1.xhtml
|
||||
load 973701-2.xhtml
|
||||
load outline-on-frameset.xhtml
|
||||
|
@ -1053,8 +1053,10 @@ FlexItem::FlexItem(nsIFrame* aChildFrame,
|
||||
mAlignSelf(aChildFrame->StylePosition()->mAlignSelf)
|
||||
{
|
||||
MOZ_ASSERT(mFrame, "expecting a non-null child frame");
|
||||
MOZ_ASSERT(!mFrame->IsAbsolutelyPositioned(),
|
||||
"abspos child frames should not be treated as flex items");
|
||||
MOZ_ASSERT(mFrame->GetType() != nsGkAtoms::placeholderFrame,
|
||||
"placeholder frames should not be treated as flex items");
|
||||
MOZ_ASSERT(!(mFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW),
|
||||
"out-of-flow frames should not be treated as flex items");
|
||||
|
||||
SetFlexBaseSizeAndMainSize(aFlexBaseSize);
|
||||
|
||||
@ -1126,8 +1128,10 @@ FlexItem::FlexItem(nsIFrame* aChildFrame, nscoord aCrossSize)
|
||||
MOZ_ASSERT(NS_STYLE_VISIBILITY_COLLAPSE ==
|
||||
mFrame->StyleVisibility()->mVisible,
|
||||
"Should only make struts for children with 'visibility:collapse'");
|
||||
MOZ_ASSERT(!mFrame->IsAbsolutelyPositioned(),
|
||||
"abspos child frames should not be treated as flex items");
|
||||
MOZ_ASSERT(mFrame->GetType() != nsGkAtoms::placeholderFrame,
|
||||
"placeholder frames should not be treated as flex items");
|
||||
MOZ_ASSERT(!(mFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW),
|
||||
"out-of-flow frames should not be treated as flex items");
|
||||
}
|
||||
|
||||
nscoord
|
||||
|
@ -15,7 +15,7 @@ nsIFrame::IsFlexItem() const
|
||||
{
|
||||
return mParent &&
|
||||
mParent->GetType() == nsGkAtoms::flexContainerFrame &&
|
||||
!IsAbsolutelyPositioned();
|
||||
!(GetStateBits() & NS_FRAME_OUT_OF_FLOW);
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
x
Reference in New Issue
Block a user