summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-05-30 16:39:10 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-05-30 16:39:10 (GMT)
commit8a3eee2e2717f2f6ab3ee3223bf798450b9ef39c (patch)
tree87341e60dc04b3bac0908aba7deb27c0a0313b06 /src/3rdparty/webkit/WebKit
parent8b713b39082226665563fa72ac2f9cbe15bad74e (diff)
downloadQt-8a3eee2e2717f2f6ab3ee3223bf798450b9ef39c.zip
Qt-8a3eee2e2717f2f6ab3ee3223bf798450b9ef39c.tar.gz
Qt-8a3eee2e2717f2f6ab3ee3223bf798450b9ef39c.tar.bz2
Updated WebKit to 531b0d7cd2af830f0d17b83b6e4a489794481539
Fixes integrated: || <https://webkit.org/b/39784> || [Qt] REGRESSION(r59837): Incorrect clipping of TransparencyLayers || || <https://webkit.org/b/39874> || [Qt] Make tiled backing store more configurable || || <https://webkit.org/b/29899> || [Qt] Add a way to stop delayed redirect requests ||
Diffstat (limited to 'src/3rdparty/webkit/WebKit')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp56
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog36
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp28
4 files changed, 121 insertions, 1 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index b7182b4..a61ca2e 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -51,6 +51,7 @@
#include "EditorClientQt.h"
#include "SecurityOrigin.h"
#include "Settings.h"
+#include "TiledBackingStore.h"
#include "Page.h"
#include "Pasteboard.h"
#include "FrameLoader.h"
@@ -1386,7 +1387,42 @@ void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* ev
} else if (event->propertyName() == "_q_HTMLTokenizerTimeDelay") {
double timeDelay = q->property("_q_HTMLTokenizerTimeDelay").toDouble();
q->handle()->page->setCustomHTMLTokenizerTimeDelay(timeDelay);
+ }
+#if ENABLE(TILED_BACKING_STORE)
+ else if (event->propertyName() == "_q_TiledBackingStoreTileSize") {
+ WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
+ if (!frame->tiledBackingStore())
+ return;
+ QSize tileSize = q->property("_q_TiledBackingStoreTileSize").toSize();
+ frame->tiledBackingStore()->setTileSize(tileSize);
+ } else if (event->propertyName() == "_q_TiledBackingStoreTileCreationDelay") {
+ WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
+ if (!frame->tiledBackingStore())
+ return;
+ int tileCreationDelay = q->property("_q_TiledBackingStoreTileCreationDelay").toInt();
+ frame->tiledBackingStore()->setTileCreationDelay(static_cast<double>(tileCreationDelay) / 1000.);
+ } else if (event->propertyName() == "_q_TiledBackingStoreKeepAreaMultiplier") {
+ WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
+ if (!frame->tiledBackingStore())
+ return;
+ FloatSize keepMultiplier;
+ FloatSize coverMultiplier;
+ frame->tiledBackingStore()->getKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier);
+ QSizeF qSize = q->property("_q_TiledBackingStoreKeepAreaMultiplier").toSizeF();
+ keepMultiplier = FloatSize(qSize.width(), qSize.height());
+ frame->tiledBackingStore()->setKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier);
+ } else if (event->propertyName() == "_q_TiledBackingStoreCoverAreaMultiplier") {
+ WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame());
+ if (!frame->tiledBackingStore())
+ return;
+ FloatSize keepMultiplier;
+ FloatSize coverMultiplier;
+ frame->tiledBackingStore()->getKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier);
+ QSizeF qSize = q->property("_q_TiledBackingStoreCoverAreaMultiplier").toSizeF();
+ coverMultiplier = FloatSize(qSize.width(), qSize.height());
+ frame->tiledBackingStore()->setKeepAndCoverAreaMultipliers(keepMultiplier, coverMultiplier);
}
+#endif
}
void QWebPagePrivate::shortcutOverrideEvent(QKeyEvent* event)
@@ -1709,6 +1745,7 @@ InspectorController* QWebPagePrivate::inspectorController()
\value Back Navigate back in the history of navigated links.
\value Forward Navigate forward in the history of navigated links.
\value Stop Stop loading the current page.
+ \value StopScheduledPageRefresh Stop all pending page refresh/redirect requests.
\value Reload Reload the current page.
\value ReloadAndBypassCache Reload the current page, but do not use any local cache. (Added in Qt 4.6)
\value Cut Cut the content currently selected into the clipboard.
@@ -2114,6 +2151,15 @@ static void openNewWindow(const QUrl& url, WebCore::Frame* frame)
}
}
+static void collectChildFrames(QWebFrame* frame, QList<QWebFrame*>& list)
+{
+ list << frame->childFrames();
+ QListIterator<QWebFrame*> it(frame->childFrames());
+ while (it.hasNext()) {
+ collectChildFrames(it.next(), list);
+ }
+}
+
/*!
This function can be called to trigger the specified \a action.
It is also called by QtWebKit if the user triggers the action, for example
@@ -2210,6 +2256,16 @@ void QWebPage::triggerAction(WebAction action, bool)
#endif
break;
}
+ case StopScheduledPageRefresh: {
+ QWebFrame* topFrame = mainFrame();
+ topFrame->d->frame->redirectScheduler()->cancel();
+ QList<QWebFrame*> childFrames;
+ collectChildFrames(topFrame, childFrames);
+ QListIterator<QWebFrame*> it(childFrames);
+ while (it.hasNext())
+ it.next()->d->frame->redirectScheduler()->cancel();
+ break;
+ }
default:
command = QWebPagePrivate::editorCommandForWebActions(action);
break;
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
index 1adde06..34f675b 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.h
@@ -169,6 +169,8 @@ public:
AlignLeft,
AlignRight,
+ StopScheduledPageRefresh,
+
WebActionCount
};
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 79c1ef3..cc2d39a 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,39 @@
+2010-05-28 Antti Koivisto <koivisto@iki.fi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add a missing #if ENABLE(), some null checking.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dynamicPropertyChangeEvent):
+
+2010-05-28 Antti Koivisto <koivisto@iki.fi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ https://bugs.webkit.org/show_bug.cgi?id=39874
+ [Qt] Make tiled backing store more configurable
+
+ Make tile size, tile creation delay and tiling area dynamically configurable.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::dynamicPropertyChangeEvent):
+
+2010-05-29 Dawit Alemayehu <adawit@kde.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added a WebAction to stop all pending page refresh/redirect
+ requests set through the <meta http-equiv="refresh"...> tag.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29899
+
+ * Api/qwebpage.cpp:
+ (QWebPage::triggerAction):
+ * Api/qwebpage.h:
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::testStopScheduledPageRefresh):
+
2010-04-20 Robert Hogan <robert@webkit.org>
Reviewed by Simon Hausmann.
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 19c6bde..27f4b27 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -121,7 +121,8 @@ private slots:
void originatingObjectInNetworkRequests();
void testJSPrompt();
void showModalDialog();
-
+ void testStopScheduledPageRefresh();
+
private:
QWebView* m_view;
QWebPage* m_page;
@@ -2095,5 +2096,30 @@ void tst_QWebPage::showModalDialog()
QCOMPARE(res, QString("This is a test"));
}
+void tst_QWebPage::testStopScheduledPageRefresh()
+{
+ // Without QWebPage::StopScheduledPageRefresh
+ QWebPage page1;
+ page1.setNetworkAccessManager(new TestNetworkManager(&page1));
+ page1.mainFrame()->setHtml("<html><head>"
+ "<meta http-equiv=\"refresh\"content=\"0;URL=http://qt.nokia.com/favicon.ico\">"
+ "</head><body><h1>Page redirects immediately...</h1>"
+ "</body></html>");
+ QVERIFY(::waitForSignal(&page1, SIGNAL(loadFinished(bool))));
+ QTest::qWait(500);
+ QCOMPARE(page1.mainFrame()->url().toString(), QString("http://qt.nokia.com/favicon.ico"));
+
+ // With QWebPage::StopScheduledPageRefresh
+ QWebPage page2;
+ page2.setNetworkAccessManager(new TestNetworkManager(&page2));
+ page2.mainFrame()->setHtml("<html><head>"
+ "<meta http-equiv=\"refresh\"content=\"1;URL=http://qt.nokia.com/favicon.ico\">"
+ "</head><body><h1>Page redirect test with 1 sec timeout...</h1>"
+ "</body></html>");
+ page2.triggerAction(QWebPage::StopScheduledPageRefresh);
+ QTest::qWait(1500);
+ QCOMPARE(page2.mainFrame()->url().toString(), QString("about:blank"));
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"