Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 1ba1c37be97857a0af5a58294172928398765e58..7f796f7a077402c5117058ee62aa18834688d41c 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" |
@@ -4934,7 +4935,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)); |
@@ -4943,9 +4944,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)); |
} |
} |