summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit/qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog80
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp12
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri1
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp28
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp3
8 files changed, 130 insertions, 2 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
index cc7b11c..4fe784f 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
@@ -959,6 +959,10 @@ void QWebFrame::load(const QNetworkRequest &req,
The \a html is loaded immediately; external objects are loaded asynchronously.
+ If a script in the \a html runs longer than the default script timeout (currently 10 seconds),
+ for example due to being blocked by a modal JavaScript alert dialog, this method will return
+ as soon as possible after the timeout and any subsequent \a html will be loaded asynchronously.
+
When using this method WebKit assumes that external resources such as JavaScript programs or style
sheets are encoded in UTF-8 unless otherwise specified. For example, the encoding of an external
script can be specified through the charset attribute of the HTML script tag. It is also possible
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 63d5568..b2bff0c 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,83 @@
+2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
+
+ This ensures that long-running JavaScript (for example due to a modal alert() dialog),
+ will not trigger a deferred load after only 500ms (the default tokenizer delay) while
+ still giving a reasonable timeout (10 seconds) to prevent deadlock.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29381
+
+ * Api/qwebframe.cpp: Document the behaviour
+ * WebCoreSupport/FrameLoaderClientQt.cpp: set the custom tokenizer delay for substitute loads
+ * tests/qwebframe/tst_qwebframe.cpp: Add test
+
+2010-07-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Prevent assertion/duplicate loads for non-deferred subtitute-data loads
+
+ https://bugs.webkit.org/show_bug.cgi?id=30879
+
+ MainResourceLoader uses the member m_initialRequest to store requests for future
+ deferred loads. When doing the actual load in handleDataLoadNow(), we therefore
+ have to clear this request so that subsequent entries into the loader will not
+ start yet another load.
+
+ This can happen as a result of a PageGroupLoadDeferrer going out of scope when
+ returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false),
+ but only in the case of using both substitute-data and non-deferred main resource
+ load together. That's why two new DRT functions were added:
+
+ * queueLoadHTMLString()
+ * setDeferMainResourceLoad()
+
+ The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac
+ and Win the hook uses new SPI in WebDataSource. For Qt a new static member was
+ added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::setDeferMainResourceDataLoad):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createDocumentLoader):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
+2010-07-23 David Boddie <dboddie@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ Doc: Fixed incorrect QML property type.
+
+ * declarative/qdeclarativewebview.cpp:
+
+2010-07-23 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] Build fix for Qt apps
+
+ Add webkit to QT_CONFIG. qconfig.pri will read qt_webkit_version.pri and
+ that's how it will pick up webkit in QT_CONFIG.
+
+ * qt_webkit_version.pri:
+
+2010-07-09 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Skip test that never terminates on maemo5
+
+ Due to https://bugs.webkit.org/show_bug.cgi?id=38538
+ the tst_QWebPage::infiniteLoopJS() autotest never terminates.
+ Skip the test so that the test case may run to completion.
+
+ Patch by Dominik Holland <dominik.holland@nokia.com>
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::infiniteLoopJS):
+
2010-07-09 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed trivial Symbian build fix.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 686bfcc..713fa39 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -38,6 +38,7 @@
#include "FrameTree.h"
#include "FrameView.h"
#include "DocumentLoader.h"
+#include "JSDOMWindowBase.h"
#include "MIMETypeRegistry.h"
#include "ResourceResponse.h"
#include "Page.h"
@@ -141,6 +142,8 @@ static QString drtDescriptionSuitableForTestResult(const WebCore::ResourceRespon
namespace WebCore
{
+bool FrameLoaderClientQt::deferMainResourceDataLoad = true;
+
FrameLoaderClientQt::FrameLoaderClientQt()
: m_frame(0)
, m_webFrame(0)
@@ -812,8 +815,15 @@ bool FrameLoaderClientQt::shouldFallBack(const WebCore::ResourceError&)
WTF::PassRefPtr<WebCore::DocumentLoader> FrameLoaderClientQt::createDocumentLoader(const WebCore::ResourceRequest& request, const SubstituteData& substituteData)
{
RefPtr<DocumentLoader> loader = DocumentLoader::create(request, substituteData);
- if (substituteData.isValid())
+ if (!deferMainResourceDataLoad || substituteData.isValid()) {
loader->setDeferMainResourceDataLoad(false);
+ // Use the default timeout interval for JS as the HTML tokenizer delay. This ensures
+ // that long-running JavaScript will still allow setHtml() to be synchronous, while
+ // still giving a reasonable timeout to prevent deadlock.
+ double delay = JSDOMWindowBase::commonJSGlobalData()->timeoutChecker.timeoutInterval() / 1000.0f;
+ m_frame->page()->setCustomHTMLTokenizerTimeDelay(delay);
+ } else
+ m_frame->page()->setCustomHTMLTokenizerTimeDelay(-1);
return loader.release();
}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index adeb31c..515cf9a 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -211,6 +211,8 @@ namespace WebCore {
QString chooseFile(const QString& oldFile);
+ static bool deferMainResourceDataLoad;
+
private:
Frame *m_frame;
QWebFrame *m_webFrame;
diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
index 0342c9f..9dcba60 100644
--- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
@@ -612,7 +612,7 @@ QAction* QDeclarativeWebView::stopAction() const
#endif // QT_NO_ACTION
/*!
- \qmlproperty real WebView::title
+ \qmlproperty string WebView::title
This property holds the title of the web page currently viewed
By default, this property contains an empty string.
diff --git a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
index ffd192c..d8cf06c 100644
--- a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
+++ b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
@@ -2,3 +2,4 @@ QT_WEBKIT_VERSION = 4.7.0
QT_WEBKIT_MAJOR_VERSION = 4
QT_WEBKIT_MINOR_VERSION = 7
QT_WEBKIT_PATCH_VERSION = 0
+QT_CONFIG *= webkit
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 76fdba3..e584f97 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -598,6 +598,7 @@ private slots:
void setHtml();
void setHtmlWithResource();
void setHtmlWithBaseURL();
+ void setHtmlWithJSAlert();
void ipv6HostEncoding();
void metaData();
#if !defined(Q_WS_MAEMO_5)
@@ -2485,6 +2486,33 @@ void tst_QWebFrame::setHtmlWithBaseURL()
QCOMPARE(m_view->page()->history()->count(), 0);
}
+class MyPage : public QWebPage
+{
+public:
+ MyPage() : QWebPage(), alerts(0) {}
+ int alerts;
+
+protected:
+ virtual void javaScriptAlert(QWebFrame*, const QString& msg)
+ {
+ alerts++;
+ QCOMPARE(msg, QString("foo"));
+ // Should not be enough to trigger deferred loading, since we've upped the HTML
+ // tokenizer delay in the Qt frameloader. See HTMLTokenizer::continueProcessing()
+ QTest::qWait(1000);
+ }
+};
+
+void tst_QWebFrame::setHtmlWithJSAlert()
+{
+ QString html("<html><head></head><body><script>alert('foo');</script><p>hello world</p></body></html>");
+ MyPage page;
+ m_view->setPage(&page);
+ page.mainFrame()->setHtml(html);
+ QCOMPARE(page.alerts, 1);
+ QCOMPARE(m_view->page()->mainFrame()->toHtml(), html);
+}
+
class TestNetworkManager : public QNetworkAccessManager
{
public:
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 0f2ca22..b7ffb8a 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -219,6 +219,9 @@ public slots:
void tst_QWebPage::infiniteLoopJS()
{
+#ifdef Q_WS_MAEMO_5
+ QSKIP("Test never terminates on Maemo 5 : https://bugs.webkit.org/show_bug.cgi?id=38538", SkipAll);
+#endif
JSTestPage* newPage = new JSTestPage(m_view);
m_view->setPage(newPage);
m_view->setHtml(QString("<html><bodytest</body></html>"), QUrl());