Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 3d9b2ff48daa51b26d54f977f31b9b48e03af427..d9973c2d86cf2b4bc9b8693edb4855524db8a4b0 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -34,6 +34,7 @@ |
#include "bindings/core/v8/ExceptionState.h" |
#include "bindings/core/v8/ExceptionStatePlaceholder.h" |
#include "bindings/core/v8/ScriptController.h" |
+#include "bindings/core/v8/UnionTypesCore.h" |
#include "bindings/core/v8/V8DOMWrapper.h" |
#include "bindings/core/v8/WindowProxy.h" |
#include "core/HTMLElementFactory.h" |
@@ -4941,7 +4942,7 @@ void Document::detachRange(Range* range) |
m_ranges.remove(range); |
} |
-void Document::getCSSCanvasContext(const String& type, const String& name, int width, int height, RefPtrWillBeRawPtr<CanvasRenderingContext2D>& context2d, RefPtrWillBeRawPtr<WebGLRenderingContext>& context3d) |
+void Document::getCSSCanvasContext(const String& type, const String& name, int width, int height, CanvasRenderingContext2DOrWebGLRenderingContext& returnValue) |
{ |
HTMLCanvasElement& element = getCSSCanvasElement(name); |
element.setSize(IntSize(width, height)); |
@@ -4950,9 +4951,9 @@ void Document::getCSSCanvasContext(const String& type, const String& name, int w |
return; |
if (context->is2d()) { |
- context2d = toCanvasRenderingContext2D(context); |
+ returnValue.setCanvasRenderingContext2D(toCanvasRenderingContext2D(context)); |
} else if (context->is3d()) { |
- context3d = toWebGLRenderingContext(context); |
+ returnValue.setWebGLRenderingContext(toWebGLRenderingContext(context)); |
} |
} |