mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 17:25:36 +00:00
Bug 1424524 part 1 - Use IsFlexContainerForLegacyBox() to avoid code duplication. r=dholbert
MozReview-Commit-ID: 6LY3iW4YnbY
This commit is contained in:
parent
b864765f92
commit
979ed84b2e
@ -10717,9 +10717,8 @@ static bool
|
||||
FrameWantsToBeInAnonymousItem(const nsIFrame* aContainerFrame,
|
||||
const nsIFrame* aFrame)
|
||||
{
|
||||
LayoutFrameType containerType = aContainerFrame->Type();
|
||||
MOZ_ASSERT(containerType == LayoutFrameType::FlexContainer ||
|
||||
containerType == LayoutFrameType::GridContainer);
|
||||
MOZ_ASSERT(aContainerFrame->Type() == LayoutFrameType::FlexContainer ||
|
||||
aContainerFrame->Type() == LayoutFrameType::GridContainer);
|
||||
|
||||
// Any line-participant frames (e.g. text) definitely want to be wrapped in
|
||||
// an anonymous flex/grid item.
|
||||
@ -10729,8 +10728,7 @@ FrameWantsToBeInAnonymousItem(const nsIFrame* aContainerFrame,
|
||||
|
||||
// If the container is a -webkit-box/-webkit-inline-box, then placeholders
|
||||
// also need to be wrapped, for compatibility.
|
||||
if (containerType == LayoutFrameType::FlexContainer &&
|
||||
aContainerFrame->HasAnyStateBits(NS_STATE_FLEX_IS_LEGACY_WEBKIT_BOX) &&
|
||||
if (IsFlexContainerForLegacyBox(aContainerFrame) &&
|
||||
aFrame->IsPlaceholderFrame()) {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user