diff options
author | Russell Brenner <russellbrenner@google.com> | 2010-11-18 17:33:13 -0800 |
---|---|---|
committer | Russell Brenner <russellbrenner@google.com> | 2010-12-02 13:47:21 -0800 |
commit | 6b70adc33054f8aee8c54d0f460458a9df11b8a5 (patch) | |
tree | 103a13998c33944d6ab3b8318c509a037e639460 /WebKit/qt | |
parent | bdf4ebc8e70b2d221b6ee7a65660918ecb1d33aa (diff) | |
download | external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.zip external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.tar.gz external_webkit-6b70adc33054f8aee8c54d0f460458a9df11b8a5.tar.bz2 |
Merge WebKit at r72274: Initial merge by git.
Change-Id: Ie51f0b4a16da82942bd516dce59cfb79ebbe25fb
Diffstat (limited to 'WebKit/qt')
-rw-r--r-- | WebKit/qt/Api/qgraphicswebview.cpp | 1 | ||||
-rw-r--r-- | WebKit/qt/Api/qwebelement.cpp | 36 | ||||
-rw-r--r-- | WebKit/qt/Api/qwebframe.cpp | 6 | ||||
-rw-r--r-- | WebKit/qt/Api/qwebframe_p.h | 2 | ||||
-rw-r--r-- | WebKit/qt/Api/qwebpage.cpp | 27 | ||||
-rw-r--r-- | WebKit/qt/Api/qwebpage.h | 2 | ||||
-rw-r--r-- | WebKit/qt/Api/qwebscriptworld.cpp | 2 | ||||
-rw-r--r-- | WebKit/qt/ChangeLog | 172 | ||||
-rw-r--r-- | WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp | 11 | ||||
-rw-r--r-- | WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp | 23 | ||||
-rw-r--r-- | WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h | 4 | ||||
-rw-r--r-- | WebKit/qt/symbian/eabi/QtWebKitu.def | 5 | ||||
-rw-r--r-- | WebKit/qt/tests/qwebframe/tst_qwebframe.cpp | 12 |
13 files changed, 252 insertions, 51 deletions
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp index f026827..6cc2aa0 100644 --- a/WebKit/qt/Api/qgraphicswebview.cpp +++ b/WebKit/qt/Api/qgraphicswebview.cpp @@ -141,6 +141,7 @@ void QGraphicsWebViewPrivate::updateResizesToContentsForPage() q, SLOT(_q_contentsSizeChanged(const QSize&))); } page->d->page->settings()->setShouldDelegateScrolling(resizesToContents); + page->d->page->mainFrame()->view()->setPaintsEntireContents(resizesToContents); } void QGraphicsWebViewPrivate::_q_contentsSizeChanged(const QSize& size) diff --git a/WebKit/qt/Api/qwebelement.cpp b/WebKit/qt/Api/qwebelement.cpp index 8121111..8f40c0f 100644 --- a/WebKit/qt/Api/qwebelement.cpp +++ b/WebKit/qt/Api/qwebelement.cpp @@ -1092,11 +1092,11 @@ void QWebElement::prependOutside(const QWebElement &element) if (!m_element || element.isNull()) return; - if (!m_element->parent()) + if (!m_element->parentNode()) return; ExceptionCode exception = 0; - m_element->parent()->insertBefore(element.m_element, m_element, exception); + m_element->parentNode()->insertBefore(element.m_element, m_element, exception); } /*! @@ -1111,7 +1111,7 @@ void QWebElement::prependOutside(const QString &markup) if (!m_element) return; - if (!m_element->parent()) + if (!m_element->parentNode()) return; if (!m_element->isHTMLElement()) @@ -1121,7 +1121,7 @@ void QWebElement::prependOutside(const QString &markup) RefPtr<DocumentFragment> fragment = htmlElement->deprecatedCreateContextualFragment(markup); ExceptionCode exception = 0; - m_element->parent()->insertBefore(fragment, m_element, exception); + m_element->parentNode()->insertBefore(fragment, m_element, exception); } /*! @@ -1139,14 +1139,14 @@ void QWebElement::appendOutside(const QWebElement &element) if (!m_element || element.isNull()) return; - if (!m_element->parent()) + if (!m_element->parentNode()) return; ExceptionCode exception = 0; if (!m_element->nextSibling()) - m_element->parent()->appendChild(element.m_element, exception); + m_element->parentNode()->appendChild(element.m_element, exception); else - m_element->parent()->insertBefore(element.m_element, m_element->nextSibling(), exception); + m_element->parentNode()->insertBefore(element.m_element, m_element->nextSibling(), exception); } /*! @@ -1161,7 +1161,7 @@ void QWebElement::appendOutside(const QString &markup) if (!m_element) return; - if (!m_element->parent()) + if (!m_element->parentNode()) return; if (!m_element->isHTMLElement()) @@ -1172,9 +1172,9 @@ void QWebElement::appendOutside(const QString &markup) ExceptionCode exception = 0; if (!m_element->nextSibling()) - m_element->parent()->appendChild(fragment, exception); + m_element->parentNode()->appendChild(fragment, exception); else - m_element->parent()->insertBefore(fragment, m_element->nextSibling(), exception); + m_element->parentNode()->insertBefore(fragment, m_element->nextSibling(), exception); } /*! @@ -1308,7 +1308,7 @@ void QWebElement::encloseContentsWith(const QString &markup) if (!m_element) return; - if (!m_element->parent()) + if (!m_element->parentNode()) return; if (!m_element->isHTMLElement()) @@ -1360,16 +1360,16 @@ void QWebElement::encloseWith(const QWebElement &element) // wrapping it in the fragment. The reason for doing it in this order is // that once the fragment has been added to the document it is empty, so // we no longer have access to the nodes it contained. - Node* parentNode = m_element->parent(); + Node* parent = m_element->parentNode(); Node* siblingNode = m_element->nextSibling(); ExceptionCode exception = 0; insertionPoint->appendChild(m_element, exception); if (!siblingNode) - parentNode->appendChild(element.m_element, exception); + parent->appendChild(element.m_element, exception); else - parentNode->insertBefore(element.m_element, siblingNode, exception); + parent->insertBefore(element.m_element, siblingNode, exception); } /*! @@ -1383,7 +1383,7 @@ void QWebElement::encloseWith(const QString &markup) if (!m_element) return; - if (!m_element->parent()) + if (!m_element->parentNode()) return; if (!m_element->isHTMLElement()) @@ -1404,16 +1404,16 @@ void QWebElement::encloseWith(const QString &markup) // wrapping it in the fragment. The reason for doing it in this order is // that once the fragment has been added to the document it is empty, so // we no longer have access to the nodes it contained. - Node* parentNode = m_element->parent(); + Node* parent = m_element->parentNode(); Node* siblingNode = m_element->nextSibling(); ExceptionCode exception = 0; insertionPoint->appendChild(m_element, exception); if (!siblingNode) - parentNode->appendChild(fragment, exception); + parent->appendChild(fragment, exception); else - parentNode->insertBefore(fragment, siblingNode, exception); + parent->insertBefore(fragment, siblingNode, exception); } /*! diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp index 7d423d5..203bd60 100644 --- a/WebKit/qt/Api/qwebframe.cpp +++ b/WebKit/qt/Api/qwebframe.cpp @@ -1189,7 +1189,7 @@ void QWebFrame::setTextSizeMultiplier(qreal factor) */ qreal QWebFrame::textSizeMultiplier() const { - return d->zoomTextOnly ? d->frame->textZoomFactor() : d->frame->pageZoomFactor(); + return page()->settings()->testAttribute(QWebSettings::ZoomTextOnly) ? d->frame->textZoomFactor() : d->frame->pageZoomFactor(); } /*! @@ -1200,7 +1200,7 @@ qreal QWebFrame::textSizeMultiplier() const void QWebFrame::setZoomFactor(qreal factor) { - if (d->zoomTextOnly) + if (page()->settings()->testAttribute(QWebSettings::ZoomTextOnly)) d->frame->setTextZoomFactor(factor); else d->frame->setPageZoomFactor(factor); @@ -1208,7 +1208,7 @@ void QWebFrame::setZoomFactor(qreal factor) qreal QWebFrame::zoomFactor() const { - return d->zoomTextOnly ? d->frame->textZoomFactor() : d->frame->pageZoomFactor(); + return page()->settings()->testAttribute(QWebSettings::ZoomTextOnly) ? d->frame->textZoomFactor() : d->frame->pageZoomFactor(); } /*! diff --git a/WebKit/qt/Api/qwebframe_p.h b/WebKit/qt/Api/qwebframe_p.h index 7c0d235..1af1c95 100644 --- a/WebKit/qt/Api/qwebframe_p.h +++ b/WebKit/qt/Api/qwebframe_p.h @@ -80,7 +80,6 @@ public: #if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER) , rootGraphicsLayer(0) #endif - , zoomTextOnly(false) {} void init(QWebFrame* qframe, QWebFrameData* frameData); void setPage(QWebPage*); @@ -115,7 +114,6 @@ public: WebCore::TextureMapperContentLayer* rootGraphicsLayer; OwnPtr<WebCore::TextureMapper> textureMapper; #endif - bool zoomTextOnly; }; class QWebHitTestResultPrivate { diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp index a6ca65a..a29d417 100644 --- a/WebKit/qt/Api/qwebpage.cpp +++ b/WebKit/qt/Api/qwebpage.cpp @@ -1311,6 +1311,7 @@ void QWebPagePrivate::adjustPointForClicking(QGraphicsSceneMouseEvent* ev) bool QWebPagePrivate::touchEvent(QTouchEvent* event) { +#if ENABLE(TOUCH_EVENTS) WebCore::Frame* frame = QWebFramePrivate::core(mainFrame); if (!frame->view()) return false; @@ -1320,6 +1321,10 @@ bool QWebPagePrivate::touchEvent(QTouchEvent* event) // Return whether the default action was cancelled in the JS event handler return frame->eventHandler()->handleTouchEvent(PlatformTouchEvent(event)); +#else + event->ignore(); + return false; +#endif } /*! @@ -2118,7 +2123,7 @@ void QWebPage::setUserPermission(QWebFrame* frame, PermissionDomain domain, Perm case NotificationsPermissionDomain: #if ENABLE(NOTIFICATIONS) if (policy == PermissionGranted) - NotificationPresenterClientQt::notificationPresenter()->allowNotificationForFrame(frame); + NotificationPresenterClientQt::notificationPresenter()->allowNotificationForFrame(frame->d->frame); #endif break; case GeolocationPermissionDomain: @@ -2535,6 +2540,26 @@ void QWebPage::setPreferredContentsSize(const QSize& size) const view->layout(); } +/* + This function is to be called after any (animated) scroll/pan has ended, in the case the application handles the + scrolling/panning of the web contents. This is commonly used in combination with tiling where is it common for + the application to pan the actual view, which then resizes itself to the size of the contents. + + \note Calling this function makes WebKit stop trying to calculate the visibleContentRect. To turn that on + again, call this method with an empty rect. + + \sa QGraphicsWebView::resizesToContents, QWebSettings::TiledBackingStoreEnabled +*/ +void QWebPage::setActualVisibleContentRect(const QRect& rect) const +{ + QWebFrame* frame = mainFrame(); + if (!frame->d->frame || !frame->d->frame->view()) + return; + + WebCore::FrameView* view = frame->d->frame->view(); + view->setActualVisibleContentRect(rect); +} + /*! \fn bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type) diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h index 15d2432..9fa3518 100644 --- a/WebKit/qt/Api/qwebpage.h +++ b/WebKit/qt/Api/qwebpage.h @@ -280,6 +280,7 @@ public: QSize preferredContentsSize() const; void setPreferredContentsSize(const QSize &size) const; + void setActualVisibleContentRect(const QRect& rect) const; virtual bool event(QEvent*); bool focusNextPrevChild(bool next); @@ -393,7 +394,6 @@ Q_SIGNALS: void viewportChangeRequested(); void requestPermissionFromUser(QWebFrame* frame, QWebPage::PermissionDomain domain); - void checkPermissionFromUser(QWebFrame* frame, QWebPage::PermissionDomain domain, QWebPage::PermissionPolicy& policy); void cancelRequestsForPermission(QWebFrame* frame, QWebPage::PermissionDomain domain); protected: diff --git a/WebKit/qt/Api/qwebscriptworld.cpp b/WebKit/qt/Api/qwebscriptworld.cpp index 74ab651..7a44813 100644 --- a/WebKit/qt/Api/qwebscriptworld.cpp +++ b/WebKit/qt/Api/qwebscriptworld.cpp @@ -50,7 +50,7 @@ QWebScriptWorld &QWebScriptWorld::operator=(const QWebScriptWorld& other) DOMWrapperWorld* QWebScriptWorld::world() const { - return d->world.get(); + return d ? d->world.get() : 0; } /*! diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog index fdfa41f..04c7125 100644 --- a/WebKit/qt/ChangeLog +++ b/WebKit/qt/ChangeLog @@ -1,3 +1,175 @@ +2010-11-17 Dimitri Glazkov <dglazkov@chromium.org> + + Reviewed by Darin Adler. + + Converge means of querying a parent node into one way, which is Node::parentNode. + https://bugs.webkit.org/show_bug.cgi?id=49686 + + * Api/qwebelement.cpp: + (QWebElement::prependOutside): Changed to use parentNode. + (QWebElement::appendOutside): Ditto. + (QWebElement::encloseContentsWith): Ditto. + (QWebElement::encloseWith): Ditto. + +2010-11-16 Simon Hausmann <simon.hausmann@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] Remove synchronous QWebPage::checkPermissions signal + https://bugs.webkit.org/show_bug.cgi?id=46810 + + As decided in the API review, we remove this signal and replace its only use currently + with cached credentials. + + * Api/qwebpage.cpp: + (QWebPage::setUserPermission): Pass the WebCore frame instead of the QWebFrame. + * Api/qwebpage.h: + * WebCoreSupport/NotificationPresenterClientQt.cpp: + (WebCore::NotificationPresenterClientQt::checkPermission): Replaced explicit + signal emission with hash lookup of previously granted permission (or not). + (WebCore::NotificationPresenterClientQt::cancelRequestsForPermission): Remove + any previously cached/granted permission for the given script execution context. + (WebCore::NotificationPresenterClientQt::allowNotificationForFrame): Do not + only serve pending permission requests but before calling the JS callbacks, remember + the permission for subsequent synchronous checkPermission() calls. + * WebCoreSupport/NotificationPresenterClientQt.h: Add cache for permissions. + +2010-11-15 Gavin Barraclough <barraclough@apple.com> + + Reviewed by NOBODY build fix. + + Fix test broken by earlier patch. + + * tests/qwebframe/tst_qwebframe.cpp: + +2010-11-15 Yi Shen <yi.4.shen@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] ZoomTextOnly doesn't work + https://bugs.webkit.org/show_bug.cgi?id=49568 + + Check QWebSettings::ZoomTextOnly attribute before applying zoom + + * Api/qwebframe.cpp: + (QWebFrame::textSizeMultiplier): + (QWebFrame::setZoomFactor): + (QWebFrame::zoomFactor): + * Api/qwebframe_p.h: + (QWebFramePrivate::QWebFramePrivate): + +2010-11-14 Andreas Kling <kling@webkit.org> + + Reviewed by Antonio Gomes. + + REGRESSION(r71895): API test javaScriptWindowObjectCleared fails + https://bugs.webkit.org/show_bug.cgi?id=49466 + + As of r71895 empty inline scripts are no longer executed and so + the javaScriptWindowObjectCleared() signal is no longer triggered + by <script></script>. + + * tests/qwebframe/tst_qwebframe.cpp: + +2010-11-12 Jacob Dinu <dinu.jacob@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] Update .def file for Symbian + https://bugs.webkit.org/show_bug.cgi?id=49456 + + Added missing symbols from revisions r69825, r70470, r71806 + + * symbian/eabi/QtWebKitu.def: + +2010-11-12 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] Need to implement WebKit::pluginWillHandleLoadError for WebKit2 + https://bugs.webkit.org/show_bug.cgi?id=48764 + + Add the missing error. + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::pluginWillHandleLoadError): + +2010-11-11 Yi Shen <yi.4.shen@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] QWebScriptWorld::world() may crash + https://bugs.webkit.org/show_bug.cgi?id=49342 + + * Api/qwebscriptworld.cpp: + (QWebScriptWorld::world): + +2010-11-11 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Andreas Kling. + + [Qt] Add an API for overriding the actual visible content rect in WebCore + https://bugs.webkit.org/show_bug.cgi?id=49373 + + * Api/qwebpage.cpp: + (QWebPage::setActualVisibleContentRect): + * Api/qwebpage.h: + +2010-11-11 Andreas Kling <kling@webkit.org> + + Reviewed by Kenneth Rohde Christiansen. + + FrameView: Don't clip to visibleContentRect in paintEntireContents mode + https://bugs.webkit.org/show_bug.cgi?id=49375 + + Use paintEntireContents in combination with tiling, allowing to + actually set visibleContentRect to something different from + the actual contents size. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::updateResizesToContentsForPage): + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage): + +2010-11-10 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r71733. + http://trac.webkit.org/changeset/71733 + https://bugs.webkit.org/show_bug.cgi?id=49319 + + made qt bot crashy and sad (Requested by kling on #webkit). + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::updateResizesToContentsForPage): + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage): + +2010-11-10 Kenneth Rohde Christiansen <kenneth@webkit.org> + + Reviewed by Andreas Kling. + + Use paintEntireContents in combination with tiling, allowing to + actually set visibleContentRect to something different from + the actual contents size. + + * Api/qgraphicswebview.cpp: + (QGraphicsWebViewPrivate::updateResizesToContentsForPage): + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage): + +2010-11-08 Benjamin Poulain <benjamin.poulain@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] build error in WebKit/qt/Api/qwebpage.cpp in Qt 4.7.0 + https://bugs.webkit.org/show_bug.cgi?id=47427 + + Add a missing guard in order to be able to compile when + ENABLE(TOUCH_EVENTS) is not defined. + + * Api/qwebpage.cpp: + (QWebPagePrivate::touchEvent): + 2010-11-08 Alexey Proskuryakov <ap@apple.com> Reviewed by Darin Adler. diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 1b57138..5c6364e 100644 --- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -280,6 +280,10 @@ void FrameLoaderClientQt::transitionToCommittedForNewPage() preferredLayoutSize.isValid(), hScrollbar, hLock, vScrollbar, vLock); + + bool isMainFrame = m_frame == m_frame->page()->mainFrame(); + if (isMainFrame && page->d->client) + m_frame->view()->setPaintsEntireContents(page->d->client->viewResizesToContentsEnabled()); } void FrameLoaderClientQt::dispatchDidBecomeFrameset(bool) @@ -892,6 +896,7 @@ enum { WebKitErrorCannotFindPlugIn = 200, WebKitErrorCannotLoadPlugIn = 201, WebKitErrorJavaUnavailable = 202, + WebKitErrorPluginWillHandleLoad = 203 }; WebCore::ResourceError FrameLoaderClientQt::blockedError(const WebCore::ResourceRequest& request) @@ -925,10 +930,10 @@ WebCore::ResourceError FrameLoaderClientQt::fileDoesNotExistError(const WebCore: QCoreApplication::translate("QWebFrame", "File does not exist", 0, QCoreApplication::UnicodeUTF8)); } -WebCore::ResourceError FrameLoaderClientQt::pluginWillHandleLoadError(const WebCore::ResourceResponse&) +WebCore::ResourceError FrameLoaderClientQt::pluginWillHandleLoadError(const WebCore::ResourceResponse& response) { - notImplemented(); - return ResourceError(); + return ResourceError("WebKit", WebKitErrorPluginWillHandleLoad, response.url().string(), + QCoreApplication::translate("QWebFrame", "Loading is handled by the media engine", 0, QCoreApplication::UnicodeUTF8)); } bool FrameLoaderClientQt::shouldFallBack(const WebCore::ResourceError&) diff --git a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp index 0324c0d..e58829b 100644 --- a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp +++ b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp @@ -335,24 +335,13 @@ void NotificationPresenterClientQt::requestPermission(ScriptExecutionContext* co NotificationPresenter::Permission NotificationPresenterClientQt::checkPermission(ScriptExecutionContext* context) { - QWebPage::PermissionPolicy policy = QWebPage::PermissionUnknown; - if (toPage(context) && toFrame(context)) - emit toPage(context)->checkPermissionFromUser(toFrame(context), QWebPage::NotificationsPermissionDomain, policy); - - switch (policy) { - case QWebPage::PermissionGranted: - return NotificationPresenter::PermissionAllowed; - case QWebPage::PermissionUnknown: - return NotificationPresenter::PermissionNotAllowed; - case QWebPage::PermissionDenied: - return NotificationPresenter::PermissionDenied; - } - ASSERT_NOT_REACHED(); - return NotificationPresenter::PermissionNotAllowed; + return m_cachedPermissions.value(context, NotificationPresenter::PermissionNotAllowed); } void NotificationPresenterClientQt::cancelRequestsForPermission(ScriptExecutionContext* context) { + m_cachedPermissions.remove(context); + QHash<ScriptExecutionContext*, CallbacksInfo >::iterator iter = m_pendingPermissionRequests.find(context); if (iter == m_pendingPermissionRequests.end()) return; @@ -372,11 +361,13 @@ void NotificationPresenterClientQt::cancelRequestsForPermission(ScriptExecutionC emit page->cancelRequestsForPermission(frame, QWebPage::NotificationsPermissionDomain); } -void NotificationPresenterClientQt::allowNotificationForFrame(QWebFrame* frame) +void NotificationPresenterClientQt::allowNotificationForFrame(Frame* frame) { + m_cachedPermissions.insert(frame->document(), NotificationPresenter::PermissionAllowed); + QHash<ScriptExecutionContext*, CallbacksInfo>::iterator iter = m_pendingPermissionRequests.begin(); while (iter != m_pendingPermissionRequests.end()) { - if (toFrame(iter.key()) == frame) + if (iter.key() == frame->document()) break; } diff --git a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h index 2520f6c..a501247 100644 --- a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h +++ b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.h @@ -48,6 +48,7 @@ class QWebPage; namespace WebCore { class Document; +class Frame; class ScriptExecutionContext; class NotificationWrapper : public QObject, public QWebNotificationData { @@ -95,7 +96,7 @@ public: void cancel(NotificationWrapper*); - void allowNotificationForFrame(QWebFrame*); + void allowNotificationForFrame(Frame*); static bool dumpNotification; @@ -123,6 +124,7 @@ private: QList<RefPtr<VoidCallback> > m_callbacks; }; QHash<ScriptExecutionContext*, CallbacksInfo > m_pendingPermissionRequests; + QHash<ScriptExecutionContext*, NotificationPresenter::Permission> m_cachedPermissions; NotificationsQueue m_notifications; QtPlatformPlugin m_platformPlugin; diff --git a/WebKit/qt/symbian/eabi/QtWebKitu.def b/WebKit/qt/symbian/eabi/QtWebKitu.def index 2aa30cc..77ff7b1 100644 --- a/WebKit/qt/symbian/eabi/QtWebKitu.def +++ b/WebKit/qt/symbian/eabi/QtWebKitu.def @@ -827,4 +827,9 @@ EXPORTS _ZN8QWebPage18ViewportAttributesD1Ev @ 826 NONAME _ZN8QWebPage18ViewportAttributesD2Ev @ 827 NONAME _ZN8QWebPage18ViewportAttributesaSERKS0_ @ 828 NONAME + _ZN23DumpRenderTreeSupportQt13nodesFromRectERK11QWebElementiijjjjb @ 829 NONAME + _ZN23DumpRenderTreeSupportQt28dumpUserGestureInFrameLoaderEb @ 830 NONAME + _ZNK8QWebPage19supportsContentTypeERK7QString @ 831 NONAME + _ZNK8QWebPage21supportedContentTypesEv @ 832 NONAME + _ZNK8QWebPage27setActualVisibleContentRectERK5QRect @ 833 NONAME diff --git a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp index d74b631..2f07f5b 100644 --- a/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -1566,26 +1566,26 @@ void tst_QWebFrame::connectAndDisconnect() QString type; QString ret = evalJS("(function() { }).connect()", type); QCOMPARE(type, sError); - QCOMPARE(ret, QLatin1String("TypeError: Result of expression '(function() { }).connect' [undefined] is not a function.")); + QCOMPARE(ret, QLatin1String("TypeError: 'undefined' is not a function (evaluating '(function() { }).connect()')")); } { QString type; QString ret = evalJS("var o = { }; o.connect = Function.prototype.connect; o.connect()", type); QCOMPARE(type, sError); - QCOMPARE(ret, QLatin1String("TypeError: Result of expression 'o.connect' [undefined] is not a function.")); + QCOMPARE(ret, QLatin1String("TypeError: 'undefined' is not a function (evaluating 'o.connect()')")); } { QString type; QString ret = evalJS("(function() { }).connect(123)", type); QCOMPARE(type, sError); - QCOMPARE(ret, QLatin1String("TypeError: Result of expression '(function() { }).connect' [undefined] is not a function.")); + QCOMPARE(ret, QLatin1String("TypeError: 'undefined' is not a function (evaluating '(function() { }).connect(123)')")); } { QString type; QString ret = evalJS("var o = { }; o.connect = Function.prototype.connect; o.connect(123)", type); QCOMPARE(type, sError); - QCOMPARE(ret, QLatin1String("TypeError: Result of expression 'o.connect' [undefined] is not a function.")); + QCOMPARE(ret, QLatin1String("TypeError: 'undefined' is not a function (evaluating 'o.connect(123)')")); } { @@ -2389,7 +2389,9 @@ void tst_QWebFrame::javaScriptWindowObjectCleared_data() { QTest::addColumn<QString>("html"); QTest::addColumn<int>("signalCount"); - QTest::newRow("with <script>") << "<html><body><script></script><p>hello world</p></body></html>" << 1; + QTest::newRow("with <script>") << "<html><body><script>i=0</script><p>hello world</p></body></html>" << 1; + // NOTE: Empty scripts no longer cause this signal to be emitted. + QTest::newRow("with empty <script>") << "<html><body><script></script><p>hello world</p></body></html>" << 0; QTest::newRow("without <script>") << "<html><body><p>hello world</p></body></html>" << 0; } |