Closed Bug 371450 Opened 17 years ago Closed 5 years ago

nsFrame::IsContainingBlock should use nsStyleDisplay::IsBlockInside

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: dbaron, Unassigned)

Details

In bug 9458 comment 87, bzbarsky wrote:
> >@@ -3773,6 +3773,7 @@ nsFrame::IsFrameTreeTooDeep(const nsHTML
> >   // Absolute positioning causes |display->mDisplay| to be set to block,
> >   // if needed.
> >   return display->mDisplay == NS_STYLE_DISPLAY_BLOCK || 
> >+         display->mDisplay == NS_STYLE_DISPLAY_INLINE_BLOCK || 
> >          display->mDisplay == NS_STYLE_DISPLAY_LIST_ITEM ||
> >          display->mDisplay == NS_STYLE_DISPLAY_TABLE_CELL;
> 
> Huh.  The function name in that "@@ .... @@" line is such a lie!
> 
> Should the condition here basically be something like IsBlockInside()?
Product: Core → Core Graveyard
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core

I can't find any IsContainingBlock function, and I'm removing IsBlockInside in bug 1574107 since it's dead code.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME

The code is probably now nsIFrame::GetContainingBlock, which calls GetNearestBlockContainer, which has tests for things that aren't containing blocks.

So I think this is no longer an issue.

You need to log in before you can comment on or make changes to this bug.