Address review comment on bug 9458 that depends on bug 367247 by making nsFrame::IsContainingBlock not check display type, but making it purely frame-class-based.

This commit is contained in:
dbaron%dbaron.org 2007-01-27 18:45:35 +00:00
Родитель 1b7cdac572
Коммит 9b608ec24d
3 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -3766,17 +3766,9 @@ nsFrame::IsFrameTreeTooDeep(const nsHTMLReflowState& aReflowState,
return PR_FALSE;
}
// Style sizing methods
/* virtual */ PRBool nsFrame::IsContainingBlock() const
{
const nsStyleDisplay* display = GetStyleDisplay();
// 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;
return PR_FALSE;
}
#ifdef NS_DEBUG

Просмотреть файл

@ -964,6 +964,12 @@ nsTableCellFrame::GetType() const
return nsGkAtoms::tableCellFrame;
}
/* virtual */ PRBool
nsTableCellFrame::IsContainingBlock() const
{
return PR_TRUE;
}
#ifdef DEBUG
NS_IMETHODIMP
nsTableCellFrame::GetFrameName(nsAString& aResult) const

Просмотреть файл

@ -148,6 +148,8 @@ public:
*/
virtual nsIAtom* GetType() const;
virtual PRBool IsContainingBlock() const;
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif