diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-14 16:29:47 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-14 16:29:47 +0200 |
| commit | d0424a769059c84ae20beb3c217812792ea6726b (patch) | |
| tree | 6f94a5c3db8c52c6694ee56498542a6c35417350 /Source/WebKit/qt | |
| parent | 88a04ac016f57c2d78e714682445dff2e7db4ade (diff) | |
| download | qtwebkit-d0424a769059c84ae20beb3c217812792ea6726b.tar.gz | |
Imported WebKit commit 37c5e5041d39a14ea0d429a77ebd352e4bd26516 (http://svn.webkit.org/repository/webkit/trunk@128608)
New snapshot that enables WebKit2 build on Windows (still some bugs) and allows for WebKit to be built with qmake && make
Diffstat (limited to 'Source/WebKit/qt')
| -rw-r--r-- | Source/WebKit/qt/Api/qwebframe.cpp | 2 | ||||
| -rw-r--r-- | Source/WebKit/qt/Api/qwebpage.cpp | 163 | ||||
| -rw-r--r-- | Source/WebKit/qt/ChangeLog | 90 | ||||
| -rw-r--r-- | Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp | 5 | ||||
| -rw-r--r-- | Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h | 1 | ||||
| -rw-r--r-- | Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp | 4 | ||||
| -rw-r--r-- | Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp | 2 | ||||
| -rw-r--r-- | Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp | 16 | ||||
| -rw-r--r-- | Source/WebKit/qt/WebCoreSupport/PageClientQt.h | 6 | ||||
| -rw-r--r-- | Source/WebKit/qt/declarative/experimental/qmldir | 1 | ||||
| -rw-r--r-- | Source/WebKit/qt/declarative/qmldir | 1 | ||||
| -rw-r--r-- | Source/WebKit/qt/docs/docs.pri | 7 |
12 files changed, 121 insertions, 177 deletions
diff --git a/Source/WebKit/qt/Api/qwebframe.cpp b/Source/WebKit/qt/Api/qwebframe.cpp index 8ac18f8e3..adbfa1ccd 100644 --- a/Source/WebKit/qt/Api/qwebframe.cpp +++ b/Source/WebKit/qt/Api/qwebframe.cpp @@ -1406,7 +1406,7 @@ QWebHitTestResult QWebFrame::hitTestContent(const QPoint &pos) const if (!d->frame->view() || !d->frame->contentRenderer()) return QWebHitTestResult(); - HitTestResult result = d->frame->eventHandler()->hitTestResultAtPoint(d->frame->view()->windowToContents(pos), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping); + HitTestResult result = d->frame->eventHandler()->hitTestResultAtPoint(d->frame->view()->windowToContents(pos), /*allowShadowContent*/ false, /*ignoreClipping*/ true); if (result.scrollbar()) return QWebHitTestResult(); diff --git a/Source/WebKit/qt/Api/qwebpage.cpp b/Source/WebKit/qt/Api/qwebpage.cpp index e1c06515b..a327eaf2e 100644 --- a/Source/WebKit/qt/Api/qwebpage.cpp +++ b/Source/WebKit/qt/Api/qwebpage.cpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2008, 2009 Nokia Corporation and/or its subsidiary(-ies) + Copyright (C) 2008, 2009, 2012 Nokia Corporation and/or its subsidiary(-ies) Copyright (C) 2007 Staikos Computing Services Inc. Copyright (C) 2007 Apple Inc. @@ -113,7 +113,9 @@ #include "SystemInfo.h" #endif // Q_OS_WIN32 #include "TextIterator.h" +#include "UserAgentQt.h" #include "WebEventConversion.h" +#include "WebKitVersion.h" #include "WindowFeatures.h" #include "WorkerThread.h" @@ -800,7 +802,7 @@ void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button, const QPo QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel( client->ownerWidget()->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) { - HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(pos)); + HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(pos), false); if (result.isContentEditable()) { QEvent event(QEvent::RequestSoftwareInputPanel); QApplication::sendEvent(client->ownerWidget(), &event); @@ -1557,7 +1559,7 @@ IntPoint QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch(const IntPoi int x = touchPoint.x(); int y = touchPoint.y(); - RefPtr<NodeList> intersectedNodes = document->nodesFromRect(x, y, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding); + RefPtr<NodeList> intersectedNodes = document->nodesFromRect(x, y, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding, false /*ignoreClipping*/, false /*allowShadowContent*/); if (!intersectedNodes) return IntPoint(); @@ -3363,7 +3365,7 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos) d->createMainFrame(); WebCore::Frame* focusedFrame = d->page->focusController()->focusedOrMainFrame(); - HitTestResult result = focusedFrame->eventHandler()->hitTestResultAtPoint(focusedFrame->view()->windowToContents(pos)); + HitTestResult result = focusedFrame->eventHandler()->hitTestResultAtPoint(focusedFrame->view()->windowToContents(pos), /*allowShadowContent*/ false); if (result.scrollbar()) d->hitTestResult = QWebHitTestResult(); else @@ -3784,158 +3786,7 @@ QWebPluginFactory *QWebPage::pluginFactory() const */ QString QWebPage::userAgentForUrl(const QUrl&) const { - // splitting the string in three and user QStringBuilder is better than using QString::arg() - static QString firstPart; - static QString secondPart; - static QString thirdPart; - - if (firstPart.isNull() || secondPart.isNull() || thirdPart.isNull()) { - QString firstPartTemp; - firstPartTemp.reserve(150); - firstPartTemp += QString::fromLatin1("Mozilla/5.0 (" - - // Platform -#ifdef Q_WS_MAC - "Macintosh; " -#elif defined Q_WS_QWS - "QtEmbedded; " -#elif defined Q_WS_WIN - // Nothing -#elif defined Q_WS_X11 - "X11; " -#else - "Unknown; " -#endif - ); - -#if defined(QT_NO_OPENSSL) - // No SSL support - firstPartTemp += QString::fromLatin1("N; "); -#endif - - // Operating system -#ifdef Q_OS_AIX - firstPartTemp += QString::fromLatin1("AIX"); -#elif defined Q_OS_WIN32 - firstPartTemp += windowsVersionForUAString(); -#elif defined Q_OS_DARWIN -#ifdef __i386__ || __x86_64__ - firstPartTemp += QString::fromLatin1("Intel Mac OS X"); -#else - firstPartTemp += QString::fromLatin1("PPC Mac OS X"); -#endif - -#elif defined Q_OS_BSDI - firstPartTemp += QString::fromLatin1("BSD"); -#elif defined Q_OS_BSD4 - firstPartTemp += QString::fromLatin1("BSD Four"); -#elif defined Q_OS_CYGWIN - firstPartTemp += QString::fromLatin1("Cygwin"); -#elif defined Q_OS_DGUX - firstPartTemp += QString::fromLatin1("DG/UX"); -#elif defined Q_OS_DYNIX - firstPartTemp += QString::fromLatin1("DYNIX/ptx"); -#elif defined Q_OS_FREEBSD - firstPartTemp += QString::fromLatin1("FreeBSD"); -#elif defined Q_OS_HPUX - firstPartTemp += QString::fromLatin1("HP-UX"); -#elif defined Q_OS_HURD - firstPartTemp += QString::fromLatin1("GNU Hurd"); -#elif defined Q_OS_IRIX - firstPartTemp += QString::fromLatin1("SGI Irix"); -#elif defined Q_OS_LINUX - -#if defined(__x86_64__) - firstPartTemp += QString::fromLatin1("Linux x86_64"); -#elif defined(__i386__) - firstPartTemp += QString::fromLatin1("Linux i686"); -#else - firstPartTemp += QString::fromLatin1("Linux"); -#endif - -#elif defined Q_OS_LYNX - firstPartTemp += QString::fromLatin1("LynxOS"); -#elif defined Q_OS_NETBSD - firstPartTemp += QString::fromLatin1("NetBSD"); -#elif defined Q_OS_OS2 - firstPartTemp += QString::fromLatin1("OS/2"); -#elif defined Q_OS_OPENBSD - firstPartTemp += QString::fromLatin1("OpenBSD"); -#elif defined Q_OS_OS2EMX - firstPartTemp += QString::fromLatin1("OS/2"); -#elif defined Q_OS_OSF - firstPartTemp += QString::fromLatin1("HP Tru64 UNIX"); -#elif defined Q_OS_QNX6 - firstPartTemp += QString::fromLatin1("QNX RTP Six"); -#elif defined Q_OS_QNX - firstPartTemp += QString::fromLatin1("QNX"); -#elif defined Q_OS_RELIANT - firstPartTemp += QString::fromLatin1("Reliant UNIX"); -#elif defined Q_OS_SCO - firstPartTemp += QString::fromLatin1("SCO OpenServer"); -#elif defined Q_OS_SOLARIS - firstPartTemp += QString::fromLatin1("Sun Solaris"); -#elif defined Q_OS_ULTRIX - firstPartTemp += QString::fromLatin1("DEC Ultrix"); -#elif defined Q_OS_UNIX - firstPartTemp += QString::fromLatin1("UNIX BSD/SYSV system"); -#elif defined Q_OS_UNIXWARE - firstPartTemp += QString::fromLatin1("UnixWare Seven, Open UNIX Eight"); -#else - firstPartTemp += QString::fromLatin1("Unknown"); -#endif - -#if USE(QT_MOBILITY_SYSTEMINFO) - // adding Model Number - QtMobility::QSystemDeviceInfo systemDeviceInfo; - - QString model = systemDeviceInfo.model(); - if (!model.isEmpty()) { - if (!firstPartTemp.endsWith("; ")) - firstPartTemp += QString::fromLatin1("; "); - firstPartTemp += systemDeviceInfo.model(); - } -#endif - firstPartTemp.squeeze(); - firstPart = firstPartTemp; - - QString secondPartTemp; - secondPartTemp.reserve(150); - secondPartTemp += QString::fromLatin1(") "); - - // webkit/qt version - secondPartTemp += QString::fromLatin1("AppleWebKit/"); - secondPartTemp += qWebKitVersion(); - secondPartTemp += QString::fromLatin1(" (KHTML, like Gecko) "); - - - // Application name split the third part - secondPartTemp.squeeze(); - secondPart = secondPartTemp; - - QString thirdPartTemp; - thirdPartTemp.reserve(150); - thirdPartTemp += QLatin1String(" Safari/"); - thirdPartTemp += qWebKitVersion(); - thirdPartTemp.squeeze(); - thirdPart = thirdPartTemp; - Q_ASSERT(!firstPart.isNull()); - Q_ASSERT(!secondPart.isNull()); - Q_ASSERT(!thirdPart.isNull()); - } - - // Application name/version - QString appName = QCoreApplication::applicationName(); - if (!appName.isEmpty()) { - QString appVer = QCoreApplication::applicationVersion(); - if (!appVer.isEmpty()) - appName.append(QLatin1Char('/') + appVer); - } else { - // Qt version - appName = QString::fromLatin1("Qt/") + QString::fromLatin1(qVersion()); - } - - return firstPart + secondPart + appName + thirdPart; + return UserAgentQt::standardUserAgent("", WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION); } diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog index 2f159f65b..53a092b85 100644 --- a/Source/WebKit/qt/ChangeLog +++ b/Source/WebKit/qt/ChangeLog @@ -1,3 +1,93 @@ +2012-09-13 Lauro Neto <lauro.neto@openbossa.org> + + [Qt][WK2] fast/forms/access-key-for-all-elements.html fails + https://bugs.webkit.org/show_bug.cgi?id=73917 + + Reviewed by Simon Hausmann. + + Access-key tests were failing due to hardcoded Mac OS X in the + Qt WK2 user agent string. This commit moves the WK1 implementation + to a shared one to be used by both versions. + + Change QWebPage to use the shared user agent implementation. + + * Api/qwebpage.cpp: + (QWebPage::userAgentForUrl): + +2012-09-13 Oswald Buddenhagen <oswald.buddenhagen@nokia.com> + + [Qt] Fix qdoc executable preparation + + Reviewed by Tor Arne Vestbø. + + * docs/docs.pri: + +2012-09-12 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r127876. + http://trac.webkit.org/changeset/127876 + https://bugs.webkit.org/show_bug.cgi?id=96600 + + mouse click doesn't work for spin button if spin button in + iframe (Requested by yosin on #webkit). + + * Api/qwebframe.cpp: + (QWebFrame::hitTestContent): + * Api/qwebpage.cpp: + (QWebPagePrivate::handleSoftwareInputPanel): + (QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch): + (QWebPage::updatePositionDependentActions): + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction): + +2012-09-12 Roland Takacs <rtakacs@inf.u-szeged.hu> + + [Qt] Segmentation fault when closing QtTestBrowser + https://bugs.webkit.org/show_bug.cgi?id=95003 + + Reviewed by Simon Hausmann. + + Defined a new QObject* variable that points to the QGLWidget that was created + in 'createPlatformGraphicsContext3DFromWidget'. + It is neccessary for deallocating it. + + * WebCoreSupport/PageClientQt.cpp: + (createPlatformGraphicsContext3DFromWidget): + (WebCore::PageClientQWidget::createPlatformGraphicsContext3D): + (WebCore::PageClientQGraphicsWidget::createPlatformGraphicsContext3D): + * WebCoreSupport/PageClientQt.h: + (PageClientQWidget): + (PageClientQGraphicsWidget): + +2012-09-12 Andras Becsi <andras.becsi@nokia.com> + + [Qt] Add module identifier directive to the qmldir files + https://bugs.webkit.org/show_bug.cgi?id=96406 + + Reviewed by Simon Hausmann. + + Qt5 QML modules need to be identified. Type registrations are only permitted + into the namespace identified in the qmldir file's module identifier directive. + Additionally this also facilitates the protection against external registrations. + This patch suppresses a warning when importing the QtWebKit module. + + * declarative/experimental/qmldir: + * declarative/qmldir: + +2012-09-11 Marcelo Lira <marcelo.lira@openbossa.org> + + Restore original value of mock scrollbars enabled in InternalSettings + https://bugs.webkit.org/show_bug.cgi?id=87680 + + Reviewed by Adam Barth. + + Added backup support for mock scrollbars state in + InternalSettings::Backup, and removed support for these + from Qt's DumpRenderTree. + + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + * WebCoreSupport/DumpRenderTreeSupportQt.h: + 2012-09-11 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> [Qt] Add a configure step to the Qt build system diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp index ac1654ec0..dc823165c 100644 --- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp @@ -237,11 +237,6 @@ void DumpRenderTreeSupportQt::setFrameFlatteningEnabled(QWebPage* page, bool ena QWebPagePrivate::core(page)->settings()->setFrameFlatteningEnabled(enabled); } -void DumpRenderTreeSupportQt::setMockScrollbarsEnabled(QWebPage* page, bool enabled) -{ - QWebPagePrivate::core(page)->settings()->setMockScrollbarsEnabled(enabled); -} - void DumpRenderTreeSupportQt::webPageSetGroupName(QWebPage* page, const QString& groupName) { page->handle()->page->setGroupName(groupName); diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h index 92759acd3..862213657 100644 --- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h +++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h @@ -104,7 +104,6 @@ public: static void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme); static void setFrameFlatteningEnabled(QWebPage*, bool); - static void setMockScrollbarsEnabled(QWebPage*, bool); static void setCaretBrowsingEnabled(QWebPage* page, bool value); static void setAuthorAndUserStylesEnabled(QWebPage*, bool); static void setMediaType(QWebFrame* qframe, const QString& type); diff --git a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp index a5a1d80d9..eb73c9e9d 100644 --- a/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp @@ -644,7 +644,11 @@ void EditorClientQt::setInputMethodState(bool active) bool EditorClientQt::supportsGlobalSelection() { +#ifndef QT_NO_CLIPBOARD return qApp->clipboard()->supportsSelection(); +#else + return false; +#endif } } diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 72a5e0049..bcf072d65 100644 --- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -1272,7 +1272,7 @@ void FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction(FramePolicyFun if (event->isMouseEvent()) { const MouseEvent* mouseEvent = static_cast<const MouseEvent*>(event); node = QWebFramePrivate::core(m_webFrame)->eventHandler()->hitTestResultAtPoint( - mouseEvent->absoluteLocation()).innerNonSharedNode(); + mouseEvent->absoluteLocation(), false).innerNonSharedNode(); break; } } diff --git a/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp index 0093187af..2be1b3b3f 100644 --- a/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp @@ -36,11 +36,13 @@ #include <QWindow> static void createPlatformGraphicsContext3DFromWidget(QWidget* widget, PlatformGraphicsContext3D* context, - PlatformGraphicsSurface3D* surface) + PlatformGraphicsSurface3D* surface, QObject** surfaceOwner) { #ifdef QT_OPENGL_LIB *context = 0; *surface = 0; + if (surfaceOwner) + *surfaceOwner = 0; QAbstractScrollArea* scrollArea = qobject_cast<QAbstractScrollArea*>(widget); if (!scrollArea) return; @@ -52,6 +54,8 @@ static void createPlatformGraphicsContext3DFromWidget(QWidget* widget, PlatformG if (glWidget->isValid()) { // Geometry can be set to zero because m_glWidget is used only for its QGLContext. glWidget->setGeometry(0, 0, 0, 0); + if (surfaceOwner) + *surfaceOwner = glWidget; *surface = glWidget->windowHandle(); *context = glWidget->context()->contextHandle(); } else { @@ -235,9 +239,10 @@ void PageClientQWidget::setWidgetVisible(Widget* widget, bool visible) #if USE(3D_GRAPHICS) void PageClientQWidget::createPlatformGraphicsContext3D(PlatformGraphicsContext3D* context, - PlatformGraphicsSurface3D* surface) + PlatformGraphicsSurface3D* surface, + QObject** surfaceOwner) { - createPlatformGraphicsContext3DFromWidget(view, context, surface); + createPlatformGraphicsContext3DFromWidget(view, context, surface, surfaceOwner); } #endif @@ -424,9 +429,10 @@ QRectF PageClientQGraphicsWidget::windowRect() const #if USE(3D_GRAPHICS) void PageClientQGraphicsWidget::createPlatformGraphicsContext3D(PlatformGraphicsContext3D* context, - PlatformGraphicsSurface3D* surface) + PlatformGraphicsSurface3D* surface, + QObject** surfaceOwner) { - createPlatformGraphicsContext3DFromWidget(ownerWidget(), context, surface); + createPlatformGraphicsContext3DFromWidget(ownerWidget(), context, surface, surfaceOwner); } #endif diff --git a/Source/WebKit/qt/WebCoreSupport/PageClientQt.h b/Source/WebKit/qt/WebCoreSupport/PageClientQt.h index febca03f5..e6b9e1694 100644 --- a/Source/WebKit/qt/WebCoreSupport/PageClientQt.h +++ b/Source/WebKit/qt/WebCoreSupport/PageClientQt.h @@ -101,7 +101,8 @@ public: #if USE(3D_GRAPHICS) virtual void createPlatformGraphicsContext3D(PlatformGraphicsContext3D*, - PlatformGraphicsSurface3D*); + PlatformGraphicsSurface3D*, + QObject**); #endif QWidget* view; @@ -209,7 +210,8 @@ public: #if USE(3D_GRAPHICS) virtual void createPlatformGraphicsContext3D(PlatformGraphicsContext3D*, - PlatformGraphicsSurface3D*); + PlatformGraphicsSurface3D*, + QObject**); #endif #if USE(TILED_BACKING_STORE) diff --git a/Source/WebKit/qt/declarative/experimental/qmldir b/Source/WebKit/qt/declarative/experimental/qmldir index c463e0b15..dfbc65cb7 100644 --- a/Source/WebKit/qt/declarative/experimental/qmldir +++ b/Source/WebKit/qt/declarative/experimental/qmldir @@ -1 +1,2 @@ +module QtWebKit.experimental plugin qmlwebkitexperimentalplugin diff --git a/Source/WebKit/qt/declarative/qmldir b/Source/WebKit/qt/declarative/qmldir index dcfdd063a..b9c5d05dc 100644 --- a/Source/WebKit/qt/declarative/qmldir +++ b/Source/WebKit/qt/declarative/qmldir @@ -1 +1,2 @@ +module QtWebKit plugin qmlwebkitplugin diff --git a/Source/WebKit/qt/docs/docs.pri b/Source/WebKit/qt/docs/docs.pri index b95f924f7..58704cc47 100644 --- a/Source/WebKit/qt/docs/docs.pri +++ b/Source/WebKit/qt/docs/docs.pri @@ -1,9 +1,4 @@ -QDOC = $$QT.core.bins/qdoc - -$$unixstyle { -} else { - QDOC = $$replace(QDOC, "qdoc", "qdoc3.exe") -} +qtPrepareTool(QDOC, qdoc) QDOC = SRCDIR=$$PWD/../../.. OUTPUT_DIR=$${ROOT_BUILD_DIR} $$QDOC |
