mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 961354 part 1: Move nsCSSOffsetState constructor definition to .cpp file. r=mats
This commit is contained in:
parent
9de6cfafa6
commit
43532411b0
@ -127,6 +127,23 @@ FontSizeInflationListMarginAdjustment(const nsIFrame* aFrame)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// NOTE: If we ever want to use nsCSSOffsetState for a flex item or a grid
|
||||
// item, we need to make it take the containing-block height as well as the
|
||||
// width, since flex items and grid items resolve vertical percent margins
|
||||
// and padding against the containing-block height, rather than its width.
|
||||
nsCSSOffsetState::nsCSSOffsetState(nsIFrame *aFrame,
|
||||
nsRenderingContext *aRenderingContext,
|
||||
nscoord aContainingBlockWidth)
|
||||
: frame(aFrame)
|
||||
, rendContext(aRenderingContext)
|
||||
, mWritingMode(aFrame->GetWritingMode())
|
||||
{
|
||||
MOZ_ASSERT(!aFrame->IsFlexItem(),
|
||||
"We're about to resolve vertical percent margin & padding "
|
||||
"values against CB width, which is incorrect for flex items");
|
||||
InitOffsets(aContainingBlockWidth, aContainingBlockWidth, frame->GetType());
|
||||
}
|
||||
|
||||
// Initialize a reflow state for a child frame's reflow. Some state
|
||||
// is copied from the parent reflow state; the remaining state is
|
||||
// computed.
|
||||
|
@ -151,21 +151,8 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
// NOTE: If we ever want to use nsCSSOffsetState for a flex item or a grid
|
||||
// item, we need to make it take the containing-block height as well as the
|
||||
// width, since flex items and grid items resolve vertical percent margins
|
||||
// and padding against the containing-block height, rather than its width.
|
||||
nsCSSOffsetState(nsIFrame *aFrame, nsRenderingContext *aRenderingContext,
|
||||
nscoord aContainingBlockWidth)
|
||||
: frame(aFrame)
|
||||
, rendContext(aRenderingContext)
|
||||
, mWritingMode(aFrame->GetWritingMode())
|
||||
{
|
||||
MOZ_ASSERT(!aFrame->IsFlexItem(),
|
||||
"We're about to resolve vertical percent margin & padding "
|
||||
"values against CB width, which is incorrect for flex items");
|
||||
InitOffsets(aContainingBlockWidth, aContainingBlockWidth, frame->GetType());
|
||||
}
|
||||
nscoord aContainingBlockWidth);
|
||||
|
||||
#ifdef DEBUG
|
||||
// Reflow trace methods. Defined in nsFrame.cpp so they have access
|
||||
|
Loading…
Reference in New Issue
Block a user