Index: Source/core/html/canvas/WebGLRenderingContextBase.cpp |
diff --git a/Source/core/html/canvas/WebGLRenderingContextBase.cpp b/Source/core/html/canvas/WebGLRenderingContextBase.cpp |
index bb8ca51cfa5f763d6240daec7551465316b9b35d..165df0a54681f15019fd284bc5759be57361ffb0 100644 |
--- a/Source/core/html/canvas/WebGLRenderingContextBase.cpp |
+++ b/Source/core/html/canvas/WebGLRenderingContextBase.cpp |
@@ -3642,7 +3642,7 @@ void WebGLRenderingContextBase::texImage2D(GLenum target, GLint level, GLenum in |
if (isContextLost() || !validateHTMLImageElement("texImage2D", image, exceptionState)) |
return; |
- RefPtr<Image> imageForRender = image->cachedImage()->imageForRenderer(image->renderer()); |
+ RefPtr<Image> imageForRender = image->cachedImage()->imageForRenderer(image->layoutObject()); |
if (imageForRender->isSVGImage()) |
imageForRender = drawImageIntoBuffer(imageForRender.get(), image->width(), image->height(), "texImage2D"); |
@@ -3950,7 +3950,7 @@ void WebGLRenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint |
if (isContextLost() || !validateHTMLImageElement("texSubImage2D", image, exceptionState)) |
return; |
- RefPtr<Image> imageForRender = image->cachedImage()->imageForRenderer(image->renderer()); |
+ RefPtr<Image> imageForRender = image->cachedImage()->imageForRenderer(image->layoutObject()); |
if (imageForRender->isSVGImage()) |
imageForRender = drawImageIntoBuffer(imageForRender.get(), image->width(), image->height(), "texSubImage2D"); |