Open Bug 386449 Opened 14 years ago Updated 3 years ago

add assertions for invariants of primary frame relationship

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

REOPENED

People

(Reporter: dbaron, Unassigned)

References

(Depends on 1 open bug)

Details

We should add assertions to enforce invariants of the primary frame map, as follows:

 * nsFrameManager::SetPrimaryFrameFor should have the assertion (currently in #if 0) that aPrimaryFrame->GetContent() == aContent enabled

 * nsFrameManager::SetPrimaryFrameFor should have the warning that entry->frame is null (currently #ifdef DEBUG_dbaron) enabled for everybody and turned into an assertion

 * nsFrameManager::RemoveAsPrimaryFrame should assert that entry->frame == aPrimaryFrame rather than checking it
Blocks: 386450
The primary frame map was removed in bug 500882.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Or are some of these assertions still relevant to the "primary frame mapping" that now exists as a pointer held by the frame?
These are still relevant to primary frame pointer in the content node.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Summary: add assertions for invariants of primary frame map → add assertions for invariants of primary frame relationship
> * nsFrameManager::SetPrimaryFrameFor should have the assertion (currently in
> #if 0) that aPrimaryFrame->GetContent() == aContent enabled

This should move (still in #if 0 pending the <area> mess being fixed) into nsIContent::SetPrimaryFrame, right?

> * nsFrameManager::SetPrimaryFrameFor should have the warning that entry->frame
> is null (currently #ifdef DEBUG_dbaron) enabled for everybody and turned into
> an assertion

This was effectively done in bug 536716, I think.

> nsFrameManager::RemoveAsPrimaryFrame should assert that entry->frame ==
> aPrimaryFrame rather than checking it

This part I'm not sure has a new-world equivalent, nor that it should.
Product: Core → Core Graveyard
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.