summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLDataGridElementCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/bindings/js/JSHTMLDataGridElementCustom.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/bindings/js/JSHTMLDataGridElementCustom.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLDataGridElementCustom.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLDataGridElementCustom.cpp
index 5aa0904821..a30f5e4dee 100644
--- a/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLDataGridElementCustom.cpp
+++ b/src/3rdparty/webkit/WebCore/bindings/js/JSHTMLDataGridElementCustom.cpp
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if ENABLE(DATAGRID)
+
#include "JSHTMLDataGridElement.h"
#include "Document.h"
@@ -44,7 +47,14 @@ JSValue JSHTMLDataGridElement::dataSource(ExecState*) const
void JSHTMLDataGridElement::setDataSource(ExecState*, JSValue value)
{
+ if (value.isNull()) {
+ static_cast<HTMLDataGridElement*>(impl())->setDataSource(0);
+ return;
+ }
+
static_cast<HTMLDataGridElement*>(impl())->setDataSource(JSDataGridDataSource::create(value, impl()->document()->frame()));
}
} // namespace WebCore
+
+#endif // ENABLE(DATAGRID)