Work around for the case where a content change notification has

no corresponding frame in the frame hierarchy
This commit is contained in:
troy 1998-06-24 04:37:11 +00:00
Родитель 735aabc1a1
Коммит a45125c78c
1 изменённых файлов: 9 добавлений и 6 удалений

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

@ -587,13 +587,16 @@ PresShell::ContentChanged(nsIContent* aContent,
// Notify the first frame that maps the content. It will generate a reflow
// command
nsIFrame* frame = FindFrameWithContent(aContent);
NS_PRECONDITION(nsnull != frame, "null frame");
PR_LOG(gShellLogModuleInfo, PR_LOG_DEBUG,
("PresShell::ContentChanged: content=%p[%s] subcontent=%p frame=%p",
aContent, ContentTag(aContent, 0),
aSubContent, frame));
frame->ContentChanged(this, mPresContext, aContent, aSubContent);
// It's possible the frame whose content changed isn't inserted into the
// frame hierarchy yet. This sometimes happens with images inside tables
if (nsnull != frame) {
PR_LOG(gShellLogModuleInfo, PR_LOG_DEBUG,
("PresShell::ContentChanged: content=%p[%s] subcontent=%p frame=%p",
aContent, ContentTag(aContent, 0),
aSubContent, frame));
frame->ContentChanged(this, mPresContext, aContent, aSubContent);
}
ExitReflowLock();
return NS_OK;