зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1370727 - Return void from nsICanvasRenderingContextInternal::SetIsOpaque r=bz
nsICanvasRenderingContextInternal::SetIsOpaque returns nsresult, but no implementations return errors. It should return void instead. MozReview-Commit-ID: LrGouaeoCvo --HG-- extra : rebase_source : a17432006aa073edaecf15424a3b350309d704c4
This commit is contained in:
Родитель
e55ca58b23
Коммит
8c3a82a2d2
|
@ -2026,15 +2026,13 @@ CanvasRenderingContext2D::InitializeWithDrawTarget(nsIDocShell* aShell,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
CanvasRenderingContext2D::SetIsOpaque(bool aIsOpaque)
|
||||
{
|
||||
if (aIsOpaque != mOpaque) {
|
||||
mOpaque = aIsOpaque;
|
||||
ClearTarget();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
|
|
@ -461,7 +461,7 @@ public:
|
|||
return mTarget->Snapshot();
|
||||
}
|
||||
|
||||
NS_IMETHOD SetIsOpaque(bool aIsOpaque) override;
|
||||
virtual void SetIsOpaque(bool aIsOpaque) override;
|
||||
bool GetIsOpaque() override { return mOpaque; }
|
||||
NS_IMETHOD Reset() override;
|
||||
already_AddRefed<Layer> GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
|
|
|
@ -237,13 +237,9 @@ CanvasRenderingContextHelper::UpdateContext(JSContext* aCx,
|
|||
|
||||
nsCOMPtr<nsICanvasRenderingContextInternal> currentContext = mCurrentContext;
|
||||
|
||||
nsresult rv = currentContext->SetIsOpaque(GetOpaqueAttr());
|
||||
if (NS_FAILED(rv)) {
|
||||
mCurrentContext = nullptr;
|
||||
return rv;
|
||||
}
|
||||
currentContext->SetIsOpaque(GetOpaqueAttr());
|
||||
|
||||
rv = currentContext->SetContextOptions(aCx, aNewContextOptions,
|
||||
nsresult rv = currentContext->SetContextOptions(aCx, aNewContextOptions,
|
||||
aRvForDictionaryInit);
|
||||
if (NS_FAILED(rv)) {
|
||||
mCurrentContext = nullptr;
|
||||
|
|
|
@ -200,10 +200,9 @@ ImageBitmapRenderingContext::GetSurfaceSnapshot(gfxAlphaType* const aOutAlphaTyp
|
|||
return surface.forget();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
void
|
||||
ImageBitmapRenderingContext::SetIsOpaque(bool aIsOpaque)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -66,7 +66,7 @@ public:
|
|||
virtual already_AddRefed<mozilla::gfx::SourceSurface>
|
||||
GetSurfaceSnapshot(gfxAlphaType* aOutAlphaType) override;
|
||||
|
||||
NS_IMETHOD SetIsOpaque(bool aIsOpaque) override;
|
||||
virtual void SetIsOpaque(bool aIsOpaque) override;
|
||||
virtual bool GetIsOpaque() override;
|
||||
NS_IMETHOD Reset() override;
|
||||
virtual already_AddRefed<Layer> GetCanvasLayer(nsDisplayListBuilder* aBuilder,
|
||||
|
|
|
@ -382,7 +382,7 @@ public:
|
|||
virtual already_AddRefed<mozilla::gfx::SourceSurface>
|
||||
GetSurfaceSnapshot(gfxAlphaType* out_alphaType) override;
|
||||
|
||||
NS_IMETHOD SetIsOpaque(bool) override { return NS_OK; };
|
||||
virtual void SetIsOpaque(bool) override {};
|
||||
bool GetIsOpaque() override { return false; }
|
||||
NS_IMETHOD SetContextOptions(JSContext* cx,
|
||||
JS::Handle<JS::Value> options,
|
||||
|
|
|
@ -126,7 +126,7 @@ public:
|
|||
// be created as opaque; all compositing operators should assume the
|
||||
// dst alpha is always 1.0. If this is never called, the context
|
||||
// defaults to false (not opaque).
|
||||
NS_IMETHOD SetIsOpaque(bool isOpaque) = 0;
|
||||
virtual void SetIsOpaque(bool isOpaque) = 0;
|
||||
virtual bool GetIsOpaque() = 0;
|
||||
|
||||
// Invalidate this context and release any held resources, in preperation
|
||||
|
|
Загрузка…
Ссылка в новой задаче