mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 864553 part 1: Remove ifdefs for MOZ_FLEXBOX and configure.in MOZ_FLEXBOX chunk. r=dbaron
This commit is contained in:
parent
fe1b0d0f84
commit
cc7305fa0e
@ -4183,7 +4183,6 @@ ENABLE_SYSTEM_EXTENSION_DIRS=1
|
||||
MOZ_BRANDING_DIRECTORY=
|
||||
MOZ_OFFICIAL_BRANDING=
|
||||
MOZ_FEEDS=1
|
||||
MOZ_FLEXBOX=1
|
||||
MOZ_WEBAPP_RUNTIME=
|
||||
MOZ_JSDEBUGGER=1
|
||||
MOZ_AUTH_EXTENSION=1
|
||||
@ -6204,13 +6203,6 @@ if test -n "$MOZ_USE_NATIVE_POPUP_WINDOWS"; then
|
||||
AC_DEFINE(MOZ_USE_NATIVE_POPUP_WINDOWS)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl CSS3 Flexbox Support
|
||||
dnl ========================================================
|
||||
if test -n "$MOZ_FLEXBOX"; then
|
||||
AC_DEFINE(MOZ_FLEXBOX)
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Build Freetype in the tree
|
||||
dnl ========================================================
|
||||
@ -8812,7 +8804,6 @@ AC_SUBST(MOZ_NATIVE_JPEG)
|
||||
AC_SUBST(MOZ_NATIVE_PNG)
|
||||
AC_SUBST(MOZ_NATIVE_BZ2)
|
||||
|
||||
AC_SUBST(MOZ_FLEXBOX)
|
||||
AC_SUBST(MOZ_JPEG_CFLAGS)
|
||||
AC_SUBST(MOZ_JPEG_LIBS)
|
||||
AC_SUBST(MOZ_BZ2_CFLAGS)
|
||||
|
@ -101,9 +101,7 @@
|
||||
#include "nsIDOMXULDocument.h"
|
||||
#include "nsIXULDocument.h"
|
||||
#endif
|
||||
#ifdef MOZ_FLEXBOX
|
||||
#include "nsFlexContainerFrame.h"
|
||||
#endif
|
||||
#ifdef ACCESSIBILITY
|
||||
#include "nsAccessibilityService.h"
|
||||
#endif
|
||||
@ -349,7 +347,6 @@ static int32_t FFWC_recursions=0;
|
||||
static int32_t FFWC_nextInFlows=0;
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
// Returns true if aFrame is an anonymous flex item
|
||||
static inline bool
|
||||
IsAnonymousFlexItem(const nsIFrame* aFrame)
|
||||
@ -357,7 +354,6 @@ IsAnonymousFlexItem(const nsIFrame* aFrame)
|
||||
const nsIAtom* pseudoType = aFrame->StyleContext()->GetPseudo();
|
||||
return pseudoType == nsCSSAnonBoxes::anonymousFlexItem;
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
static inline nsIFrame*
|
||||
GetFieldSetBlockFrame(nsIFrame* aFieldsetFrame)
|
||||
@ -4285,12 +4281,10 @@ nsCSSFrameConstructor::FindDisplayData(const nsStyleDisplay* aDisplay,
|
||||
{ NS_STYLE_DISPLAY_INLINE,
|
||||
FULL_CTOR_FCDATA(FCDATA_IS_INLINE | FCDATA_IS_LINE_PARTICIPANT,
|
||||
&nsCSSFrameConstructor::ConstructInline) },
|
||||
#ifdef MOZ_FLEXBOX
|
||||
{ NS_STYLE_DISPLAY_FLEX,
|
||||
FCDATA_DECL(FCDATA_MAY_NEED_SCROLLFRAME, NS_NewFlexContainerFrame) },
|
||||
{ NS_STYLE_DISPLAY_INLINE_FLEX,
|
||||
FCDATA_DECL(FCDATA_MAY_NEED_SCROLLFRAME, NS_NewFlexContainerFrame) },
|
||||
#endif // MOZ_FLEXBOX
|
||||
{ NS_STYLE_DISPLAY_TABLE,
|
||||
FULL_CTOR_FCDATA(0, &nsCSSFrameConstructor::ConstructTable) },
|
||||
{ NS_STYLE_DISPLAY_INLINE_TABLE,
|
||||
@ -9153,7 +9147,6 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
// Might need to reconstruct things if the removed frame's nextSibling is an
|
||||
// anonymous flex item. The removed frame might've been what divided two
|
||||
// runs of inline content into two anonymous flex items, which would now
|
||||
@ -9200,7 +9193,6 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame,
|
||||
true);
|
||||
return true;
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
if (aFrame->GetType() == nsGkAtoms::popupSetFrame) {
|
||||
@ -9474,7 +9466,6 @@ nsCSSFrameConstructor::sPseudoParentData[eParentTypeCount] = {
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
void
|
||||
nsCSSFrameConstructor::CreateNeededAnonFlexItems(
|
||||
nsFrameConstructorState& aState,
|
||||
@ -9590,7 +9581,6 @@ nsCSSFrameConstructor::CreateNeededAnonFlexItems(
|
||||
iter.InsertItem(newItem);
|
||||
} while (!iter.IsDone());
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
/*
|
||||
* This function works as follows: we walk through the child list (aItems) and
|
||||
@ -9812,11 +9802,9 @@ nsCSSFrameConstructor::ConstructFramesFromItemList(nsFrameConstructorState& aSta
|
||||
|
||||
CreateNeededTablePseudos(aState, aItems, aParentFrame);
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
if (aParentFrame->GetType() == nsGkAtoms::flexContainerFrame) {
|
||||
CreateNeededAnonFlexItems(aState, aItems, aParentFrame);
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
#ifdef DEBUG
|
||||
for (FCItemIterator iter(aItems); !iter.IsDone(); iter.Next()) {
|
||||
@ -11314,7 +11302,6 @@ nsCSSFrameConstructor::WipeContainingBlock(nsFrameConstructorState& aState,
|
||||
|
||||
nsIFrame* nextSibling = ::GetInsertNextSibling(aFrame, aPrevSibling);
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
// Situation #2 is a flex container frame into which we're inserting new
|
||||
// inline non-replaced children, adjacent to an existing anonymous flex item.
|
||||
if (aFrame->GetType() == nsGkAtoms::flexContainerFrame) {
|
||||
@ -11372,7 +11359,6 @@ nsCSSFrameConstructor::WipeContainingBlock(nsFrameConstructorState& aState,
|
||||
// If we get here, then everything in |aItems| needs to be wrapped in
|
||||
// an anonymous flex item. That's where it's already going - good!
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
// Situation #4 is a case when table pseudo-frames don't work out right
|
||||
ParentType parentType = GetParentType(aFrame);
|
||||
@ -12223,7 +12209,6 @@ Iterator::SkipItemsWantingParentType(ParentType aParentType)
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
bool
|
||||
nsCSSFrameConstructor::FrameConstructionItem::
|
||||
NeedsAnonFlexItem(const nsFrameConstructorState& aState)
|
||||
@ -12274,7 +12259,6 @@ Iterator::SkipItemsThatDontNeedAnonFlexItem(
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
inline bool
|
||||
nsCSSFrameConstructor::FrameConstructionItemList::
|
||||
|
@ -927,7 +927,6 @@ private:
|
||||
// iterator must not be done when this is called.
|
||||
inline bool SkipItemsWantingParentType(ParentType aParentType);
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
// Skip over non-replaced inline frames and positioned frames.
|
||||
// Return whether the iterator is done after doing that.
|
||||
// The iterator must not be done when this is called.
|
||||
@ -939,7 +938,6 @@ private:
|
||||
// The iterator must not be done when this is called.
|
||||
inline bool SkipItemsThatDontNeedAnonFlexItem(
|
||||
const nsFrameConstructorState& aState);
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
// Skip over whitespace. Return whether the iterator is done after doing
|
||||
// that. The iterator must not be done, and must be pointing to a
|
||||
@ -1057,9 +1055,7 @@ private:
|
||||
|
||||
// Indicates whether (when in a flexbox container) this item needs to be
|
||||
// wrapped in an anonymous block.
|
||||
#ifdef MOZ_FLEXBOX
|
||||
bool NeedsAnonFlexItem(const nsFrameConstructorState& aState);
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
// Don't call this unless the frametree really depends on the answer!
|
||||
// Especially so for generated content, where we don't want to reframe
|
||||
@ -1137,11 +1133,9 @@ private:
|
||||
* @param aItems the child frame construction items before pseudo creation
|
||||
* @param aParentFrame the flex container frame
|
||||
*/
|
||||
#ifdef MOZ_FLEXBOX
|
||||
void CreateNeededAnonFlexItems(nsFrameConstructorState& aState,
|
||||
FrameConstructionItemList& aItems,
|
||||
nsIFrame* aParentFrame);
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
/**
|
||||
* Function to create the table pseudo items we need.
|
||||
|
@ -118,14 +118,12 @@ typedef FrameMetrics::ViewID ViewID;
|
||||
|
||||
static ViewID sScrollIdCounter = FrameMetrics::START_SCROLL_ID;
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
// These are indices into kDisplayKTable. They'll be initialized
|
||||
// the first time that FlexboxEnabledPrefChangeCallback() is invoked.
|
||||
static int32_t sIndexOfFlexInDisplayTable;
|
||||
static int32_t sIndexOfInlineFlexInDisplayTable;
|
||||
// This tracks whether those ^^ indices have been initialized
|
||||
static bool sAreFlexKeywordIndicesInitialized = false;
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
typedef nsDataHashtable<nsUint64HashKey, nsIContent*> ContentMap;
|
||||
static ContentMap* sContentMap = nullptr;
|
||||
@ -140,7 +138,6 @@ static ContentMap& GetContentMap() {
|
||||
// When the pref "layout.css.flexbox.enabled" changes, this function is invoked
|
||||
// to let us update kDisplayKTable, to selectively disable or restore the
|
||||
// entries for "flex" and "inline-flex" in that table.
|
||||
#ifdef MOZ_FLEXBOX
|
||||
static int
|
||||
FlexboxEnabledPrefChangeCallback(const char* aPrefName, void* aClosure)
|
||||
{
|
||||
@ -178,7 +175,6 @@ FlexboxEnabledPrefChangeCallback(const char* aPrefName, void* aClosure)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
template <class AnimationsOrTransitions>
|
||||
static AnimationsOrTransitions*
|
||||
@ -3066,7 +3062,6 @@ nsLayoutUtils::ComputeSizeWithIntrinsicDimensions(
|
||||
bool isFlexItem = aFrame->IsFlexItem();
|
||||
bool isHorizontalFlexItem = false;
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
if (isFlexItem) {
|
||||
// Flex items use their "flex-basis" property in place of their main-size
|
||||
// property (e.g. "width") for sizing purposes, *unless* they have
|
||||
@ -3098,8 +3093,6 @@ nsLayoutUtils::ComputeSizeWithIntrinsicDimensions(
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
|
||||
// Handle intrinsic sizes and their interaction with
|
||||
// {min-,max-,}{width,height} according to the rules in
|
||||
@ -4958,11 +4951,9 @@ nsLayoutUtils::Initialize()
|
||||
Preferences::AddBoolVarCache(&sInvalidationDebuggingIsEnabled,
|
||||
"nglayout.debug.invalidation");
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
Preferences::RegisterCallback(FlexboxEnabledPrefChangeCallback,
|
||||
FLEXBOX_ENABLED_PREF_NAME);
|
||||
FlexboxEnabledPrefChangeCallback(FLEXBOX_ENABLED_PREF_NAME, nullptr);
|
||||
#endif // MOZ_FLEXBOX
|
||||
}
|
||||
|
||||
/* static */
|
||||
@ -4974,10 +4965,8 @@ nsLayoutUtils::Shutdown()
|
||||
sContentMap = nullptr;
|
||||
}
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
Preferences::UnregisterCallback(FlexboxEnabledPrefChangeCallback,
|
||||
FLEXBOX_ENABLED_PREF_NAME);
|
||||
#endif // MOZ_FLEXBOX
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@ -393,12 +393,9 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
|
||||
#define NS_STYLE_DISPLAY_POPUP 27
|
||||
#define NS_STYLE_DISPLAY_GROUPBOX 28
|
||||
#endif
|
||||
#ifdef MOZ_FLEXBOX
|
||||
#define NS_STYLE_DISPLAY_FLEX 29
|
||||
#define NS_STYLE_DISPLAY_INLINE_FLEX 30
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
// See nsStylePosition
|
||||
#define NS_STYLE_ALIGN_ITEMS_FLEX_START 0
|
||||
#define NS_STYLE_ALIGN_ITEMS_FLEX_END 1
|
||||
@ -432,7 +429,6 @@ static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
|
||||
#define NS_STYLE_JUSTIFY_CONTENT_CENTER 2
|
||||
#define NS_STYLE_JUSTIFY_CONTENT_SPACE_BETWEEN 3
|
||||
#define NS_STYLE_JUSTIFY_CONTENT_SPACE_AROUND 4
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
// See nsStyleDisplay
|
||||
#define NS_STYLE_FLOAT_NONE 0
|
||||
|
@ -62,11 +62,9 @@ CPPSRCS = \
|
||||
nsVideoFrame.cpp \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_FLEXBOX
|
||||
CPPSRCS += \
|
||||
nsFlexContainerFrame.cpp \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
|
||||
CMMSRCS += \
|
||||
|
@ -3820,7 +3820,6 @@ nsFrame::ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
bool isFlexItem = IsFlexItem();
|
||||
bool isHorizontalFlexItem = false;
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
if (isFlexItem) {
|
||||
// Flex items use their "flex-basis" property in place of their main-size
|
||||
// property (e.g. "width") for sizing purposes, *unless* they have
|
||||
@ -3852,7 +3851,6 @@ nsFrame::ComputeSize(nsRenderingContext *aRenderingContext,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
// Compute width
|
||||
|
||||
|
@ -686,9 +686,7 @@ nsHTMLReflowState::InitFrameType(nsIAtom* aFrameType)
|
||||
case NS_STYLE_DISPLAY_LIST_ITEM:
|
||||
case NS_STYLE_DISPLAY_TABLE:
|
||||
case NS_STYLE_DISPLAY_TABLE_CAPTION:
|
||||
#ifdef MOZ_FLEXBOX
|
||||
case NS_STYLE_DISPLAY_FLEX:
|
||||
#endif // MOZ_FLEXBOX
|
||||
frameType = NS_CSS_FRAME_TYPE_BLOCK;
|
||||
break;
|
||||
|
||||
@ -698,9 +696,7 @@ nsHTMLReflowState::InitFrameType(nsIAtom* aFrameType)
|
||||
case NS_STYLE_DISPLAY_INLINE_BOX:
|
||||
case NS_STYLE_DISPLAY_INLINE_GRID:
|
||||
case NS_STYLE_DISPLAY_INLINE_STACK:
|
||||
#ifdef MOZ_FLEXBOX
|
||||
case NS_STYLE_DISPLAY_INLINE_FLEX:
|
||||
#endif // MOZ_FLEXBOX
|
||||
frameType = NS_CSS_FRAME_TYPE_INLINE;
|
||||
break;
|
||||
|
||||
@ -1780,7 +1776,6 @@ IsSideCaption(nsIFrame* aFrame, const nsStyleDisplay* aStyleDisplay)
|
||||
captionSide == NS_STYLE_CAPTION_SIDE_RIGHT;
|
||||
}
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
static nsFlexContainerFrame*
|
||||
GetFlexContainer(nsIFrame* aFrame)
|
||||
{
|
||||
@ -1792,7 +1787,6 @@ GetFlexContainer(nsIFrame* aFrame)
|
||||
|
||||
return static_cast<nsFlexContainerFrame*>(parent);
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
// Flex items resolve percentage margin & padding against the flex
|
||||
// container's height (which is the containing block height).
|
||||
@ -2036,7 +2030,6 @@ nsHTMLReflowState::InitConstraints(nsPresContext* aPresContext,
|
||||
computeSizeFlags |= nsIFrame::eShrinkWrap;
|
||||
}
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
const nsFlexContainerFrame* flexContainerFrame = GetFlexContainer(frame);
|
||||
if (flexContainerFrame) {
|
||||
computeSizeFlags |= nsIFrame::eShrinkWrap;
|
||||
@ -2051,7 +2044,6 @@ nsHTMLReflowState::InitConstraints(nsPresContext* aPresContext,
|
||||
"We're not in a flex container, so the flag "
|
||||
"'mIsFlexContainerMeasuringHeight' shouldn't be set");
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
nsSize size =
|
||||
frame->ComputeSize(rendContext,
|
||||
@ -2078,9 +2070,7 @@ nsHTMLReflowState::InitConstraints(nsPresContext* aPresContext,
|
||||
if (isBlock &&
|
||||
!IsSideCaption(frame, mStyleDisplay) &&
|
||||
mStyleDisplay->mDisplay != NS_STYLE_DISPLAY_INLINE_TABLE
|
||||
#ifdef MOZ_FLEXBOX
|
||||
&& !flexContainerFrame
|
||||
#endif // MOZ_FLEXBOX
|
||||
)
|
||||
CalculateBlockSideMargins(availableWidth, mComputedWidth, aFrameType);
|
||||
}
|
||||
|
@ -841,7 +841,6 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const
|
||||
AppendValueToString(subprops[1], aValue);
|
||||
break;
|
||||
}
|
||||
#ifdef MOZ_FLEXBOX
|
||||
case eCSSProperty_flex: {
|
||||
// flex-grow, flex-shrink, flex-basis, separated by single space
|
||||
const nsCSSProperty* subprops =
|
||||
@ -854,7 +853,6 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue) const
|
||||
AppendValueToString(subprops[2], aValue);
|
||||
break;
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
case eCSSProperty__moz_transform: {
|
||||
// shorthands that are just aliases with different parsing rules
|
||||
const nsCSSProperty* subprops =
|
||||
|
@ -553,10 +553,8 @@ protected:
|
||||
bool ParseCalcTerm(nsCSSValue& aValue, int32_t& aVariantMask);
|
||||
bool RequireWhitespace();
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
// For "flex" shorthand property, defined in CSS3 Flexbox
|
||||
bool ParseFlex();
|
||||
#endif
|
||||
|
||||
// for 'clip' and '-moz-image-region'
|
||||
bool ParseRect(nsCSSProperty aPropID);
|
||||
@ -5560,7 +5558,6 @@ CSSParserImpl::ParseElement(nsCSSValue& aValue)
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
// flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]
|
||||
bool
|
||||
CSSParserImpl::ParseFlex()
|
||||
@ -5677,7 +5674,6 @@ CSSParserImpl::ParseFlex()
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// <color-stop> : <color> [ <percentage> | <length> ]?
|
||||
bool
|
||||
@ -6505,10 +6501,8 @@ CSSParserImpl::ParsePropertyByFunction(nsCSSProperty aPropID)
|
||||
return ParseCounterData(aPropID);
|
||||
case eCSSProperty_cursor:
|
||||
return ParseCursor();
|
||||
#ifdef MOZ_FLEXBOX
|
||||
case eCSSProperty_flex:
|
||||
return ParseFlex();
|
||||
#endif // MOZ_FLEXBOX
|
||||
case eCSSProperty_font:
|
||||
return ParseFont();
|
||||
case eCSSProperty_image_region:
|
||||
|
@ -1555,7 +1555,6 @@ CSS_PROP_TABLEBORDER(
|
||||
kEmptyCellsKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
#ifdef MOZ_FLEXBOX
|
||||
CSS_PROP_POSITION(
|
||||
align-items,
|
||||
align_items,
|
||||
@ -1655,7 +1654,6 @@ CSS_PROP_POSITION(
|
||||
kJustifyContentKTable,
|
||||
offsetof(nsStylePosition, mJustifyContent),
|
||||
eStyleAnimType_EnumU8)
|
||||
#endif // MOZ_FLEXBOX
|
||||
CSS_PROP_DISPLAY(
|
||||
float,
|
||||
float,
|
||||
|
@ -931,13 +931,11 @@ int32_t nsCSSProps::kDisplayKTable[] = {
|
||||
eCSSKeyword__moz_popup, NS_STYLE_DISPLAY_POPUP,
|
||||
eCSSKeyword__moz_groupbox, NS_STYLE_DISPLAY_GROUPBOX,
|
||||
#endif
|
||||
#ifdef MOZ_FLEXBOX
|
||||
// XXXdholbert NOTE: These currently need to be the last entries in the
|
||||
// table, because the "is flexbox enabled" pref that disables these will
|
||||
// disable all the entries after them, too.
|
||||
eCSSKeyword_flex, NS_STYLE_DISPLAY_FLEX,
|
||||
eCSSKeyword_inline_flex, NS_STYLE_DISPLAY_INLINE_FLEX,
|
||||
#endif // MOZ_FLEXBOX
|
||||
eCSSKeyword_UNKNOWN,-1
|
||||
};
|
||||
|
||||
@ -948,7 +946,6 @@ const int32_t nsCSSProps::kEmptyCellsKTable[] = {
|
||||
eCSSKeyword_UNKNOWN,-1
|
||||
};
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
const int32_t nsCSSProps::kAlignItemsKTable[] = {
|
||||
eCSSKeyword_flex_start, NS_STYLE_ALIGN_ITEMS_FLEX_START,
|
||||
eCSSKeyword_flex_end, NS_STYLE_ALIGN_ITEMS_FLEX_END,
|
||||
@ -985,7 +982,6 @@ const int32_t nsCSSProps::kJustifyContentKTable[] = {
|
||||
eCSSKeyword_space_around, NS_STYLE_JUSTIFY_CONTENT_SPACE_AROUND,
|
||||
eCSSKeyword_UNKNOWN,-1
|
||||
};
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
const int32_t nsCSSProps::kFloatKTable[] = {
|
||||
eCSSKeyword_none, NS_STYLE_FLOAT_NONE,
|
||||
@ -2258,14 +2254,12 @@ static const nsCSSProperty gColumnRuleSubpropTable[] = {
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
static const nsCSSProperty gFlexSubpropTable[] = {
|
||||
eCSSProperty_flex_grow,
|
||||
eCSSProperty_flex_shrink,
|
||||
eCSSProperty_flex_basis,
|
||||
eCSSProperty_UNKNOWN
|
||||
};
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
static const nsCSSProperty gOverflowSubpropTable[] = {
|
||||
eCSSProperty_overflow_x,
|
||||
|
@ -393,12 +393,10 @@ public:
|
||||
static int32_t kDisplayKTable[];
|
||||
static const int32_t kElevationKTable[];
|
||||
static const int32_t kEmptyCellsKTable[];
|
||||
#ifdef MOZ_FLEXBOX
|
||||
static const int32_t kAlignItemsKTable[];
|
||||
static const int32_t kAlignSelfKTable[];
|
||||
static const int32_t kFlexDirectionKTable[];
|
||||
static const int32_t kJustifyContentKTable[];
|
||||
#endif // MOZ_FLEXBOX
|
||||
static const int32_t kFloatKTable[];
|
||||
static const int32_t kFloatEdgeKTable[];
|
||||
static const int32_t kFontKTable[];
|
||||
|
@ -3165,7 +3165,6 @@ nsComputedDOMStyle::DoGetBorderImageRepeat()
|
||||
return valueList;
|
||||
}
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
CSSValue*
|
||||
nsComputedDOMStyle::DoGetAlignItems()
|
||||
{
|
||||
@ -3266,7 +3265,6 @@ nsComputedDOMStyle::DoGetJustifyContent()
|
||||
nsCSSProps::kJustifyContentKTable));
|
||||
return val;
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
CSSValue*
|
||||
nsComputedDOMStyle::DoGetFloatEdge()
|
||||
@ -4845,10 +4843,8 @@ nsComputedDOMStyle::GetQueryablePropertyMap(uint32_t* aLength)
|
||||
* Implementations of CSS styles *
|
||||
\* ***************************** */
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
COMPUTED_STYLE_MAP_ENTRY(align_items, AlignItems),
|
||||
COMPUTED_STYLE_MAP_ENTRY(align_self, AlignSelf),
|
||||
#endif // MOZ_FLEXBOX
|
||||
//// COMPUTED_STYLE_MAP_ENTRY(animation, Animation),
|
||||
COMPUTED_STYLE_MAP_ENTRY(animation_delay, AnimationDelay),
|
||||
COMPUTED_STYLE_MAP_ENTRY(animation_direction, AnimationDirection),
|
||||
@ -4913,12 +4909,10 @@ nsComputedDOMStyle::GetQueryablePropertyMap(uint32_t* aLength)
|
||||
COMPUTED_STYLE_MAP_ENTRY(direction, Direction),
|
||||
COMPUTED_STYLE_MAP_ENTRY(display, Display),
|
||||
COMPUTED_STYLE_MAP_ENTRY(empty_cells, EmptyCells),
|
||||
#ifdef MOZ_FLEXBOX
|
||||
COMPUTED_STYLE_MAP_ENTRY(flex_basis, FlexBasis),
|
||||
COMPUTED_STYLE_MAP_ENTRY(flex_direction, FlexDirection),
|
||||
COMPUTED_STYLE_MAP_ENTRY(flex_grow, FlexGrow),
|
||||
COMPUTED_STYLE_MAP_ENTRY(flex_shrink, FlexShrink),
|
||||
#endif // MOZ_FLEXBOX
|
||||
COMPUTED_STYLE_MAP_ENTRY(float, Float),
|
||||
//// COMPUTED_STYLE_MAP_ENTRY(font, Font),
|
||||
COMPUTED_STYLE_MAP_ENTRY(font_family, FontFamily),
|
||||
@ -4938,9 +4932,7 @@ nsComputedDOMStyle::GetQueryablePropertyMap(uint32_t* aLength)
|
||||
COMPUTED_STYLE_MAP_ENTRY(font_weight, FontWeight),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(height, Height),
|
||||
COMPUTED_STYLE_MAP_ENTRY(ime_mode, IMEMode),
|
||||
#ifdef MOZ_FLEXBOX
|
||||
COMPUTED_STYLE_MAP_ENTRY(justify_content, JustifyContent),
|
||||
#endif // MOZ_FLEXBOX
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(left, Left),
|
||||
COMPUTED_STYLE_MAP_ENTRY(letter_spacing, LetterSpacing),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(line_height, LineHeight),
|
||||
@ -4962,9 +4954,7 @@ nsComputedDOMStyle::GetQueryablePropertyMap(uint32_t* aLength)
|
||||
COMPUTED_STYLE_MAP_ENTRY(opacity, Opacity),
|
||||
// COMPUTED_STYLE_MAP_ENTRY(orphans, Orphans),
|
||||
//// COMPUTED_STYLE_MAP_ENTRY(outline, Outline),
|
||||
#ifdef MOZ_FLEXBOX
|
||||
COMPUTED_STYLE_MAP_ENTRY(order, Order),
|
||||
#endif // MOZ_FLEXBOX
|
||||
COMPUTED_STYLE_MAP_ENTRY(outline_color, OutlineColor),
|
||||
COMPUTED_STYLE_MAP_ENTRY(outline_offset, OutlineOffset),
|
||||
COMPUTED_STYLE_MAP_ENTRY(outline_style, OutlineStyle),
|
||||
|
@ -386,7 +386,6 @@ private:
|
||||
mozilla::dom::CSSValue* DoGetAnimationIterationCount();
|
||||
mozilla::dom::CSSValue* DoGetAnimationPlayState();
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
/* CSS Flexbox properties */
|
||||
mozilla::dom::CSSValue* DoGetAlignItems();
|
||||
mozilla::dom::CSSValue* DoGetAlignSelf();
|
||||
@ -396,7 +395,6 @@ private:
|
||||
mozilla::dom::CSSValue* DoGetFlexShrink();
|
||||
mozilla::dom::CSSValue* DoGetOrder();
|
||||
mozilla::dom::CSSValue* DoGetJustifyContent();
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
/* SVG properties */
|
||||
mozilla::dom::CSSValue* DoGetFill();
|
||||
|
@ -135,9 +135,7 @@ nsRuleNode::EnsureBlockDisplay(uint8_t& display)
|
||||
case NS_STYLE_DISPLAY_TABLE :
|
||||
case NS_STYLE_DISPLAY_BLOCK :
|
||||
case NS_STYLE_DISPLAY_LIST_ITEM :
|
||||
#ifdef MOZ_FLEXBOX
|
||||
case NS_STYLE_DISPLAY_FLEX :
|
||||
#endif // MOZ_FLEXBOX
|
||||
// do not muck with these at all - already blocks
|
||||
// This is equivalent to nsStyleDisplay::IsBlockOutside. (XXX Maybe we
|
||||
// should just call that?)
|
||||
@ -150,12 +148,10 @@ nsRuleNode::EnsureBlockDisplay(uint8_t& display)
|
||||
display = NS_STYLE_DISPLAY_TABLE;
|
||||
break;
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
case NS_STYLE_DISPLAY_INLINE_FLEX:
|
||||
// make inline flex containers into flex containers
|
||||
display = NS_STYLE_DISPLAY_FLEX;
|
||||
break;
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
default :
|
||||
// make it a block
|
||||
@ -6631,7 +6627,6 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
|
||||
SETDSC_ENUMERATED, parentPos->mBoxSizing,
|
||||
NS_STYLE_BOX_SIZING_CONTENT, 0, 0, 0, 0);
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
// align-items: enum, inherit, initial
|
||||
SetDiscrete(*aRuleData->ValueForAlignItems(),
|
||||
pos->mAlignItems, canStoreInRuleTree,
|
||||
@ -6721,7 +6716,6 @@ nsRuleNode::ComputePositionData(void* aStartStruct,
|
||||
pos->mJustifyContent, canStoreInRuleTree,
|
||||
SETDSC_ENUMERATED, parentPos->mJustifyContent,
|
||||
NS_STYLE_JUSTIFY_CONTENT_FLEX_START, 0, 0, 0, 0);
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
// z-index
|
||||
const nsCSSValue* zIndexValue = aRuleData->ValueForZIndex();
|
||||
|
@ -420,7 +420,6 @@ nsStyleAnimation::ComputeDistance(nsCSSProperty aProperty,
|
||||
return true;
|
||||
}
|
||||
case eUnit_Float: {
|
||||
#ifdef MOZ_FLEXBOX
|
||||
// Special case for flex-grow and flex-shrink: animations are
|
||||
// disallowed between 0 and other values.
|
||||
if ((aProperty == eCSSProperty_flex_grow ||
|
||||
@ -430,7 +429,6 @@ nsStyleAnimation::ComputeDistance(nsCSSProperty aProperty,
|
||||
aStartValue.GetFloatValue() != aEndValue.GetFloatValue()) {
|
||||
return false;
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
float startFloat = aStartValue.GetFloatValue();
|
||||
float endFloat = aEndValue.GetFloatValue();
|
||||
@ -1758,7 +1756,6 @@ nsStyleAnimation::AddWeighted(nsCSSProperty aProperty,
|
||||
return true;
|
||||
}
|
||||
case eUnit_Float: {
|
||||
#ifdef MOZ_FLEXBOX
|
||||
// Special case for flex-grow and flex-shrink: animations are
|
||||
// disallowed between 0 and other values.
|
||||
if ((aProperty == eCSSProperty_flex_grow ||
|
||||
@ -1768,7 +1765,6 @@ nsStyleAnimation::AddWeighted(nsCSSProperty aProperty,
|
||||
aValue1.GetFloatValue() != aValue2.GetFloatValue()) {
|
||||
return false;
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
aResultValue.SetFloatValue(RestrictValue(aProperty,
|
||||
aCoeff1 * aValue1.GetFloatValue() +
|
||||
@ -2682,7 +2678,6 @@ nsStyleAnimation::ExtractComputedValue(nsCSSProperty aProperty,
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
case eCSSProperty_order: {
|
||||
const nsStylePosition *stylePosition =
|
||||
static_cast<const nsStylePosition*>(styleStruct);
|
||||
@ -2690,7 +2685,6 @@ nsStyleAnimation::ExtractComputedValue(nsCSSProperty aProperty,
|
||||
eUnit_Integer);
|
||||
break;
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
case eCSSProperty_text_decoration_color: {
|
||||
const nsStyleTextReset *styleTextReset =
|
||||
|
@ -362,7 +362,6 @@ nsStyleContext::ApplyStyleFixups(bool aSkipFlexItemStyleFixup)
|
||||
// # The computed 'display' of a flex item is determined
|
||||
// # by applying the table in CSS 2.1 Chapter 9.7.
|
||||
// ...which converts inline-level elements to their block-level equivalents.
|
||||
#ifdef MOZ_FLEXBOX
|
||||
if (!aSkipFlexItemStyleFixup && mParent) {
|
||||
const nsStyleDisplay* parentDisp = mParent->StyleDisplay();
|
||||
if ((parentDisp->mDisplay == NS_STYLE_DISPLAY_FLEX ||
|
||||
@ -401,7 +400,6 @@ nsStyleContext::ApplyStyleFixups(bool aSkipFlexItemStyleFixup)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
// Computer User Interface style, to trigger loads of cursors
|
||||
StyleUserInterface();
|
||||
|
@ -1092,11 +1092,8 @@ nsStylePosition::nsStylePosition(void)
|
||||
mHeight.SetAutoValue();
|
||||
mMinHeight.SetCoordValue(0);
|
||||
mMaxHeight.SetNoneValue();
|
||||
#ifdef MOZ_FLEXBOX
|
||||
mFlexBasis.SetAutoValue();
|
||||
#endif // MOZ_FLEXBOX
|
||||
mBoxSizing = NS_STYLE_BOX_SIZING_CONTENT;
|
||||
#ifdef MOZ_FLEXBOX
|
||||
mAlignItems = NS_STYLE_ALIGN_ITEMS_INITIAL_VALUE;
|
||||
mAlignSelf = NS_STYLE_ALIGN_SELF_AUTO;
|
||||
mFlexDirection = NS_STYLE_FLEX_DIRECTION_ROW;
|
||||
@ -1104,7 +1101,6 @@ nsStylePosition::nsStylePosition(void)
|
||||
mOrder = NS_STYLE_ORDER_INITIAL;
|
||||
mFlexGrow = 0.0f;
|
||||
mFlexShrink = 1.0f;
|
||||
#endif // MOZ_FLEXBOX
|
||||
mZIndex.SetAutoValue();
|
||||
}
|
||||
|
||||
@ -1129,7 +1125,6 @@ nsChangeHint nsStylePosition::CalcDifference(const nsStylePosition& aOther) cons
|
||||
return NS_CombineHint(hint, nsChangeHint_AllReflowHints);
|
||||
}
|
||||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
// Properties that apply to flex items:
|
||||
// NOTE: Changes to "order" on a flex item may trigger some repositioning.
|
||||
// If we're in a multi-line flex container, it also may affect our size
|
||||
@ -1157,7 +1152,6 @@ nsChangeHint nsStylePosition::CalcDifference(const nsStylePosition& aOther) cons
|
||||
if (mJustifyContent != aOther.mJustifyContent) {
|
||||
NS_UpdateHint(hint, nsChangeHint_NeedReflow);
|
||||
}
|
||||
#endif // MOZ_FLEXBOX
|
||||
|
||||
if (mHeight != aOther.mHeight ||
|
||||
mMinHeight != aOther.mMinHeight ||
|
||||
|
@ -1098,11 +1098,8 @@ struct nsStylePosition {
|
||||
nsStyleCoord mHeight; // [reset] coord, percent, calc, auto
|
||||
nsStyleCoord mMinHeight; // [reset] coord, percent, calc
|
||||
nsStyleCoord mMaxHeight; // [reset] coord, percent, calc, none
|
||||
#ifdef MOZ_FLEXBOX
|
||||
nsStyleCoord mFlexBasis; // [reset] coord, percent, enum, calc, auto
|
||||
#endif // MOZ_FLEXBOX
|
||||
uint8_t mBoxSizing; // [reset] see nsStyleConsts.h
|
||||
#ifdef MOZ_FLEXBOX
|
||||
uint8_t mAlignItems; // [reset] see nsStyleConsts.h
|
||||
uint8_t mAlignSelf; // [reset] see nsStyleConsts.h
|
||||
uint8_t mFlexDirection; // [reset] see nsStyleConsts.h
|
||||
@ -1110,7 +1107,6 @@ struct nsStylePosition {
|
||||
int32_t mOrder; // [reset] integer
|
||||
float mFlexGrow; // [reset] float
|
||||
float mFlexShrink; // [reset] float
|
||||
#endif // MOZ_FLEXBOX
|
||||
nsStyleCoord mZIndex; // [reset] integer, auto
|
||||
|
||||
bool WidthDependsOnContainer() const
|
||||
@ -1642,9 +1638,7 @@ struct nsStyleDisplay {
|
||||
|
||||
bool IsBlockOutsideStyle() const {
|
||||
return NS_STYLE_DISPLAY_BLOCK == mDisplay ||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
NS_STYLE_DISPLAY_FLEX == mDisplay ||
|
||||
#endif // MOZ_FLEXBOX
|
||||
NS_STYLE_DISPLAY_LIST_ITEM == mDisplay ||
|
||||
NS_STYLE_DISPLAY_TABLE == mDisplay;
|
||||
}
|
||||
@ -1654,9 +1648,7 @@ struct nsStyleDisplay {
|
||||
NS_STYLE_DISPLAY_INLINE_BLOCK == aDisplay ||
|
||||
NS_STYLE_DISPLAY_INLINE_TABLE == aDisplay ||
|
||||
NS_STYLE_DISPLAY_INLINE_BOX == aDisplay ||
|
||||
#ifdef MOZ_FLEXBOX
|
||||
NS_STYLE_DISPLAY_INLINE_FLEX == aDisplay ||
|
||||
#endif // MOZ_FLEXBOX
|
||||
NS_STYLE_DISPLAY_INLINE_GRID == aDisplay ||
|
||||
NS_STYLE_DISPLAY_INLINE_STACK == aDisplay;
|
||||
}
|
||||
|
@ -200,7 +200,6 @@ MOCHITEST_FILES = test_acid3_test46.html \
|
||||
viewport_units_iframe.html \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_FLEXBOX
|
||||
MOCHITEST_FILES += \
|
||||
file_flexbox_align_self_auto.html \
|
||||
test_flexbox_align_self_auto.html \
|
||||
@ -218,7 +217,6 @@ MOCHITEST_FILES += \
|
||||
file_flexbox_order_table.html \
|
||||
test_flexbox_order_table.html \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
_VISITED_REFTEST_FILES = \
|
||||
$(shell find $(topsrcdir)/layout/reftests/css-visited/ -name '*.html' -o -name '*.xhtml') \
|
||||
|
Loading…
Reference in New Issue
Block a user