зеркало из https://github.com/mozilla/gecko-dev.git
Back out changeset aa4791e4dad9 (Bug 529386 - optimize canvas.width = canvas.width) to fix orange.
This commit is contained in:
Родитель
306469ad68
Коммит
0927783cce
|
@ -842,10 +842,6 @@ nsCanvasRenderingContext2D::Redraw(const gfxRect& r)
|
|||
NS_IMETHODIMP
|
||||
nsCanvasRenderingContext2D::SetDimensions(PRInt32 width, PRInt32 height)
|
||||
{
|
||||
// Avoid creating a new surface if the dimensions are not changing
|
||||
if (mWidth == width && mHeight == height)
|
||||
return InitializeWithSurface(NULL, mSurface, width, height);
|
||||
|
||||
Destroy();
|
||||
|
||||
nsRefPtr<gfxASurface> surface;
|
||||
|
@ -868,6 +864,8 @@ nsCanvasRenderingContext2D::SetDimensions(PRInt32 width, PRInt32 height)
|
|||
|
||||
NS_IMETHODIMP
|
||||
nsCanvasRenderingContext2D::InitializeWithSurface(nsIDocShell *docShell, gfxASurface *surface, PRInt32 width, PRInt32 height) {
|
||||
Destroy();
|
||||
|
||||
NS_ASSERTION(!docShell ^ !mCanvasElement, "Cannot set both docshell and canvas element");
|
||||
mDocShell = docShell;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче