mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1008969 - part 2, Add a basic nsGridContainerFrame::Reflow() method. r=dholbert
This commit is contained in:
parent
b1b351e310
commit
ab4c3ccbd2
@ -35,6 +35,32 @@ NS_NewGridContainerFrame(nsIPresShell* aPresShell,
|
||||
// nsGridContainerFrame Method Implementations
|
||||
// ===========================================
|
||||
|
||||
void
|
||||
nsGridContainerFrame::Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsGridContainerFrame");
|
||||
DISPLAY_REFLOW(aPresContext, this, aReflowState, aDesiredSize, aStatus);
|
||||
|
||||
if (IsFrameTreeTooDeep(aReflowState, aDesiredSize, aStatus)) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsMargin bp = aReflowState.ComputedPhysicalBorderPadding();
|
||||
ApplySkipSides(bp);
|
||||
nscoord contentHeight = GetEffectiveComputedHeight(aReflowState);
|
||||
if (contentHeight == NS_AUTOHEIGHT) {
|
||||
contentHeight = 0;
|
||||
}
|
||||
aDesiredSize.Width() = aReflowState.ComputedWidth() + bp.LeftRight();
|
||||
aDesiredSize.Height() = contentHeight + bp.TopBottom();
|
||||
aDesiredSize.SetOverflowAreasToDesiredBounds();
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
nsGridContainerFrame::GetType() const
|
||||
{
|
||||
|
@ -26,6 +26,10 @@ public:
|
||||
NS_DECL_QUERYFRAME
|
||||
|
||||
// nsIFrame overrides
|
||||
void Reflow(nsPresContext* aPresContext,
|
||||
nsHTMLReflowMetrics& aDesiredSize,
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
||||
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
|
Loading…
Reference in New Issue
Block a user