mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 965897: Assert that we have the right prescontext in nsHTMLReflowState constructor, and convert some existing NS_PRECONDITION null-checks into MOZ_ASSERTs. r=mats
This commit is contained in:
parent
f66bb84889
commit
f2d773ab79
@ -59,9 +59,10 @@ nsHTMLReflowState::nsHTMLReflowState(nsPresContext* aPresContext,
|
|||||||
, mBlockDelta(0)
|
, mBlockDelta(0)
|
||||||
, mReflowDepth(0)
|
, mReflowDepth(0)
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(aPresContext, "no pres context");
|
|
||||||
NS_PRECONDITION(aRenderingContext, "no rendering context");
|
NS_PRECONDITION(aRenderingContext, "no rendering context");
|
||||||
NS_PRECONDITION(aFrame, "no frame");
|
MOZ_ASSERT(aPresContext, "no pres context");
|
||||||
|
MOZ_ASSERT(aFrame, "no frame");
|
||||||
|
MOZ_ASSERT(aPresContext == aFrame->PresContext(), "wrong pres context");
|
||||||
parentReflowState = nullptr;
|
parentReflowState = nullptr;
|
||||||
AvailableWidth() = aAvailableSpace.width;
|
AvailableWidth() = aAvailableSpace.width;
|
||||||
AvailableHeight() = aAvailableSpace.height;
|
AvailableHeight() = aAvailableSpace.height;
|
||||||
@ -159,8 +160,9 @@ nsHTMLReflowState::nsHTMLReflowState(nsPresContext* aPresContext,
|
|||||||
, mReflowDepth(aParentReflowState.mReflowDepth + 1)
|
, mReflowDepth(aParentReflowState.mReflowDepth + 1)
|
||||||
, mFlags(aParentReflowState.mFlags)
|
, mFlags(aParentReflowState.mFlags)
|
||||||
{
|
{
|
||||||
NS_PRECONDITION(aPresContext, "no pres context");
|
MOZ_ASSERT(aPresContext, "no pres context");
|
||||||
NS_PRECONDITION(aFrame, "no frame");
|
MOZ_ASSERT(aFrame, "no frame");
|
||||||
|
MOZ_ASSERT(aPresContext == aFrame->PresContext(), "wrong pres context");
|
||||||
NS_PRECONDITION((aContainingBlockWidth == -1) ==
|
NS_PRECONDITION((aContainingBlockWidth == -1) ==
|
||||||
(aContainingBlockHeight == -1),
|
(aContainingBlockHeight == -1),
|
||||||
"cb width and height should only be non-default together");
|
"cb width and height should only be non-default together");
|
||||||
|
Loading…
Reference in New Issue
Block a user