Bug 1429078 - Handle the case where the subdoc view doesn't have a frame. r=miko

--HG--
extra : rebase_source : badce58f07f66a7a0146f51792463c08a75506f1
This commit is contained in:
Matt Woodrow 2018-01-17 12:04:51 +13:00
Родитель d9815e3cac
Коммит 89bf796c70
1 изменённых файлов: 9 добавлений и 8 удалений

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

@ -550,16 +550,17 @@ SubDocEnumCb(nsIDocument* aDocument, void* aData)
MOZ_ASSERT(subDocView);
nsIFrame* subDocFrame = subDocView->GetFrame();
MOZ_ASSERT(subDocFrame);
nsSubDocumentFrame* subdocumentFrame = do_QueryFrame(subDocFrame);
MOZ_ASSERT(subdocumentFrame);
if (subDocFrame) {
nsSubDocumentFrame* subdocumentFrame = do_QueryFrame(subDocFrame);
MOZ_ASSERT(subdocumentFrame);
presShell = subdocumentFrame->GetSubdocumentPresShellForPainting(
data->builder->IsIgnoringPaintSuppression() ? nsSubDocumentFrame::IGNORE_PAINT_SUPPRESSION : 0);
nsIFrame* rootFrame = presShell ? presShell->GetRootFrame() : nullptr;
presShell = subdocumentFrame->GetSubdocumentPresShellForPainting(
data->builder->IsIgnoringPaintSuppression() ? nsSubDocumentFrame::IGNORE_PAINT_SUPPRESSION : 0);
nsIFrame* rootFrame = presShell ? presShell->GetRootFrame() : nullptr;
if (rootFrame) {
TakeAndAddModifiedFramesFromRootFrame(data->modifiedFrames, rootFrame);
if (rootFrame) {
TakeAndAddModifiedFramesFromRootFrame(data->modifiedFrames, rootFrame);
}
}
}