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)
Tracking
()
NEW
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);
Reporter | ||
Comment 1•22 years ago
|
||
I pasted the code twice by mistake. Just ignore the extra code segment.
Reporter | ||
Comment 2•22 years ago
|
||
The line that causes the warning has a null mData and an empty mBounds.
Updated•15 years ago
|
Assignee: layout.block-and-inline → nobody
QA Contact: ian → layout.block-and-inline
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•