mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
b=797568 remove obsolete nsObjectFrame::GetImageContainer() r=roc
--HG-- extra : transplant_source : h%CB%86%8A%E4%9B%1A%7DqS9%AC6%93s%0D%099%0A%B2
This commit is contained in:
parent
b2a7ad7d3b
commit
9da873f8c3
@ -3434,30 +3434,6 @@ void nsPluginInstanceOwner::SetFrame(nsObjectFrame *aFrame)
|
||||
|
||||
// If we already have a frame that is changing or going away...
|
||||
if (mObjectFrame) {
|
||||
// We have an old frame.
|
||||
// Drop image reference because the child may destroy the surface after we return.
|
||||
nsRefPtr<ImageContainer> container = mObjectFrame->GetImageContainer();
|
||||
if (container) {
|
||||
#ifdef XP_MACOSX
|
||||
AutoLockImage autoLock(container);
|
||||
Image *image = autoLock.GetImage();
|
||||
if (image && (image->GetFormat() == MAC_IO_SURFACE) && mObjectFrame) {
|
||||
// Undo what we did to the current image in SetCurrentImageInTransaction().
|
||||
MacIOSurfaceImage *oglImage = static_cast<MacIOSurfaceImage*>(image);
|
||||
oglImage->SetUpdateCallback(nullptr, nullptr);
|
||||
oglImage->SetDestroyCallback(nullptr);
|
||||
// If we have a current image here, its destructor hasn't yet been
|
||||
// called, so OnDestroyImage() can't yet have been called. So we need
|
||||
// to do ourselves what OnDestroyImage() would have done.
|
||||
NS_RELEASE_THIS();
|
||||
}
|
||||
// Important! Unlock here otherwise SetCurrentImageInTransaction will deadlock with
|
||||
// our lock if we have a RemoteImage.
|
||||
autoLock.Unlock();
|
||||
#endif
|
||||
container->SetCurrentImageInTransaction(nullptr);
|
||||
}
|
||||
|
||||
// Make sure the old frame isn't holding a reference to us.
|
||||
mObjectFrame->SetInstanceOwner(nullptr);
|
||||
}
|
||||
|
@ -1241,11 +1241,7 @@ nsObjectFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
#endif
|
||||
}
|
||||
|
||||
nsRefPtr<ImageContainer> container = GetImageContainer();
|
||||
if (container && (container->HasCurrentImage() || !isVisible ||
|
||||
container->GetCurrentSize() != gfxIntSize(window->width, window->height))) {
|
||||
mInstanceOwner->NotifyPaintWaiter(aBuilder);
|
||||
}
|
||||
mInstanceOwner->NotifyPaintWaiter(aBuilder);
|
||||
}
|
||||
|
||||
// determine if we are printing
|
||||
@ -1524,20 +1520,6 @@ nsObjectFrame::PrintPlugin(nsRenderingContext& aRenderingContext,
|
||||
nullptr, status); // DidReflow will take care of it
|
||||
}
|
||||
|
||||
already_AddRefed<ImageContainer>
|
||||
nsObjectFrame::GetImageContainer()
|
||||
{
|
||||
nsRefPtr<ImageContainer> container = mImageContainer;
|
||||
|
||||
if (container) {
|
||||
return container.forget();
|
||||
}
|
||||
|
||||
container = mImageContainer = LayerManager::CreateImageContainer();
|
||||
|
||||
return container.forget();
|
||||
}
|
||||
|
||||
nsRect
|
||||
nsObjectFrame::GetPaintedRect(nsDisplayPlugin* aItem)
|
||||
{
|
||||
|
@ -173,7 +173,6 @@ public:
|
||||
LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
|
||||
LayerManager* aManager);
|
||||
|
||||
already_AddRefed<ImageContainer> GetImageContainer();
|
||||
/**
|
||||
* Get the rectangle (relative to this frame) which it will paint. Normally
|
||||
* the frame's content-box but may be smaller if the plugin is rendering
|
||||
@ -290,10 +289,6 @@ private:
|
||||
|
||||
bool mReflowCallbackPosted;
|
||||
|
||||
// A reference to the ImageContainer which contains the current frame
|
||||
// of plugin to display.
|
||||
nsRefPtr<ImageContainer> mImageContainer;
|
||||
|
||||
// We keep this reference to ensure we can always unregister the
|
||||
// plugins we register on the root PresContext.
|
||||
// This is only non-null while we have a plugin registered for geometry
|
||||
|
Loading…
Reference in New Issue
Block a user