Fixed problem with images splitting when they should not be. b=111255 r=karnaze sr=waterson

This commit is contained in:
attinasi%netscape.com 2002-01-11 19:32:55 +00:00
Родитель fa6686c2d6
Коммит 651a74602c
2 изменённых файлов: 14 добавлений и 2 удалений

Просмотреть файл

@ -903,7 +903,13 @@ nsImageFrame::Reflow(nsIPresContext* aPresContext,
aMetrics.height = PR_MAX(0, aMetrics.height); aMetrics.height = PR_MAX(0, aMetrics.height);
} }
if ((NS_UNCONSTRAINEDSIZE != aReflowState.availableHeight) &&
// we have to split images if we are:
// in Paginated mode, we need to have a constrained height, and have a height larger than our available height
PRBool isPaginated;
aPresContext->IsPaginated(&isPaginated);
if ((isPaginated) &&
(NS_UNCONSTRAINEDSIZE != aReflowState.availableHeight) &&
(aMetrics.height > aReflowState.availableHeight)) { (aMetrics.height > aReflowState.availableHeight)) {
nsCOMPtr<nsIAtom> fType; nsCOMPtr<nsIAtom> fType;
GetFrameType(getter_AddRefs(fType)); GetFrameType(getter_AddRefs(fType));

Просмотреть файл

@ -903,7 +903,13 @@ nsImageFrame::Reflow(nsIPresContext* aPresContext,
aMetrics.height = PR_MAX(0, aMetrics.height); aMetrics.height = PR_MAX(0, aMetrics.height);
} }
if ((NS_UNCONSTRAINEDSIZE != aReflowState.availableHeight) &&
// we have to split images if we are:
// in Paginated mode, we need to have a constrained height, and have a height larger than our available height
PRBool isPaginated;
aPresContext->IsPaginated(&isPaginated);
if ((isPaginated) &&
(NS_UNCONSTRAINEDSIZE != aReflowState.availableHeight) &&
(aMetrics.height > aReflowState.availableHeight)) { (aMetrics.height > aReflowState.availableHeight)) {
nsCOMPtr<nsIAtom> fType; nsCOMPtr<nsIAtom> fType;
GetFrameType(getter_AddRefs(fType)); GetFrameType(getter_AddRefs(fType));