mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1215360 - Render canvas anonymous content on top of the top layer. r=roc
--HG-- extra : source : 231e0e545afaf3bf4993b0f6d20cd60ee734c899
This commit is contained in:
parent
9a3278a626
commit
af8cf1df88
@ -12,6 +12,7 @@
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsSubDocumentFrame.h"
|
||||
#include "nsCanvasFrame.h"
|
||||
#include "nsAbsoluteContainingBlock.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "nsIMozBrowserFrame.h"
|
||||
@ -91,6 +92,22 @@ ShouldInTopLayerForFullscreen(Element* aElement)
|
||||
}
|
||||
#endif // DEBUG
|
||||
|
||||
static void
|
||||
BuildDisplayListForTopLayerFrame(nsDisplayListBuilder* aBuilder,
|
||||
nsIFrame* aFrame,
|
||||
nsDisplayList* aList)
|
||||
{
|
||||
nsRect dirty;
|
||||
nsDisplayListBuilder::OutOfFlowDisplayData*
|
||||
savedOutOfFlowData = nsDisplayListBuilder::GetOutOfFlowData(aFrame);
|
||||
if (savedOutOfFlowData) {
|
||||
dirty = savedOutOfFlowData->mDirtyRect;
|
||||
}
|
||||
nsDisplayList list;
|
||||
aFrame->BuildDisplayListForStackingContext(aBuilder, dirty, &list);
|
||||
aList->AppendToTop(&list);
|
||||
}
|
||||
|
||||
void
|
||||
ViewportFrame::BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
|
||||
nsDisplayList* aList)
|
||||
@ -123,16 +140,16 @@ ViewportFrame::BuildDisplayListForTopLayer(nsDisplayListBuilder* aBuilder,
|
||||
continue;
|
||||
}
|
||||
MOZ_ASSERT(frame->GetParent() == this);
|
||||
BuildDisplayListForTopLayerFrame(aBuilder, frame, aList);
|
||||
}
|
||||
}
|
||||
|
||||
nsRect dirty;
|
||||
nsDisplayListBuilder::OutOfFlowDisplayData*
|
||||
savedOutOfFlowData = nsDisplayListBuilder::GetOutOfFlowData(frame);
|
||||
if (savedOutOfFlowData) {
|
||||
dirty = savedOutOfFlowData->mDirtyRect;
|
||||
nsIPresShell* shell = PresContext()->PresShell();
|
||||
if (nsCanvasFrame* canvasFrame = shell->GetCanvasFrame()) {
|
||||
if (Element* container = canvasFrame->GetCustomContentContainer()) {
|
||||
if (nsIFrame* frame = container->GetPrimaryFrame()) {
|
||||
BuildDisplayListForTopLayerFrame(aBuilder, frame, aList);
|
||||
}
|
||||
nsDisplayList list;
|
||||
frame->BuildDisplayListForStackingContext(aBuilder, dirty, &list);
|
||||
aList->AppendToTop(&list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -514,12 +514,10 @@ div:-moz-native-anonymous.moz-selectioncaret-right.hidden > div {
|
||||
everything else, not reacting to pointer events. */
|
||||
div:-moz-native-anonymous.moz-custom-content-container {
|
||||
pointer-events: none;
|
||||
|
||||
-moz-top-layer: top;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
z-index: 2147483648;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user