mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1174546 part 2 - [css-grid] Implement the 'auto' min-sizing function in Grid layout. r=jfkthame
This commit is contained in:
parent
04c2ee449f
commit
891bf53892
@ -225,10 +225,13 @@ struct MOZ_STACK_CLASS nsGridContainerFrame::TrackSizingFunctions
|
||||
*/
|
||||
struct MOZ_STACK_CLASS nsGridContainerFrame::Tracks
|
||||
{
|
||||
explicit Tracks(Dimension aDimension) : mDimension(aDimension) {}
|
||||
|
||||
void Initialize(const TrackSizingFunctions& aFunctions,
|
||||
nscoord aPercentageBasis);
|
||||
|
||||
nsAutoTArray<TrackSize, 32> mSizes;
|
||||
Dimension mDimension;
|
||||
};
|
||||
|
||||
struct MOZ_STACK_CLASS nsGridContainerFrame::GridReflowState
|
||||
@ -267,6 +270,8 @@ private:
|
||||
const WritingMode& aWM)
|
||||
: mIter(aFrame, kPrincipalList)
|
||||
, mGridStyle(aGridStyle)
|
||||
, mCols(eColDimension)
|
||||
, mRows(eRowDimension)
|
||||
, mColFunctions({
|
||||
mGridStyle->mGridTemplateColumns.mMinTrackSizingFunctions,
|
||||
mGridStyle->mGridTemplateColumns.mMaxTrackSizingFunctions,
|
||||
@ -1252,6 +1257,19 @@ nsGridContainerFrame::Tracks::Initialize(const TrackSizingFunctions& aFunctions,
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static nscoord
|
||||
MinSize(nsIFrame* aChild, nsRenderingContext* aRC, WritingMode aCBWM,
|
||||
nsGridContainerFrame::Dimension aDimension,
|
||||
nsLayoutUtils::IntrinsicISizeType aConstraint)
|
||||
{
|
||||
PhysicalAxis axis(((aDimension == nsGridContainerFrame::eColDimension) ==
|
||||
aCBWM.IsVertical()) ? eAxisVertical : eAxisHorizontal);
|
||||
return nsLayoutUtils::MinSizeContributionForAxis(axis, aRC, aChild,
|
||||
aConstraint);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
nsGridContainerFrame::CalculateTrackSizes(GridReflowState& aState,
|
||||
const LogicalSize& aContentBox)
|
||||
|
@ -54,6 +54,8 @@ public:
|
||||
nscoord mLimit;
|
||||
};
|
||||
|
||||
enum Dimension { eColDimension, eRowDimension };
|
||||
|
||||
// @see nsAbsoluteContainingBlock::Reflow about this magic number
|
||||
static const nscoord VERY_LIKELY_A_GRID_CONTAINER = -123456789;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user