summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-30 16:45:23 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-30 16:45:23 (GMT)
commit22af29dacc579e139430d8a921249dbbec83e155 (patch)
tree87341e60dc04b3bac0908aba7deb27c0a0313b06
parent8b713b39082226665563fa72ac2f9cbe15bad74e (diff)
parent8a3eee2e2717f2f6ab3ee3223bf798450b9ef39c (diff)
downloadQt-22af29dacc579e139430d8a921249dbbec83e155.zip
Qt-22af29dacc579e139430d8a921249dbbec83e155.tar.gz
Qt-22af29dacc579e139430d8a921249dbbec83e155.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-webkit into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-webkit: Updated WebKit to 531b0d7cd2af830f0d17b83b6e4a489794481539
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog33
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.cpp33
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.h17
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp4
-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
10 files changed, 202 insertions, 11 deletions
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index a8729b7..49b1cbe 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-531b0d7cd2af830f0d17b83b6e4a489794481539
+c58dc2f491a824ac56e31c440fcf7fe16dab09c4
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 53687cf..1db0c55 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from
and has the sha1 checksum
- eb07c6f9bd50d0d74e9ac19ade4a2fbd5cece7c7
+ 531b0d7cd2af830f0d17b83b6e4a489794481539
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index e5ae24f..daf10fa 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,36 @@
+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.
+
+ * platform/graphics/TiledBackingStore.cpp:
+ (WebCore::TiledBackingStore::TiledBackingStore):
+ (WebCore::TiledBackingStore::setTileSize):
+ (WebCore::TiledBackingStore::setTileCreationDelay):
+ (WebCore::TiledBackingStore::setKeepAndCoverAreaMultipliers):
+ (WebCore::TiledBackingStore::createTiles):
+ * platform/graphics/TiledBackingStore.h:
+ (WebCore::TiledBackingStore::tileSize):
+ (WebCore::TiledBackingStore::tileCreationDelay):
+ (WebCore::TiledBackingStore::getKeepAndCoverAreaMultipliers):
+
+2010-05-28 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] REGRESSION(r59837): Incorrect clipping of TransparencyLayers
+ https://bugs.webkit.org/show_bug.cgi?id=39784
+
+ Move coordinate transformation from TransparencyLayer to clipToImageBuffer()
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::TransparencyLayer::TransparencyLayer):
+ (WebCore::GraphicsContext::clipToImageBuffer):
+
2010-05-13 Antti Koivisto <koivisto@iki.fi>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.cpp
index 0250061..1d6f237 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.cpp
@@ -35,6 +35,9 @@ TiledBackingStore::TiledBackingStore(TiledBackingStoreClient* client)
, m_tileBufferUpdateTimer(new TileTimer(this, &TiledBackingStore::tileBufferUpdateTimerFired))
, m_tileCreationTimer(new TileTimer(this, &TiledBackingStore::tileCreationTimerFired))
, m_tileSize(defaultTileWidth, defaultTileHeight)
+ , m_tileCreationDelay(0.01)
+ , m_keepAreaMultiplier(2.f, 3.5f)
+ , m_coverAreaMultiplier(1.5f, 2.5f)
, m_contentsScale(1.f)
, m_pendingScale(0)
, m_contentsFrozen(false)
@@ -46,6 +49,25 @@ TiledBackingStore::~TiledBackingStore()
delete m_tileBufferUpdateTimer;
delete m_tileCreationTimer;
}
+
+void TiledBackingStore::setTileSize(const IntSize& size)
+{
+ m_tileSize = size;
+ m_tiles.clear();
+ startTileCreationTimer();
+}
+
+void TiledBackingStore::setTileCreationDelay(double delay)
+{
+ m_tileCreationDelay = delay;
+}
+
+void TiledBackingStore::setKeepAndCoverAreaMultipliers(const FloatSize& keepMultiplier, const FloatSize& coverMultiplier)
+{
+ m_keepAreaMultiplier = keepMultiplier;
+ m_coverAreaMultiplier = coverMultiplier;
+ startTileCreationTimer();
+}
void TiledBackingStore::invalidate(const IntRect& contentsDirtyRect)
{
@@ -188,17 +210,16 @@ void TiledBackingStore::createTiles()
// Remove tiles that extend outside the current contents rect.
dropOverhangingTiles();
- // FIXME: Make configurable/adapt to memory.
IntRect keepRect = visibleRect;
- keepRect.inflateX(visibleRect.width());
- keepRect.inflateY(3 * visibleRect.height());
+ keepRect.inflateX(visibleRect.width() * (m_keepAreaMultiplier.width() - 1.f));
+ keepRect.inflateY(visibleRect.height() * (m_keepAreaMultiplier.height() - 1.f));
keepRect.intersect(contentsRect());
dropTilesOutsideRect(keepRect);
IntRect coverRect = visibleRect;
- coverRect.inflateX(visibleRect.width() / 2);
- coverRect.inflateY(2 * visibleRect.height());
+ coverRect.inflateX(visibleRect.width() * (m_coverAreaMultiplier.width() - 1.f));
+ coverRect.inflateY(visibleRect.height() * (m_coverAreaMultiplier.height() - 1.f));
coverRect.intersect(contentsRect());
// Search for the tile position closest to the viewport center that does not yet contain a tile.
@@ -240,7 +261,7 @@ void TiledBackingStore::createTiles()
// Keep creating tiles until the whole coverRect is covered.
if (requiredTileCount)
- m_tileCreationTimer->startOneShot(0);
+ m_tileCreationTimer->startOneShot(m_tileCreationDelay);
}
void TiledBackingStore::dropOverhangingTiles()
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.h b/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.h
index d12f191..58477db 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/TiledBackingStore.h
@@ -51,6 +51,20 @@ public:
void invalidate(const IntRect& dirtyRect);
void paint(GraphicsContext*, const IntRect&);
+
+ IntSize tileSize() { return m_tileSize; }
+ void setTileSize(const IntSize&);
+
+ double tileCreationDelay() const { return m_tileCreationDelay; }
+ void setTileCreationDelay(double delay);
+
+ // Tiled are dropped outside the keep area, and created for cover area. The values a relative to the viewport size.
+ void getKeepAndCoverAreaMultipliers(FloatSize& keepMultiplier, FloatSize& coverMultiplier)
+ {
+ keepMultiplier = m_keepAreaMultiplier;
+ coverMultiplier = m_coverAreaMultiplier;
+ }
+ void setKeepAndCoverAreaMultipliers(const FloatSize& keepMultiplier, const FloatSize& coverMultiplier);
private:
void startTileBufferUpdateTimer();
@@ -94,6 +108,9 @@ private:
TileTimer* m_tileCreationTimer;
IntSize m_tileSize;
+ double m_tileCreationDelay;
+ FloatSize m_keepAreaMultiplier;
+ FloatSize m_coverAreaMultiplier;
IntRect m_previousVisibleRect;
float m_contentsScale;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 69121c8..bdb810a 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -173,7 +173,7 @@ struct TransparencyLayer : FastAllocBase {
, alphaMask(alphaMask)
, saveCounter(1) // see the comment for saveCounter
{
- offset = p->transform().mapRect(rect).topLeft();
+ offset = rect.topLeft();
pixmap.fill(Qt::transparent);
painter.begin(&pixmap);
painter.setRenderHint(QPainter::Antialiasing, p->testRenderHint(QPainter::Antialiasing));
@@ -1125,7 +1125,7 @@ void GraphicsContext::clipToImageBuffer(const FloatRect& floatRect, const ImageB
if (alphaMask.width() != rect.width() || alphaMask.height() != rect.height())
alphaMask = alphaMask.scaled(rect.width(), rect.height());
- m_data->layers.push(new TransparencyLayer(m_data->p(), rect, 1.0, alphaMask));
+ m_data->layers.push(new TransparencyLayer(m_data->p(), m_data->p()->transform().mapRect(rect), 1.0, alphaMask));
}
void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect,
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"