bug 78162 - don't optimize resize reflow on cell if its desired size exceeds its last avail size, sr=timeout, r=alexsavulov
This commit is contained in:
@@ -828,12 +828,15 @@ nsTableRowFrame::ReflowChildren(nsIPresContext* aPresContext,
|
|||||||
prevColIndex = (iter.IsLeftToRight()) ? cellColIndex + (cellColSpan - 1) : cellColIndex;
|
prevColIndex = (iter.IsLeftToRight()) ? cellColIndex + (cellColSpan - 1) : cellColIndex;
|
||||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||||
|
|
||||||
// If the available width is the same as last time we reflowed the cell,then
|
// If the avail width is not the same as last time we reflowed the cell or
|
||||||
// use the previous desired size and max element size (else clause). We can't
|
// the cell wants to be bigger than what was available last time or
|
||||||
// do this in paganated mode or for a style change reflow.
|
// it is a style change reflow or we are printing, then we must reflow the
|
||||||
|
// cell. Otherwise we can skip the reflow.
|
||||||
nsIFrame* kidNextInFlow;
|
nsIFrame* kidNextInFlow;
|
||||||
kidFrame->GetNextInFlow(&kidNextInFlow);
|
kidFrame->GetNextInFlow(&kidNextInFlow);
|
||||||
|
nsSize cellDesiredSize = cellFrame->GetDesiredSize();
|
||||||
if ((availWidth != cellFrame->GetPriorAvailWidth()) ||
|
if ((availWidth != cellFrame->GetPriorAvailWidth()) ||
|
||||||
|
(cellDesiredSize.width > cellFrame->GetPriorAvailWidth()) ||
|
||||||
(eReflowReason_StyleChange == aReflowState.reason) ||
|
(eReflowReason_StyleChange == aReflowState.reason) ||
|
||||||
isPaginated) {
|
isPaginated) {
|
||||||
// Reflow the cell to fit the available width, height
|
// Reflow the cell to fit the available width, height
|
||||||
|
|||||||
@@ -828,12 +828,15 @@ nsTableRowFrame::ReflowChildren(nsIPresContext* aPresContext,
|
|||||||
prevColIndex = (iter.IsLeftToRight()) ? cellColIndex + (cellColSpan - 1) : cellColIndex;
|
prevColIndex = (iter.IsLeftToRight()) ? cellColIndex + (cellColSpan - 1) : cellColIndex;
|
||||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||||
|
|
||||||
// If the available width is the same as last time we reflowed the cell,then
|
// If the avail width is not the same as last time we reflowed the cell or
|
||||||
// use the previous desired size and max element size (else clause). We can't
|
// the cell wants to be bigger than what was available last time or
|
||||||
// do this in paganated mode or for a style change reflow.
|
// it is a style change reflow or we are printing, then we must reflow the
|
||||||
|
// cell. Otherwise we can skip the reflow.
|
||||||
nsIFrame* kidNextInFlow;
|
nsIFrame* kidNextInFlow;
|
||||||
kidFrame->GetNextInFlow(&kidNextInFlow);
|
kidFrame->GetNextInFlow(&kidNextInFlow);
|
||||||
|
nsSize cellDesiredSize = cellFrame->GetDesiredSize();
|
||||||
if ((availWidth != cellFrame->GetPriorAvailWidth()) ||
|
if ((availWidth != cellFrame->GetPriorAvailWidth()) ||
|
||||||
|
(cellDesiredSize.width > cellFrame->GetPriorAvailWidth()) ||
|
||||||
(eReflowReason_StyleChange == aReflowState.reason) ||
|
(eReflowReason_StyleChange == aReflowState.reason) ||
|
||||||
isPaginated) {
|
isPaginated) {
|
||||||
// Reflow the cell to fit the available width, height
|
// Reflow the cell to fit the available width, height
|
||||||
|
|||||||
Reference in New Issue
Block a user