Bug 1322939 - Render pending dialog stack into top layer. r=xidorn
MozReview-Commit-ID: 63jvhQi9jpN
--- a/layout/generic/ViewportFrame.cpp
+++ b/layout/generic/ViewportFrame.cpp
@@ -154,16 +154,31 @@ ViewportFrame::BuildDisplayListForTopLay
static_cast<nsPlaceholderFrame*>(backdropPh)->GetOutOfFlowFrame();
MOZ_ASSERT(backdropFrame);
BuildDisplayListForTopLayerFrame(aBuilder, backdropFrame, aList);
}
BuildDisplayListForTopLayerFrame(aBuilder, frame, aList);
}
}
+ nsTArray<Element*> pendingDialogStack = doc->GetPendingDialogStack();
+ for (Element* dialog : pendingDialogStack) {
+ if (nsIFrame* frame = dialog->GetPrimaryFrame()) {
+ if (nsIFrame* backdropPh =
+ frame->GetChildList(kBackdropList).FirstChild()) {
+ MOZ_ASSERT(backdropPh->GetType() == nsGkAtoms::placeholderFrame);
+ nsIFrame* backdropFrame =
+ static_cast<nsPlaceholderFrame*>(backdropPh)->GetOutOfFlowFrame();
+ MOZ_ASSERT(backdropFrame);
+ BuildDisplayListForTopLayerFrame(aBuilder, backdropFrame, aList);
+ }
+ BuildDisplayListForTopLayerFrame(aBuilder, frame, aList);
+ }
+ }
+
nsIPresShell* shell = PresContext()->PresShell();
if (nsCanvasFrame* canvasFrame = shell->GetCanvasFrame()) {
if (Element* container = canvasFrame->GetCustomContentContainer()) {
if (nsIFrame* frame = container->GetPrimaryFrame()) {
BuildDisplayListForTopLayerFrame(aBuilder, frame, aList);
}
}
}