mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1144096 part 5 - [css-grid] Create a couple of Grid container frame bits. r=dholbert
This commit is contained in:
parent
788aa99a4a
commit
485174bd17
@ -11,6 +11,7 @@
|
||||
#include "nsBoxFrame.h"
|
||||
#include "nsBulletFrame.h"
|
||||
#include "nsFlexContainerFrame.h"
|
||||
#include "nsGridContainerFrame.h"
|
||||
#include "nsGfxScrollFrame.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsISVGChildFrame.h"
|
||||
|
@ -304,6 +304,17 @@ FRAME_STATE_GROUP(FlexContainer, nsFlexContainerFrame)
|
||||
// (Means that we have to be more thorough about checking them for sortedness.)
|
||||
FRAME_STATE_BIT(FlexContainer, 20, NS_STATE_FLEX_CHILDREN_REORDERED)
|
||||
|
||||
// == Frame state bits that apply to grid container frames ====================
|
||||
|
||||
FRAME_STATE_GROUP(GridContainer, nsGridContainerFrame)
|
||||
|
||||
// True iff the normal flow children are already in CSS 'order' in the
|
||||
// order they occur in the child frame list.
|
||||
FRAME_STATE_BIT(GridContainer, 20, NS_STATE_GRID_NORMAL_FLOW_CHILDREN_IN_CSS_ORDER)
|
||||
|
||||
// True iff some first-in-flow in-flow children were pushed.
|
||||
FRAME_STATE_BIT(GridContainer, 21, NS_STATE_GRID_DID_PUSH_ITEMS)
|
||||
|
||||
// == Frame state bits that apply to SVG frames ===============================
|
||||
|
||||
FRAME_STATE_GROUP(SVG, nsISVGChildFrame)
|
||||
|
@ -3892,7 +3892,11 @@ nsGridContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||
const nsStylePosition* stylePos = aReflowState.mStylePosition;
|
||||
InitImplicitNamedAreas(stylePos);
|
||||
GridReflowState gridReflowState(this, aReflowState);
|
||||
mIsNormalFlowInCSSOrder = gridReflowState.mIter.ItemsAreAlreadyInOrder();
|
||||
if (gridReflowState.mIter.ItemsAreAlreadyInOrder()) {
|
||||
AddStateBits(NS_STATE_GRID_NORMAL_FLOW_CHILDREN_IN_CSS_ORDER);
|
||||
} else {
|
||||
RemoveStateBits(NS_STATE_GRID_NORMAL_FLOW_CHILDREN_IN_CSS_ORDER);
|
||||
}
|
||||
const nscoord computedBSize = aReflowState.ComputedBSize();
|
||||
const nscoord computedISize = aReflowState.ComputedISize();
|
||||
const WritingMode& wm = gridReflowState.mWM;
|
||||
@ -4058,8 +4062,9 @@ nsGridContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
&positionedDescendants,
|
||||
aLists.Outlines());
|
||||
typedef GridItemCSSOrderIterator::OrderState OrderState;
|
||||
OrderState order = mIsNormalFlowInCSSOrder ? OrderState::eKnownOrdered
|
||||
: OrderState::eKnownUnordered;
|
||||
OrderState order = HasAnyStateBits(NS_STATE_GRID_NORMAL_FLOW_CHILDREN_IN_CSS_ORDER)
|
||||
? OrderState::eKnownOrdered
|
||||
: OrderState::eKnownUnordered;
|
||||
GridItemCSSOrderIterator iter(this, kPrincipalList,
|
||||
GridItemCSSOrderIterator::eIncludeAll, order);
|
||||
for (; !iter.AtEnd(); iter.Next()) {
|
||||
|
@ -154,12 +154,6 @@ private:
|
||||
*/
|
||||
nscoord mCachedMinISize;
|
||||
nscoord mCachedPrefISize;
|
||||
|
||||
/**
|
||||
* True iff the normal flow children are already in CSS 'order' in the
|
||||
* order they occur in the child frame list.
|
||||
*/
|
||||
bool mIsNormalFlowInCSSOrder : 1;
|
||||
};
|
||||
|
||||
#endif /* nsGridContainerFrame_h___ */
|
||||
|
Loading…
Reference in New Issue
Block a user