Allow relative positioning to again influence the overflow area, since we're no longer using the overflow area for layout. r+sr=roc b=174149

This commit is contained in:
dbaron%fas.harvard.edu 2002-12-19 00:23:00 +00:00
Родитель 9e87918976
Коммит 68ec6bfcbc
2 изменённых файлов: 18 добавлений и 24 удалений

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

@ -731,19 +731,7 @@ nsBlockReflowContext::PlaceBlock(const nsHTMLReflowState& aReflowState,
mMetrics.width,
mMetrics.height);
// Compute combined-rect in callers coordinate system. The value
// returned in the reflow metrics is relative to the child
// frame.
aCombinedRect.x = mMetrics.mOverflowArea.x + x;
aCombinedRect.y = mMetrics.mOverflowArea.y + y;
aCombinedRect.width = mMetrics.mOverflowArea.width;
aCombinedRect.height = mMetrics.mOverflowArea.height;
// Apply CSS relative positioning to update x,y coordinates
// Note that this must be done after changing aCombinedRect
// since relatively positioned elements should act as if they
// were at their original position.
const nsStyleDisplay* styleDisp;
mFrame->GetStyleData(eStyleStruct_Display,
(const nsStyleStruct*&)styleDisp);
@ -752,6 +740,15 @@ nsBlockReflowContext::PlaceBlock(const nsHTMLReflowState& aReflowState,
y += aComputedOffsets.top;
}
// Compute combined-rect in callers coordinate system. The value
// returned in the reflow metrics is relative to the child
// frame. This includes relative positioning and the result should
// be used only for painting and for 'overflow' handling.
aCombinedRect.x = mMetrics.mOverflowArea.x + x;
aCombinedRect.y = mMetrics.mOverflowArea.y + y;
aCombinedRect.width = mMetrics.mOverflowArea.width;
aCombinedRect.height = mMetrics.mOverflowArea.height;
// Now place the frame and complete the reflow process
nsContainerFrame::FinishReflowChild(mFrame, mPresContext, &aReflowState, mMetrics, x, y, 0);

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

@ -731,19 +731,7 @@ nsBlockReflowContext::PlaceBlock(const nsHTMLReflowState& aReflowState,
mMetrics.width,
mMetrics.height);
// Compute combined-rect in callers coordinate system. The value
// returned in the reflow metrics is relative to the child
// frame.
aCombinedRect.x = mMetrics.mOverflowArea.x + x;
aCombinedRect.y = mMetrics.mOverflowArea.y + y;
aCombinedRect.width = mMetrics.mOverflowArea.width;
aCombinedRect.height = mMetrics.mOverflowArea.height;
// Apply CSS relative positioning to update x,y coordinates
// Note that this must be done after changing aCombinedRect
// since relatively positioned elements should act as if they
// were at their original position.
const nsStyleDisplay* styleDisp;
mFrame->GetStyleData(eStyleStruct_Display,
(const nsStyleStruct*&)styleDisp);
@ -752,6 +740,15 @@ nsBlockReflowContext::PlaceBlock(const nsHTMLReflowState& aReflowState,
y += aComputedOffsets.top;
}
// Compute combined-rect in callers coordinate system. The value
// returned in the reflow metrics is relative to the child
// frame. This includes relative positioning and the result should
// be used only for painting and for 'overflow' handling.
aCombinedRect.x = mMetrics.mOverflowArea.x + x;
aCombinedRect.y = mMetrics.mOverflowArea.y + y;
aCombinedRect.width = mMetrics.mOverflowArea.width;
aCombinedRect.height = mMetrics.mOverflowArea.height;
// Now place the frame and complete the reflow process
nsContainerFrame::FinishReflowChild(mFrame, mPresContext, &aReflowState, mMetrics, x, y, 0);