summaryrefslogtreecommitdiff
path: root/Source/WebKit/qt/Api/qwebelement.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
commit284837daa07b29d6a63a748544a90b1f5842ac5c (patch)
treeecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/WebKit/qt/Api/qwebelement.cpp
parent2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff)
downloadqtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/WebKit/qt/Api/qwebelement.cpp')
-rw-r--r--Source/WebKit/qt/Api/qwebelement.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp
index a208cbc4e..298f6cdc3 100644
--- a/Source/WebKit/qt/Api/qwebelement.cpp
+++ b/Source/WebKit/qt/Api/qwebelement.cpp
@@ -20,6 +20,7 @@
#include "config.h"
#include "qwebelement.h"
+#include "APICast.h"
#include "qwebelement_p.h"
#include "CSSComputedStyleDeclaration.h"
#include "CSSParser.h"
@@ -545,7 +546,7 @@ QRect QWebElement::geometry() const
{
if (!m_element)
return QRect();
- return m_element->getPixelSnappedRect();
+ return m_element->pixelSnappedBoundingBox();
}
/*!
@@ -750,16 +751,16 @@ QVariant QWebElement::evaluateJavaScript(const QString& scriptSource)
if (!setupScriptContext(m_element, thisValue, state, scriptController))
return QVariant();
- JSC::ScopeChainNode* scopeChain = state->dynamicGlobalObject()->globalScopeChain();
- JSC::UString script(reinterpret_cast_ptr<const UChar*>(scriptSource.data()), scriptSource.length());
+ String script(reinterpret_cast_ptr<const UChar*>(scriptSource.data()), scriptSource.length());
JSC::JSValue evaluationException;
- JSC::JSValue evaluationResult = JSC::evaluate(state, scopeChain, JSC::makeSource(script), thisValue, &evaluationException);
+ JSC::JSValue evaluationResult = JSC::evaluate(state, JSC::makeSource(script), thisValue, &evaluationException);
if (evaluationException)
return QVariant();
int distance = 0;
- return JSC::Bindings::convertValueToQVariant(state, evaluationResult, QMetaType::Void, &distance);
+ JSValueRef* ignoredException = 0;
+ return JSC::Bindings::convertValueToQVariant(toRef(state), toRef(state, evaluationResult), QMetaType::Void, &distance, ignoredException);
}
/*!
@@ -1453,7 +1454,7 @@ void QWebElement::render(QPainter* painter, const QRect& clip)
view->updateLayoutAndStyleIfNeededRecursive();
- IntRect rect = e->getPixelSnappedRect();
+ IntRect rect = e->pixelSnappedBoundingBox();
if (rect.size().isEmpty())
return;
@@ -2046,7 +2047,7 @@ Element* QtWebElementRuntime::get(const QWebElement& element)
return element.m_element;
}
-static QVariant convertJSValueToWebElementVariant(JSC::JSObject* object, int *distance, HashSet<JSC::JSObject*>* visitedObjects)
+static QVariant convertJSValueToWebElementVariant(JSC::JSObject* object, int *distance, HashSet<JSObjectRef>* visitedObjects)
{
Element* element = 0;
QVariant ret;
@@ -2055,7 +2056,7 @@ static QVariant convertJSValueToWebElementVariant(JSC::JSObject* object, int *di
*distance = 0;
// Allow other objects to reach this one. This won't cause our algorithm to
// loop since when we find an Element we do not recurse.
- visitedObjects->remove(object);
+ visitedObjects->remove(toRef(object));
} else if (object && object->inherits(&JSDocument::s_info)) {
// To support TestRunnerQt::nodesFromRect(), used in DRT, we do an implicit
// conversion from 'document' to the QWebElement representing the 'document.documentElement'.