diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2010-05-11 10:26:30 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2010-05-11 10:26:30 (GMT) |
commit | 3eec5af3f07fdab9084f40d6955411a667b433c4 (patch) | |
tree | 3ab9f1f7b2d080053b9e9376e2d13016d5e6421d /src/3rdparty/webkit/WebKit/qt/Api | |
parent | b4c589868f278aa9a58ab9afa727dbf0a9442e22 (diff) | |
download | Qt-3eec5af3f07fdab9084f40d6955411a667b433c4.zip Qt-3eec5af3f07fdab9084f40d6955411a667b433c4.tar.gz Qt-3eec5af3f07fdab9084f40d6955411a667b433c4.tar.bz2 |
Updated WebKit to b4aa5e1ddc41edab895132aba3cc66d9d7129444
Integrated changes:
|| <https://webkit.org/b/38747> || mingw-w64 and JIT support ||
|| <https://webkit.org/b/38119> || [Qt] QWebPage viewMode property ||
|| <https://webkit.org/b/37097> || [Qt] Fix infinite redirection loop in QNetworkReplyHandler ||
|| <https://webkit.org/b/38668> || [Qt] Enable YARR_JIT for X86 Mac for QtWebKit ||
|| <https://webkit.org/b/38834> || [Qt] Adapt DNS pre-fetching to Qt DNS cache code ||
|| <https://webkit.org/b/38574> || [Qt] Crash in QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate when animation were used ||
|| <https://webkit.org/b/31407> || [PATCH] [Qt] Compilation with Plugins disabled is broken ||
|| <https://webkit.org/b/38514> || Crash in handleTouchEvent: using dangling node ptrs in hashmap ||
|| <https://webkit.org/b/38646> || Potential crash in EventHandler::handleTouchEvent ||
|| <https://webkit.org/b/38488> || Spatial Navigation: create a getter for the "fudgeFactor" ||
|| <https://webkit.org/b/38523> || [Qt] QtWebKit has render bugs on Google Maps markers ||
|| <https://webkit.org/b/37276> || LayoutTests/fast/canvas/pointInPath.html passed, actually it failed ||
|| <https://webkit.org/b/37023> || [Qt] Expose HTMLTokenizer yielding parameters ||
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/Api')
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp | 22 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp | 32 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h | 2 |
3 files changed, 35 insertions, 21 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp index 0c13e43..75a23d9 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qgraphicswebview.cpp @@ -82,7 +82,6 @@ public: , page(0) , resizesToContents(false) #if USE(ACCELERATED_COMPOSITING) - , rootGraphicsLayer(0) , shouldSync(false) #endif { @@ -158,7 +157,7 @@ public: enum { RootGraphicsLayerZValue, OverlayZValue }; #if USE(ACCELERATED_COMPOSITING) - QGraphicsItem* rootGraphicsLayer; + QWeakPointer<QGraphicsObject> rootGraphicsLayer; // we need to sync the layers if we get a special call from the WebCore // compositor telling us to do so. We'll get that call from ChromeClientQt bool shouldSync; @@ -171,12 +170,11 @@ public: QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate() { #if USE(ACCELERATED_COMPOSITING) - if (rootGraphicsLayer) { - // we don't need to delete the root graphics layer - // The lifecycle is managed in GraphicsLayerQt.cpp - rootGraphicsLayer->setParentItem(0); - q->scene()->removeItem(rootGraphicsLayer); - } + if (!rootGraphicsLayer) + return; + // we don't need to delete the root graphics layer. The lifecycle is managed in GraphicsLayerQt.cpp. + rootGraphicsLayer.data()->setParentItem(0); + q->scene()->removeItem(rootGraphicsLayer.data()); #endif } @@ -204,12 +202,12 @@ void QGraphicsWebViewPrivate::createOrDeleteOverlay() void QGraphicsWebViewPrivate::setRootGraphicsLayer(QGraphicsItem* layer) { if (rootGraphicsLayer) { - rootGraphicsLayer->setParentItem(0); - q->scene()->removeItem(rootGraphicsLayer); + rootGraphicsLayer.data()->setParentItem(0); + q->scene()->removeItem(rootGraphicsLayer.data()); QWebFramePrivate::core(q->page()->mainFrame())->view()->syncCompositingStateRecursive(); } - rootGraphicsLayer = layer; + rootGraphicsLayer = layer ? layer->toGraphicsObject() : 0; if (layer) { layer->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true); @@ -231,7 +229,7 @@ void QGraphicsWebViewPrivate::updateCompositingScrollPosition() { if (rootGraphicsLayer && q->page() && q->page()->mainFrame()) { const QPoint scrollPosition = q->page()->mainFrame()->scrollPosition(); - rootGraphicsLayer->setPos(-scrollPosition); + rootGraphicsLayer.data()->setPos(-scrollPosition); } } #endif diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp index b8b50b7..e9ebce5 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp @@ -119,15 +119,6 @@ using namespace WebCore; -void QWEBKIT_EXPORT qt_wrt_setViewMode(QWebPage* page, const QString& mode) -{ - QWebPagePrivate::priv(page)->viewMode = mode; - WebCore::Frame* frame = QWebFramePrivate::core(page->mainFrame()); - WebCore::FrameView* view = frame->view(); - frame->document()->updateStyleSelector(); - view->forceLayout(); -} - void QWEBKIT_EXPORT qt_drt_overwritePluginDirectories() { PluginDatabase* db = PluginDatabase::installedPlugins(/* populate */ false); @@ -1361,6 +1352,26 @@ void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev) ev->accept(); } +void QWebPagePrivate::dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent* event) +{ + if (event->propertyName() == "_q_viewMode") { + QString mode = q->property("_q_viewMode").toString(); + if (mode != viewMode) { + viewMode = mode; + WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame()); + WebCore::FrameView* view = frame->view(); + frame->document()->updateStyleSelector(); + view->forceLayout(); + } + } else if (event->propertyName() == "_q_HTMLTokenizerChunkSize") { + int chunkSize = q->property("_q_HTMLTokenizerChunkSize").toInt(); + q->handle()->page->setCustomHTMLTokenizerChunkSize(chunkSize); + } else if (event->propertyName() == "_q_HTMLTokenizerTimeDelay") { + double timeDelay = q->property("_q_HTMLTokenizerTimeDelay").toDouble(); + q->handle()->page->setCustomHTMLTokenizerTimeDelay(timeDelay); + } +} + void QWebPagePrivate::shortcutOverrideEvent(QKeyEvent* event) { WebCore::Frame* frame = page->focusController()->focusedOrMainFrame(); @@ -2708,6 +2719,9 @@ bool QWebPage::event(QEvent *ev) d->touchEvent(static_cast<QTouchEvent*>(ev)); break; #endif + case QEvent::DynamicPropertyChange: + d->dynamicPropertyChangeEvent(static_cast<QDynamicPropertyChangeEvent*>(ev)); + break; default: return QObject::event(ev); } diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h index 0712d0c..5350cd9 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage_p.h @@ -112,6 +112,8 @@ public: void inputMethodEvent(QInputMethodEvent*); + void dynamicPropertyChangeEvent(QDynamicPropertyChangeEvent*); + void shortcutOverrideEvent(QKeyEvent*); void leaveEvent(QEvent*); void handleClipboard(QEvent*, Qt::MouseButton); |