mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 19:37:15 +00:00
Fixed infinite loop 12747
This commit is contained in:
parent
f73fad9197
commit
ed874d1439
@ -536,6 +536,7 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState,
|
||||
}
|
||||
|
||||
mMinLineHeight = nsHTMLReflowState::CalcLineHeight(*mPresContext,
|
||||
aReflowState.rendContext,
|
||||
aReflowState.frame);
|
||||
}
|
||||
|
||||
@ -1406,14 +1407,16 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext,
|
||||
static PRBool
|
||||
HaveAutoWidth(const nsHTMLReflowState& aReflowState)
|
||||
{
|
||||
if (NS_UNCONSTRAINEDSIZE == aReflowState.mComputedWidth) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
const nsStylePosition* pos = aReflowState.mStylePosition;
|
||||
if (!pos) {
|
||||
const nsHTMLReflowState* rs = &aReflowState;
|
||||
if (NS_UNCONSTRAINEDSIZE == rs->mComputedWidth) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
const nsStylePosition* pos = rs->mStylePosition;
|
||||
|
||||
for (;;) {
|
||||
if (!pos) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
nsStyleUnit widthUnit = pos->mWidth.GetUnit();
|
||||
if (eStyleUnit_Auto == widthUnit) {
|
||||
return PR_TRUE;
|
||||
@ -1422,15 +1425,14 @@ HaveAutoWidth(const nsHTMLReflowState& aReflowState)
|
||||
break;
|
||||
}
|
||||
const nsHTMLReflowState* prs = (const nsHTMLReflowState*)
|
||||
aReflowState.parentReflowState;
|
||||
rs->parentReflowState;
|
||||
if (!prs) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
rs = prs;
|
||||
pos = prs->mStylePosition;
|
||||
if (!pos) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
@ -536,6 +536,7 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState,
|
||||
}
|
||||
|
||||
mMinLineHeight = nsHTMLReflowState::CalcLineHeight(*mPresContext,
|
||||
aReflowState.rendContext,
|
||||
aReflowState.frame);
|
||||
}
|
||||
|
||||
@ -1406,14 +1407,16 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext,
|
||||
static PRBool
|
||||
HaveAutoWidth(const nsHTMLReflowState& aReflowState)
|
||||
{
|
||||
if (NS_UNCONSTRAINEDSIZE == aReflowState.mComputedWidth) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
const nsStylePosition* pos = aReflowState.mStylePosition;
|
||||
if (!pos) {
|
||||
const nsHTMLReflowState* rs = &aReflowState;
|
||||
if (NS_UNCONSTRAINEDSIZE == rs->mComputedWidth) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
const nsStylePosition* pos = rs->mStylePosition;
|
||||
|
||||
for (;;) {
|
||||
if (!pos) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
nsStyleUnit widthUnit = pos->mWidth.GetUnit();
|
||||
if (eStyleUnit_Auto == widthUnit) {
|
||||
return PR_TRUE;
|
||||
@ -1422,15 +1425,14 @@ HaveAutoWidth(const nsHTMLReflowState& aReflowState)
|
||||
break;
|
||||
}
|
||||
const nsHTMLReflowState* prs = (const nsHTMLReflowState*)
|
||||
aReflowState.parentReflowState;
|
||||
rs->parentReflowState;
|
||||
if (!prs) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
rs = prs;
|
||||
pos = prs->mStylePosition;
|
||||
if (!pos) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
@ -536,6 +536,7 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState,
|
||||
}
|
||||
|
||||
mMinLineHeight = nsHTMLReflowState::CalcLineHeight(*mPresContext,
|
||||
aReflowState.rendContext,
|
||||
aReflowState.frame);
|
||||
}
|
||||
|
||||
@ -1406,14 +1407,16 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext,
|
||||
static PRBool
|
||||
HaveAutoWidth(const nsHTMLReflowState& aReflowState)
|
||||
{
|
||||
if (NS_UNCONSTRAINEDSIZE == aReflowState.mComputedWidth) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
const nsStylePosition* pos = aReflowState.mStylePosition;
|
||||
if (!pos) {
|
||||
const nsHTMLReflowState* rs = &aReflowState;
|
||||
if (NS_UNCONSTRAINEDSIZE == rs->mComputedWidth) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
const nsStylePosition* pos = rs->mStylePosition;
|
||||
|
||||
for (;;) {
|
||||
if (!pos) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
nsStyleUnit widthUnit = pos->mWidth.GetUnit();
|
||||
if (eStyleUnit_Auto == widthUnit) {
|
||||
return PR_TRUE;
|
||||
@ -1422,15 +1425,14 @@ HaveAutoWidth(const nsHTMLReflowState& aReflowState)
|
||||
break;
|
||||
}
|
||||
const nsHTMLReflowState* prs = (const nsHTMLReflowState*)
|
||||
aReflowState.parentReflowState;
|
||||
rs->parentReflowState;
|
||||
if (!prs) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
rs = prs;
|
||||
pos = prs->mStylePosition;
|
||||
if (!pos) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
@ -536,6 +536,7 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState,
|
||||
}
|
||||
|
||||
mMinLineHeight = nsHTMLReflowState::CalcLineHeight(*mPresContext,
|
||||
aReflowState.rendContext,
|
||||
aReflowState.frame);
|
||||
}
|
||||
|
||||
@ -1406,14 +1407,16 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext,
|
||||
static PRBool
|
||||
HaveAutoWidth(const nsHTMLReflowState& aReflowState)
|
||||
{
|
||||
if (NS_UNCONSTRAINEDSIZE == aReflowState.mComputedWidth) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
const nsStylePosition* pos = aReflowState.mStylePosition;
|
||||
if (!pos) {
|
||||
const nsHTMLReflowState* rs = &aReflowState;
|
||||
if (NS_UNCONSTRAINEDSIZE == rs->mComputedWidth) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
const nsStylePosition* pos = rs->mStylePosition;
|
||||
|
||||
for (;;) {
|
||||
if (!pos) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
nsStyleUnit widthUnit = pos->mWidth.GetUnit();
|
||||
if (eStyleUnit_Auto == widthUnit) {
|
||||
return PR_TRUE;
|
||||
@ -1422,15 +1425,14 @@ HaveAutoWidth(const nsHTMLReflowState& aReflowState)
|
||||
break;
|
||||
}
|
||||
const nsHTMLReflowState* prs = (const nsHTMLReflowState*)
|
||||
aReflowState.parentReflowState;
|
||||
rs->parentReflowState;
|
||||
if (!prs) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
rs = prs;
|
||||
pos = prs->mStylePosition;
|
||||
if (!pos) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
@ -536,6 +536,7 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState,
|
||||
}
|
||||
|
||||
mMinLineHeight = nsHTMLReflowState::CalcLineHeight(*mPresContext,
|
||||
aReflowState.rendContext,
|
||||
aReflowState.frame);
|
||||
}
|
||||
|
||||
@ -1406,14 +1407,16 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext,
|
||||
static PRBool
|
||||
HaveAutoWidth(const nsHTMLReflowState& aReflowState)
|
||||
{
|
||||
if (NS_UNCONSTRAINEDSIZE == aReflowState.mComputedWidth) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
const nsStylePosition* pos = aReflowState.mStylePosition;
|
||||
if (!pos) {
|
||||
const nsHTMLReflowState* rs = &aReflowState;
|
||||
if (NS_UNCONSTRAINEDSIZE == rs->mComputedWidth) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
const nsStylePosition* pos = rs->mStylePosition;
|
||||
|
||||
for (;;) {
|
||||
if (!pos) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
nsStyleUnit widthUnit = pos->mWidth.GetUnit();
|
||||
if (eStyleUnit_Auto == widthUnit) {
|
||||
return PR_TRUE;
|
||||
@ -1422,15 +1425,14 @@ HaveAutoWidth(const nsHTMLReflowState& aReflowState)
|
||||
break;
|
||||
}
|
||||
const nsHTMLReflowState* prs = (const nsHTMLReflowState*)
|
||||
aReflowState.parentReflowState;
|
||||
rs->parentReflowState;
|
||||
if (!prs) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
rs = prs;
|
||||
pos = prs->mStylePosition;
|
||||
if (!pos) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
@ -536,6 +536,7 @@ nsBlockReflowState::nsBlockReflowState(const nsHTMLReflowState& aReflowState,
|
||||
}
|
||||
|
||||
mMinLineHeight = nsHTMLReflowState::CalcLineHeight(*mPresContext,
|
||||
aReflowState.rendContext,
|
||||
aReflowState.frame);
|
||||
}
|
||||
|
||||
@ -1406,14 +1407,16 @@ nsBlockFrame::Reflow(nsIPresContext& aPresContext,
|
||||
static PRBool
|
||||
HaveAutoWidth(const nsHTMLReflowState& aReflowState)
|
||||
{
|
||||
if (NS_UNCONSTRAINEDSIZE == aReflowState.mComputedWidth) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
const nsStylePosition* pos = aReflowState.mStylePosition;
|
||||
if (!pos) {
|
||||
const nsHTMLReflowState* rs = &aReflowState;
|
||||
if (NS_UNCONSTRAINEDSIZE == rs->mComputedWidth) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
const nsStylePosition* pos = rs->mStylePosition;
|
||||
|
||||
for (;;) {
|
||||
if (!pos) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
nsStyleUnit widthUnit = pos->mWidth.GetUnit();
|
||||
if (eStyleUnit_Auto == widthUnit) {
|
||||
return PR_TRUE;
|
||||
@ -1422,15 +1425,14 @@ HaveAutoWidth(const nsHTMLReflowState& aReflowState)
|
||||
break;
|
||||
}
|
||||
const nsHTMLReflowState* prs = (const nsHTMLReflowState*)
|
||||
aReflowState.parentReflowState;
|
||||
rs->parentReflowState;
|
||||
if (!prs) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
rs = prs;
|
||||
pos = prs->mStylePosition;
|
||||
if (!pos) {
|
||||
return PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user