зеркало из https://github.com/mozilla/gecko-dev.git
b=391028, drawImage with broken PNG horks, r=stuart/a=stuart
This commit is contained in:
Родитель
8fe5580b4c
Коммит
99149ab022
|
@ -2121,10 +2121,15 @@ nsCanvasRenderingContext2D::CairoSurfaceFromElement(nsIDOMElement *imgElt,
|
|||
// XXX ERRMSG we need to report an error to developers here! (bug 329026)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
PRUint32 status;
|
||||
imgRequest->GetImageStatus(&status);
|
||||
if (status != imgIRequest::STATUS_LOAD_COMPLETE)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
rv = imageLoader->GetCurrentURI(uriOut);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
|
||||
*forceWriteOnlyOut = PR_FALSE;
|
||||
|
||||
rv = imgRequest->GetImage(getter_AddRefs(imgContainer));
|
||||
|
|
Загрузка…
Ссылка в новой задаче