[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
noam.rosenthal at nokia.com
noam.rosenthal at nokia.com
Mon Feb 21 00:29:37 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 3f7a99db2efd1692d89018aa7fde06a9852c5933
Author: noam.rosenthal at nokia.com <noam.rosenthal at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 1 04:34:42 2011 +0000
2011-01-31 No'am Rosenthal <noam.rosenthal at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] QWebElements example from QtWebKit Bridge documentation does not work at all
https://bugs.webkit.org/show_bug.cgi?id=46748
This problem disappears when we register QWebElement using qRegisterMetaType, which we now do in QtInstance.
Added a regression test to tst_QWebFrame.
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtInstance::QtInstance):
2011-01-31 No'am Rosenthal <noam.rosenthal at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
[Qt] QWebElements example from QtWebKit Bridge documentation does not work at all
https://bugs.webkit.org/show_bug.cgi?id=46748
Problem was that we need to register QWebElement's variant-type to Qt's meta type system at some point.
This wasn't caught by previous tests inside tst_QWebFrame because it only appears when there's also a QWebElement property.
Added a regression test to tst_QWebFrame.
* tests/qwebframe/tst_qwebframe.cpp:
(MyWebElementSlotOnlyObject::doSomethingWithWebElement):
(MyWebElementSlotOnlyObject::tagName):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index f68cd2b..b1a7c2f 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-31 No'am Rosenthal <noam.rosenthal at nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QWebElements example from QtWebKit Bridge documentation does not work at all
+ https://bugs.webkit.org/show_bug.cgi?id=46748
+
+ This problem disappears when we register QWebElement using qRegisterMetaType, which we now do in QtInstance.
+ Added a regression test to tst_QWebFrame.
+
+ * bridge/qt/qt_instance.cpp:
+ (JSC::Bindings::QtInstance::QtInstance):
+
2011-01-27 MORITA Hajime <morrita at google.com>
Reviewed by Dimitri Glazkov.
diff --git a/Source/WebCore/bridge/qt/qt_instance.cpp b/Source/WebCore/bridge/qt/qt_instance.cpp
index dd454c3..b4d2117 100644
--- a/Source/WebCore/bridge/qt/qt_instance.cpp
+++ b/Source/WebCore/bridge/qt/qt_instance.cpp
@@ -34,6 +34,7 @@
#include <qhash.h>
#include <qmetaobject.h>
#include <qmetatype.h>
+#include <qwebelement.h>
namespace JSC {
namespace Bindings {
@@ -84,6 +85,8 @@ QtInstance::QtInstance(QObject* o, PassRefPtr<RootObject> rootObject, QScriptEng
, m_hashkey(o)
, m_ownership(ownership)
{
+ // This is a good place to register Qt metatypes that are in the QtWebKit module, as this is class will initialize if we have a QObject bridge.
+ qRegisterMetaType<QWebElement>();
}
QtInstance::~QtInstance()
diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog
index 0266650..a80eef1 100644
--- a/Source/WebKit/qt/ChangeLog
+++ b/Source/WebKit/qt/ChangeLog
@@ -1,3 +1,18 @@
+2011-01-31 No'am Rosenthal <noam.rosenthal at nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QWebElements example from QtWebKit Bridge documentation does not work at all
+ https://bugs.webkit.org/show_bug.cgi?id=46748
+
+ Problem was that we need to register QWebElement's variant-type to Qt's meta type system at some point.
+ This wasn't caught by previous tests inside tst_QWebFrame because it only appears when there's also a QWebElement property.
+ Added a regression test to tst_QWebFrame.
+
+ * tests/qwebframe/tst_qwebframe.cpp:
+ (MyWebElementSlotOnlyObject::doSomethingWithWebElement):
+ (MyWebElementSlotOnlyObject::tagName):
+
2011-01-31 Srikumar Bonda <srikumar.b at gmail.com>
Reviewed by Andreas Kling.
diff --git a/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 6b0b58d..e40a9a9 100644
--- a/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -514,6 +514,24 @@ private:
QVariantList m_actuals;
};
+class MyWebElementSlotOnlyObject : public QObject {
+ Q_OBJECT
+ Q_PROPERTY(QString tagName READ tagName)
+public slots:
+ void doSomethingWithWebElement(const QWebElement& element)
+ {
+ m_tagName = element.tagName();
+ }
+
+public:
+ QString tagName() const
+ {
+ return m_tagName;
+ }
+private:
+ QString m_tagName;
+};
+
class MyOtherQObject : public MyQObject
{
public:
@@ -584,6 +602,7 @@ private slots:
void findChild();
void findChildren();
void overloadedSlots();
+ void webElementSlotOnly();
void enumerate_data();
void enumerate();
void objectDeleted();
@@ -3257,5 +3276,14 @@ void tst_QWebFrame::setCacheLoadControlAttribute()
QCOMPARE(manager->lastCacheLoad(), QNetworkRequest::PreferNetwork);
}
+void tst_QWebFrame::webElementSlotOnly()
+{
+ MyWebElementSlotOnlyObject object;
+ m_page->mainFrame()->setHtml("<html><head><body></body></html>");
+ m_page->mainFrame()->addToJavaScriptWindowObject("myWebElementSlotObject", &object);
+ evalJS("myWebElementSlotObject.doSomethingWithWebElement(document.body)");
+ QCOMPARE(evalJS("myWebElementSlotObject.tagName"), QString("BODY"));
+}
+
QTEST_MAIN(tst_QWebFrame)
#include "tst_qwebframe.moc"
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list