Open Bug 185442 Opened 22 years ago Updated 2 years ago

Assertions in nsBlockFrame::PullFrameFor: empty damage rect: update caller to avoid fcn call overhead

Categories

(Core :: Layout: Block and Inline, defect)

x86
Windows 2000
defect

Tracking

()

People

(Reporter: bratell, Unassigned)

References

Details

nsFrame warns that nsBlockFrame::PullFrameFor tries to invalidate an empty area at line 2852: nsRect combinedArea; fromLine->GetCombinedArea(&combinedArea); // Free up the fromLine now that it's empty // Its bounds might need to be redrawn, though. if (aDamageDeletedLines && !fromLine->mBounds.IsEmpty()) { Invalidate(aState.mPresContext, fromLine->mBounds); } if (aFromLine.next() != end_lines()) aFromLine.next()->MarkPreviousMarginDirty(); Invalidate(aState.mPresContext, combinedArea); // <-- empty combinedArea aFromContainer.erase(aFromLine); aState.FreeLineBox(fromLine); nsRect combinedArea; fromLine->GetCombinedArea(&combinedArea); // Free up the fromLine now that it's empty // Its bounds might need to be redrawn, though. if (aDamageDeletedLines && !fromLine->mBounds.IsEmpty()) { Invalidate(aState.mPresContext, fromLine->mBounds); } if (aFromLine.next() != end_lines()) aFromLine.next()->MarkPreviousMarginDirty(); Invalidate(aState.mPresContext, combinedArea); // <-- empty combinedArea aFromContainer.erase(aFromLine); aState.FreeLineBox(fromLine); Should it be rewritten: // Free up the fromLine now that it's empty // Its bounds might need to be redrawn, though. if (aDamageDeletedLines && !fromLine->mBounds.IsEmpty()) { Invalidate(aState.mPresContext, fromLine->mBounds); } if (aFromLine.next() != end_lines()) aFromLine.next()->MarkPreviousMarginDirty(); nsRect combinedArea; fromLine->GetCombinedArea(&combinedArea); if (!combinedArea.IsEmpty()) Invalidate(aState.mPresContext, combinedArea); aFromContainer.erase(aFromLine); aState.FreeLineBox(fromLine);
I pasted the code twice by mistake. Just ignore the extra code segment.
The line that causes the warning has a null mData and an empty mBounds.
Depends on: 233292
Assignee: layout.block-and-inline → nobody
QA Contact: ian → layout.block-and-inline
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.