From 2e3e89e87c90fde92a67e78b293e79841ca97817 Mon Sep 17 00:00:00 2001 From: "bmlk@gmx.de" Date: Wed, 27 Oct 2004 16:11:08 +0000 Subject: [PATCH] prevent lookup of frame state bits of nonexisting child frames bug 266225 r/sr=bzbarsky --- layout/forms/nsFieldSetFrame.cpp | 8 ++++---- layout/html/forms/src/nsFieldSetFrame.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/layout/forms/nsFieldSetFrame.cpp b/layout/forms/nsFieldSetFrame.cpp index 469703f507c3..66e044743a05 100644 --- a/layout/forms/nsFieldSetFrame.cpp +++ b/layout/forms/nsFieldSetFrame.cpp @@ -365,15 +365,15 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext, if (reason == eReflowReason_Dirty) { if (reflowContent) { - reflowContent = + reflowContent = mContentFrame ? (mContentFrame->GetStateBits() - & (NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN)) != 0; + & (NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN)) != 0 : PR_FALSE; } if (reflowLegend) { - reflowLegend = + reflowLegend = mLegendFrame ? (mLegendFrame->GetStateBits() - & (NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN)) != 0; + & (NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN)) != 0 : PR_FALSE; } } diff --git a/layout/html/forms/src/nsFieldSetFrame.cpp b/layout/html/forms/src/nsFieldSetFrame.cpp index 469703f507c3..66e044743a05 100644 --- a/layout/html/forms/src/nsFieldSetFrame.cpp +++ b/layout/html/forms/src/nsFieldSetFrame.cpp @@ -365,15 +365,15 @@ nsFieldSetFrame::Reflow(nsPresContext* aPresContext, if (reason == eReflowReason_Dirty) { if (reflowContent) { - reflowContent = + reflowContent = mContentFrame ? (mContentFrame->GetStateBits() - & (NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN)) != 0; + & (NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN)) != 0 : PR_FALSE; } if (reflowLegend) { - reflowLegend = + reflowLegend = mLegendFrame ? (mLegendFrame->GetStateBits() - & (NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN)) != 0; + & (NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN)) != 0 : PR_FALSE; } }