Bug 1398963 part 1: Rename frame-state bit from NS_STATE_FLEX_IS_LEGACY_WEBKIT_BOX to NS_STATE_FLEX_IS_EMULATING_LEGACY_BOX (idempotent patch). r=mats

This patch isn't changing semantics of this bit at all - it just renames it to
a more general name. In other words, this patch does not change behavior.

MozReview-Commit-ID: 4wb13X4YinJ

--HG--
extra : rebase_source : 9a89ce8782f735d7f4a8ad471606a2af5201ac83
This commit is contained in:
Daniel Holbert 2017-12-18 12:17:10 -06:00
Родитель 4f18e92ffb
Коммит 458c3ac132
4 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -385,7 +385,7 @@ static inline bool
IsFlexContainerForLegacyBox(const nsIFrame* aFrame) IsFlexContainerForLegacyBox(const nsIFrame* aFrame)
{ {
return aFrame->IsFlexContainerFrame() && return aFrame->IsFlexContainerFrame() &&
aFrame->HasAnyStateBits(NS_STATE_FLEX_IS_LEGACY_WEBKIT_BOX); aFrame->HasAnyStateBits(NS_STATE_FLEX_IS_EMULATING_LEGACY_BOX);
} }
#if DEBUG #if DEBUG

Просмотреть файл

@ -98,7 +98,7 @@ IsLegacyBox(const nsIFrame* aFlexContainer)
{ {
MOZ_ASSERT(aFlexContainer->IsFlexContainerFrame(), MOZ_ASSERT(aFlexContainer->IsFlexContainerFrame(),
"only flex containers may be passed to this function"); "only flex containers may be passed to this function");
return aFlexContainer->HasAnyStateBits(NS_STATE_FLEX_IS_LEGACY_WEBKIT_BOX); return aFlexContainer->HasAnyStateBits(NS_STATE_FLEX_IS_EMULATING_LEGACY_BOX);
} }
// Returns the OrderingProperty enum that we should pass to // Returns the OrderingProperty enum that we should pass to
@ -2243,7 +2243,7 @@ nsFlexContainerFrame::Init(nsIContent* aContent,
} }
if (isLegacyBox) { if (isLegacyBox) {
AddStateBits(NS_STATE_FLEX_IS_LEGACY_WEBKIT_BOX); AddStateBits(NS_STATE_FLEX_IS_EMULATING_LEGACY_BOX);
} }
} }

Просмотреть файл

@ -5601,7 +5601,7 @@ nsFrame::ComputeSize(gfxContext* aRenderingContext,
} }
} }
bool isFlexItem = parentFrame && parentFrame->IsFlexContainerFrame() && bool isFlexItem = parentFrame && parentFrame->IsFlexContainerFrame() &&
!parentFrame->HasAnyStateBits(NS_STATE_FLEX_IS_LEGACY_WEBKIT_BOX) && !parentFrame->HasAnyStateBits(NS_STATE_FLEX_IS_EMULATING_LEGACY_BOX) &&
!HasAnyStateBits(NS_FRAME_OUT_OF_FLOW); !HasAnyStateBits(NS_FRAME_OUT_OF_FLOW);
bool isInlineFlexItem = false; bool isInlineFlexItem = false;
if (isFlexItem) { if (isFlexItem) {
@ -5832,7 +5832,7 @@ nsFrame::ComputeSizeWithIntrinsicDimensions(gfxContext* aRenderingConte
const bool isGridItem = parentFrame && parentFrame->IsGridContainerFrame() && const bool isGridItem = parentFrame && parentFrame->IsGridContainerFrame() &&
!HasAnyStateBits(NS_FRAME_OUT_OF_FLOW); !HasAnyStateBits(NS_FRAME_OUT_OF_FLOW);
const bool isFlexItem = parentFrame && parentFrame->IsFlexContainerFrame() && const bool isFlexItem = parentFrame && parentFrame->IsFlexContainerFrame() &&
!parentFrame->HasAnyStateBits(NS_STATE_FLEX_IS_LEGACY_WEBKIT_BOX) && !parentFrame->HasAnyStateBits(NS_STATE_FLEX_IS_EMULATING_LEGACY_BOX) &&
!HasAnyStateBits(NS_FRAME_OUT_OF_FLOW); !HasAnyStateBits(NS_FRAME_OUT_OF_FLOW);
bool isInlineFlexItem = false; bool isInlineFlexItem = false;
Maybe<nsStyleCoord> imposedMainSizeStyleCoord; Maybe<nsStyleCoord> imposedMainSizeStyleCoord;

Просмотреть файл

@ -321,7 +321,7 @@ FRAME_STATE_BIT(FlexContainer, 20, NS_STATE_FLEX_NORMAL_FLOW_CHILDREN_IN_CSS_ORD
// Set for a flex container that is emulating a legacy // Set for a flex container that is emulating a legacy
// 'display:-webkit-{inline-}box' container. // 'display:-webkit-{inline-}box' container.
FRAME_STATE_BIT(FlexContainer, 21, NS_STATE_FLEX_IS_LEGACY_WEBKIT_BOX) FRAME_STATE_BIT(FlexContainer, 21, NS_STATE_FLEX_IS_EMULATING_LEGACY_BOX)
// True iff computed flex values should be generated on the next reflow // True iff computed flex values should be generated on the next reflow
FRAME_STATE_BIT(FlexContainer, 22, NS_STATE_FLEX_GENERATE_COMPUTED_VALUES) FRAME_STATE_BIT(FlexContainer, 22, NS_STATE_FLEX_GENERATE_COMPUTED_VALUES)