Bug 1446588. Remove the WRUserDatas when document changes Window. r=kats
We can have our LayerManager changed on us when document changes window.
(Tab drag, dev tools pop-out). We need to make sure we clear our
WebRenderUserData in that case. This hooks into the existing mechanism
that does this for DisplayItemData.
MozReview-Commit-ID: 8aoOBGOP5Wx
--- a/layout/painting/FrameLayerBuilder.cpp
+++ b/layout/painting/FrameLayerBuilder.cpp
@@ -416,16 +416,17 @@ public:
bool mInvalidateAllLayers;
};
/* static */ void
FrameLayerBuilder::DestroyDisplayItemDataFor(nsIFrame* aFrame)
{
RemoveFrameFromLayerManager(aFrame, aFrame->DisplayItemData());
aFrame->DisplayItemData().Clear();
+ aFrame->DeleteProperty(WebRenderUserDataProperty::Key());
}
/**
* We keep a stack of these to represent the PaintedLayers that are
* currently available to have display items added to.
* We use a stack here because as much as possible we want to
* assign display items to existing PaintedLayers, and to the lowest
* PaintedLayer in z-order. This reduces the number of layers and