From b1e9e47fa11f608ae16bc07f97a2acf95bf80272 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 1 Jun 2012 10:36:58 +0200 Subject: Imported WebKit commit 499c84c99aa98e9870fa7eaa57db476c6d160d46 (http://svn.webkit.org/repository/webkit/trunk@119200) Weekly update :). Particularly relevant changes for Qt are the use of the WebCore image decoders and direct usage of libpng/libjpeg if available in the system. --- Source/WebKit/qt/Api/qgraphicswebview.cpp | 2 +- Source/WebKit/qt/Api/qgraphicswebview.h | 2 +- Source/WebKit/qt/Api/qwebframe.cpp | 2 +- Source/WebKit/qt/Api/qwebframe_p.h | 4 +- Source/WebKit/qt/Api/qwebpage.cpp | 2 +- Source/WebKit/qt/Api/qwebpage.h | 2 +- Source/WebKit/qt/Api/qwebsettings.cpp | 6 +- Source/WebKit/qt/Api/qwebview.cpp | 2 +- Source/WebKit/qt/Api/qwebview.h | 2 +- Source/WebKit/qt/ChangeLog | 67 ++++++++++++++++++++++ .../qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp | 19 ------ .../qt/WebCoreSupport/DumpRenderTreeSupportQt.h | 1 - .../qt/WebCoreSupport/FrameLoaderClientQt.cpp | 2 +- .../qt/WebCoreSupport/GeolocationClientQt.cpp | 4 +- .../WebKit/qt/WebCoreSupport/GeolocationClientQt.h | 4 +- Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp | 6 +- .../WebKit/qt/WebCoreSupport/TextCheckerClientQt.h | 2 +- .../qt/WebCoreSupport/WebEventConversion.cpp | 2 +- Source/WebKit/qt/declarative/plugin.cpp | 4 +- Source/WebKit/qt/declarative/public.pri | 2 + Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp | 2 +- Source/WebKit/qt/tests/util.h | 2 +- 22 files changed, 96 insertions(+), 45 deletions(-) (limited to 'Source/WebKit/qt') diff --git a/Source/WebKit/qt/Api/qgraphicswebview.cpp b/Source/WebKit/qt/Api/qgraphicswebview.cpp index 3f6fe1471..d194f9fc3 100644 --- a/Source/WebKit/qt/Api/qgraphicswebview.cpp +++ b/Source/WebKit/qt/Api/qgraphicswebview.cpp @@ -313,7 +313,7 @@ bool QGraphicsWebView::sceneEvent(QEvent* event) if (d->page && (event->type() == QEvent::TouchBegin || event->type() == QEvent::TouchEnd || event->type() == QEvent::TouchUpdate -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if HAVE(QT5) || event->type() == QEvent::TouchCancel #endif )) { diff --git a/Source/WebKit/qt/Api/qgraphicswebview.h b/Source/WebKit/qt/Api/qgraphicswebview.h index 15fe087d6..c7ca44aad 100644 --- a/Source/WebKit/qt/Api/qgraphicswebview.h +++ b/Source/WebKit/qt/Api/qgraphicswebview.h @@ -23,7 +23,7 @@ #include "qwebkitglobal.h" #include "qwebpage.h" #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if defined(HAVE_QT5) && HAVE_QT5 #include #else #include diff --git a/Source/WebKit/qt/Api/qwebframe.cpp b/Source/WebKit/qt/Api/qwebframe.cpp index f09a8a80d..aba58db0c 100644 --- a/Source/WebKit/qt/Api/qwebframe.cpp +++ b/Source/WebKit/qt/Api/qwebframe.cpp @@ -116,7 +116,7 @@ #include #include -#if ENABLE(ORIENTATION_EVENTS) && QT_VERSION < QT_VERSION_CHECK(5, 0, 0) +#if ENABLE(ORIENTATION_EVENTS) && !HAVE(QT5) QTM_USE_NAMESPACE #endif diff --git a/Source/WebKit/qt/Api/qwebframe_p.h b/Source/WebKit/qt/Api/qwebframe_p.h index 4ab7b9700..82fd92033 100644 --- a/Source/WebKit/qt/Api/qwebframe_p.h +++ b/Source/WebKit/qt/Api/qwebframe_p.h @@ -30,9 +30,9 @@ #include "PlatformString.h" #if ENABLE(ORIENTATION_EVENTS) #include "qorientationsensor.h" -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) +#if !(defined(HAVE_QT5) && HAVE_QT5) using QTM_NAMESPACE::QOrientationSensor; -#endif // QT_VERSION < QT_VERSION_CHECK(5, 0, 0). +#endif #endif // ENABLE(ORIENTATION_EVENTS). #include "qwebelement.h" #include "wtf/RefPtr.h" diff --git a/Source/WebKit/qt/Api/qwebpage.cpp b/Source/WebKit/qt/Api/qwebpage.cpp index d9b00773b..8fb319dd4 100644 --- a/Source/WebKit/qt/Api/qwebpage.cpp +++ b/Source/WebKit/qt/Api/qwebpage.cpp @@ -3151,7 +3151,7 @@ bool QWebPage::event(QEvent *ev) case QEvent::TouchBegin: case QEvent::TouchUpdate: case QEvent::TouchEnd: -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if HAVE(QT5) case QEvent::TouchCancel: #endif // Return whether the default action was cancelled in the JS event handler diff --git a/Source/WebKit/qt/Api/qwebpage.h b/Source/WebKit/qt/Api/qwebpage.h index 0bf35e247..fce68a8c4 100644 --- a/Source/WebKit/qt/Api/qwebpage.h +++ b/Source/WebKit/qt/Api/qwebpage.h @@ -26,7 +26,7 @@ #include #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if defined(HAVE_QT5) && HAVE_QT5 #include #else #include diff --git a/Source/WebKit/qt/Api/qwebsettings.cpp b/Source/WebKit/qt/Api/qwebsettings.cpp index 4e01836f7..5425a9270 100644 --- a/Source/WebKit/qt/Api/qwebsettings.cpp +++ b/Source/WebKit/qt/Api/qwebsettings.cpp @@ -46,7 +46,7 @@ #include "FileSystem.h" #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if HAVE(QT5) #include #else #include @@ -1151,7 +1151,7 @@ void QWebSettings::enablePersistentStorage(const QString& path) if (path.isEmpty()) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if HAVE(QT5) storagePath = QStandardPaths::writableLocation(QStandardPaths::DataLocation); #else storagePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation); @@ -1174,7 +1174,7 @@ void QWebSettings::enablePersistentStorage(const QString& path) #if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE) // All applications can share the common QtWebkit cache file(s). // Path is not configurable and uses QDesktopServices::CacheLocation by default. -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if HAVE(QT5) QString cachePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation); #else QString cachePath = QDesktopServices::storageLocation(QDesktopServices::CacheLocation); diff --git a/Source/WebKit/qt/Api/qwebview.cpp b/Source/WebKit/qt/Api/qwebview.cpp index 937d3bdca..76bf39277 100644 --- a/Source/WebKit/qt/Api/qwebview.cpp +++ b/Source/WebKit/qt/Api/qwebview.cpp @@ -704,7 +704,7 @@ bool QWebView::event(QEvent *e) } else if (e->type() == QEvent::TouchBegin || e->type() == QEvent::TouchEnd || e->type() == QEvent::TouchUpdate -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if HAVE(QT5) || e->type() == QEvent::TouchCancel #endif ) { diff --git a/Source/WebKit/qt/Api/qwebview.h b/Source/WebKit/qt/Api/qwebview.h index 90d0a8e3b..c31aa355b 100644 --- a/Source/WebKit/qt/Api/qwebview.h +++ b/Source/WebKit/qt/Api/qwebview.h @@ -23,7 +23,7 @@ #include "qwebkitglobal.h" #include "qwebpage.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if defined(HAVE_QT5) && HAVE_QT5 #include #else #include diff --git a/Source/WebKit/qt/ChangeLog b/Source/WebKit/qt/ChangeLog index bf8496bbb..3980c1975 100644 --- a/Source/WebKit/qt/ChangeLog +++ b/Source/WebKit/qt/ChangeLog @@ -1,3 +1,70 @@ +2012-05-31 Hajime Morrita + + REGRESSION(r117572): editing/spelling/spellcheck-async-remove-frame.html crashes on Mac + https://bugs.webkit.org/show_bug.cgi?id=86859 + + Reviewed by Ryosuke Niwa. + + * WebCoreSupport/TextCheckerClientQt.h: + (WebCore::TextCheckerClientQt::requestCheckingOfString): + +2012-05-31 Tor Arne Vestbø + + [Qt] Simplify QT_VERSION_CHECKS for Qt5 by introducing HAVE(QT5) + https://bugs.webkit.org/show_bug.cgi?id=87955 + + Reviewed by Simon Hausmann. + + * Api/qgraphicswebview.cpp: + * Api/qgraphicswebview.h: + * Api/qwebframe.cpp: + * Api/qwebframe_p.h: + * Api/qwebpage.cpp: + * Api/qwebpage.h: + * Api/qwebsettings.cpp: + * Api/qwebview.cpp: + * Api/qwebview.h: + * WebCoreSupport/FrameLoaderClientQt.cpp: + * WebCoreSupport/GeolocationClientQt.cpp: + * WebCoreSupport/GeolocationClientQt.h: + * WebCoreSupport/PageClientQt.cpp: + * WebCoreSupport/WebEventConversion.cpp: + * declarative/plugin.cpp: + * tests/qwebframe/tst_qwebframe.cpp: + * tests/util.h: + +2012-05-29 Tor Arne Vestbø + + [Qt] Sync up favicon-implementation with WebView url changes in r118158 + + https://bugs.webkit.org/show_bug.cgi?id=87133 + + We now base64-encode the page url in the image-provider url, so that any + normalization done by QUrl will not mess up the page-url. The logic of + creating and parsing the provider-url has been moved into the image + provider, to keep it in one place. + + We were also releasing icons (even ones we hadn't retained), which we can't + do since we don't know when the icon url is no longer in use. + + Reviewed-by Simon Hausmann. + + * declarative/plugin.cpp: + * declarative/public.pri: + +2012-05-25 Jesus Sanchez-Palencia + + WebKitTestRunner needs to support layoutTestController.setJavaScriptProfilingEnabled + https://bugs.webkit.org/show_bug.cgi?id=42328 + + Reviewed by Eric Seidel. + + Removed unneeded setJavaScriptProfilingEnabled function from DRT after its + move to windows.internals.settings. + + * WebCoreSupport/DumpRenderTreeSupportQt.cpp: + * WebCoreSupport/DumpRenderTreeSupportQt.h: + 2012-05-27 Simon Hausmann [Qt] Trivial unreviewed build fix with newer Qt diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp index ff7d00627..e70bf004a 100644 --- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp @@ -301,20 +301,6 @@ void DumpRenderTreeSupportQt::setAutofilled(const QWebElement& element, bool isA inputElement->setAutofilled(isAutofilled); } -void DumpRenderTreeSupportQt::setJavaScriptProfilingEnabled(QWebFrame* frame, bool enabled) -{ -#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR) - Frame* coreFrame = QWebFramePrivate::core(frame); - InspectorController* controller = coreFrame->page()->inspectorController(); - if (!controller) - return; - if (enabled) - controller->enableProfiler(); - else - controller->disableProfiler(); -#endif -} - void DumpRenderTreeSupportQt::setValueForUser(const QWebElement& element, const QString& value) { WebCore::Element* webElement = element.m_element; @@ -1274,11 +1260,6 @@ void QWEBKIT_EXPORT qt_drt_run(bool b) DumpRenderTreeSupportQt::setDumpRenderTreeModeEnabled(b); } -void QWEBKIT_EXPORT qt_drt_setJavaScriptProfilingEnabled(QWebFrame* frame, bool enabled) -{ - DumpRenderTreeSupportQt::setJavaScriptProfilingEnabled(frame, enabled); -} - void QWEBKIT_EXPORT qt_drt_whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains) { DumpRenderTreeSupportQt::whiteListAccessFromOrigin(sourceOrigin, destinationProtocol, destinationHost, allowDestinationSubdomains); diff --git a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h index 2c96fb3a2..41800fabd 100644 --- a/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h +++ b/Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h @@ -125,7 +125,6 @@ public: static void garbageCollectorCollect(); static void garbageCollectorCollectOnAlternateThread(bool waitUntilDone); static void setAutofilled(const QWebElement&, bool enabled); - static void setJavaScriptProfilingEnabled(QWebFrame*, bool enabled); static void setValueForUser(const QWebElement&, const QString& value); static int javaScriptObjectsCount(); static void clearScriptWorlds(); diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index e816b9f21..097d7d889 100644 --- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -1603,7 +1603,7 @@ PassRefPtr FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, Vector params = paramNames; Vector values = paramValues; if (mimeType == "application/x-shockwave-flash") { -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if HAVE(QT5) const bool shouldInjectWmode = true; #else // Inject wmode=opaque when there is no client or the client is not a QWebView. diff --git a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp index 8551cf906..ec4d1bb9e 100644 --- a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.cpp @@ -37,9 +37,9 @@ #include "qwebpage.h" #include "qwebpage_p.h" -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) +#if !HAVE(QT5) #include -#elif QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#elif HAVE(QT5) #include #endif diff --git a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h index 9d07a9155..94b0f6531 100644 --- a/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h +++ b/Source/WebKit/qt/WebCoreSupport/GeolocationClientQt.h @@ -31,13 +31,13 @@ #include #include -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) +#if !HAVE(QT5) #include namespace QtMobility { class QGeoPositionInfoSource; }; using namespace QtMobility; -#elif QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#elif HAVE(QT5) #include class QGeoPositionInfoSource; #endif diff --git a/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp index ed61d1f96..93be5a5e2 100644 --- a/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/PageClientQt.cpp @@ -30,7 +30,7 @@ #if ENABLE(WEBGL) #include -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if HAVE(QT5) #include #endif @@ -50,7 +50,7 @@ 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 QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if HAVE(QT5) *surface = glWidget->windowHandle(); *context = glWidget->context()->contextHandle(); #else @@ -69,7 +69,7 @@ static void createPlatformGraphicsContext3DFromWidget(QWidget* widget, PlatformG #include "texmap/TextureMapperLayer.h" #endif -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if HAVE(QT5) QWindow* QWebPageClient::ownerWindow() const { QWidget* widget = ownerWidget(); diff --git a/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h b/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h index 22d728eb0..bf9ded465 100644 --- a/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h +++ b/Source/WebKit/qt/WebCoreSupport/TextCheckerClientQt.h @@ -48,7 +48,7 @@ public: virtual String getAutoCorrectSuggestionForMisspelledWord(const String& misspelledWord); virtual void checkGrammarOfString(const UChar*, int length, Vector&, int* badGrammarLocation, int* badGrammarLength); virtual void getGuessesForWord(const String& word, const String& context, Vector& guesses); - virtual void requestCheckingOfString(SpellChecker*, const TextCheckingRequest&) { } + virtual void requestCheckingOfString(WTF::PassRefPtr) { } virtual bool isContinousSpellCheckingEnabled(); virtual void toggleContinousSpellChecking(); diff --git a/Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp b/Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp index d45f8ce31..0b732a4ce 100644 --- a/Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp +++ b/Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp @@ -243,7 +243,7 @@ WebKitPlatformTouchEvent::WebKitPlatformTouchEvent(QTouchEvent* event) case QEvent::TouchEnd: m_type = PlatformEvent::TouchEnd; break; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if HAVE(QT5) case QEvent::TouchCancel: m_type = PlatformEvent::TouchCancel; break; diff --git a/Source/WebKit/qt/declarative/plugin.cpp b/Source/WebKit/qt/declarative/plugin.cpp index f8c532a06..988b36e0e 100644 --- a/Source/WebKit/qt/declarative/plugin.cpp +++ b/Source/WebKit/qt/declarative/plugin.cpp @@ -17,13 +17,15 @@ Boston, MA 02110-1301, USA. */ +#include "config.h" + #include "qglobal.h" #if defined(HAVE_QQUICK1) #include "qdeclarativewebview_p.h" #endif -#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) +#if (HAVE(QT5)) #include #include #else diff --git a/Source/WebKit/qt/declarative/public.pri b/Source/WebKit/qt/declarative/public.pri index 04b17b724..576ce03ca 100644 --- a/Source/WebKit/qt/declarative/public.pri +++ b/Source/WebKit/qt/declarative/public.pri @@ -34,6 +34,8 @@ contains(DEFINES, HAVE_QQUICK1=1) { HEADERS += qdeclarativewebview_p.h } +WEBKIT += wtf + DESTDIR = $${ROOT_BUILD_DIR}/imports/$${TARGET.module_name} CONFIG += rpath diff --git a/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp index 2c28aef1f..3d8a2b3ce 100644 --- a/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp +++ b/Source/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp @@ -2033,7 +2033,7 @@ void tst_QWebFrame::enumerate_data() << "dp1" << "dp2" << "dp3" // inherited signals and slots << "destroyed(QObject*)" << "destroyed()" -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) +#if defined(HAVE_QT5) && HAVE_QT5 << "objectNameChanged(QString)" #endif << "deleteLater()" diff --git a/Source/WebKit/qt/tests/util.h b/Source/WebKit/qt/tests/util.h index 22192bad2..2fb59e067 100644 --- a/Source/WebKit/qt/tests/util.h +++ b/Source/WebKit/qt/tests/util.h @@ -49,7 +49,7 @@ static bool waitForSignal(QObject* obj, const char* signal, int timeout = 10000) return timeoutSpy.isEmpty(); } -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) +#if !(defined(HAVE_QT5) && HAVE_QT5) // Will try to wait for the condition while allowing event processing #define QTRY_VERIFY(__expr) \ do { \ -- cgit v1.2.1