Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 5ebf30c09df1c5526ebb5cee4adf57d7ed41a690..5718b8aec48f75ee32a4682042d4efc24f6bf4ab 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -145,6 +145,7 @@ |
#include "core/html/HTMLTitleElement.h" |
#include "core/html/PluginDocument.h" |
#include "core/html/WindowNameCollection.h" |
+#include "core/html/canvas/CanvasContextCreationAttributes.h" |
#include "core/html/canvas/CanvasRenderingContext.h" |
#include "core/html/canvas/CanvasRenderingContext2D.h" |
#include "core/html/canvas/WebGLRenderingContext.h" |
@@ -4942,15 +4943,7 @@ void Document::getCSSCanvasContext(const String& type, const String& name, int w |
{ |
HTMLCanvasElement& element = getCSSCanvasElement(name); |
element.setSize(IntSize(width, height)); |
- CanvasRenderingContext* context = element.getContext(type); |
- if (!context) |
- return; |
- |
- if (context->is2d()) { |
- returnValue.setCanvasRenderingContext2D(toCanvasRenderingContext2D(context)); |
- } else if (context->is3d()) { |
- returnValue.setWebGLRenderingContext(toWebGLRenderingContext(context)); |
- } |
+ element.getContext(type, CanvasContextCreationAttributes(), returnValue); |
} |
HTMLCanvasElement& Document::getCSSCanvasElement(const String& name) |