summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp')
-rw-r--r--WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp b/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
index 54a003c..67ba38b 100644
--- a/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
@@ -39,7 +39,9 @@
#include "V8CanvasRenderingContext2D.h"
#include "V8Node.h"
#include "V8Proxy.h"
+#if ENABLE(3D_CANVAS)
#include "V8WebGLRenderingContext.h"
+#endif
namespace WebCore {
@@ -54,7 +56,7 @@ v8::Handle<v8::Value> V8HTMLCanvasElement::getContextCallback(const v8::Argument
if (contextId == "experimental-webgl" || contextId == "webkit-3d") {
attrs = WebGLContextAttributes::create();
WebGLContextAttributes* webGLAttrs = static_cast<WebGLContextAttributes*>(attrs.get());
- if (args.Length() > 1 && args[0]->IsObject()) {
+ if (args.Length() > 1 && args[1]->IsObject()) {
v8::Handle<v8::Object> jsAttrs = args[1]->ToObject();
v8::Handle<v8::String> alpha = v8::String::New("alpha");
if (jsAttrs->Has(alpha))