diff options
Diffstat (limited to 'WebCore/bridge/qt/qt_runtime.cpp')
-rw-r--r-- | WebCore/bridge/qt/qt_runtime.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/WebCore/bridge/qt/qt_runtime.cpp b/WebCore/bridge/qt/qt_runtime.cpp index 96851fa..6595b84 100644 --- a/WebCore/bridge/qt/qt_runtime.cpp +++ b/WebCore/bridge/qt/qt_runtime.cpp @@ -28,6 +28,7 @@ #include "Interpreter.h" #include "JSArray.h" #include "JSByteArray.h" +#include "JSDocument.h" #include "JSDOMBinding.h" #include "JSDOMWindow.h" #include <JSFunction.h> @@ -747,6 +748,8 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type } else if (hint == (QMetaType::Type) qMetaTypeId<QWebElement>()) { if (object && object->inherits(&JSHTMLElement::s_info)) ret = QVariant::fromValue<QWebElement>(QtWebElementRuntime::create((static_cast<JSHTMLElement*>(object))->impl())); + else if (object && object->inherits(&JSDocument::s_info)) + ret = QVariant::fromValue<QWebElement>(QtWebElementRuntime::create((static_cast<JSDocument*>(object))->impl()->documentElement())); else ret = QVariant::fromValue<QWebElement>(QWebElement()); } else if (hint == (QMetaType::Type) qMetaTypeId<QVariant>()) { |