summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2017-03-04 18:59:02 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-03-04 16:15:23 +0000
commitfdcba363c7e7e01790ba4b946e4f53f8600d8a20 (patch)
tree735f50270fe51995a9961615ae0263fd057ca564
parentb6d52c42e6595e1b283090ebb9bb21db50fed87b (diff)
downloadqtwebkit-fdcba363c7e7e01790ba4b946e4f53f8600d8a20.tar.gz
Import WebKit commit 3da312bb5ff3deccba0a495b6ad6d5cafba56597
Change-Id: Ifc702a2f8477e8a07e51cb0cd44161c1d9a84357 Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
-rw-r--r--Source/PlatformQt.cmake70
-rw-r--r--Source/Qt5WebKitConfig.cmake.in5
-rw-r--r--Source/Qt5WebKitWidgetsConfig.cmake.in5
-rw-r--r--Source/WebCore/PlatformQt.cmake10
-rw-r--r--Source/WebCore/platform/ScrollAnimationSmooth.cpp38
-rw-r--r--Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp2
-rw-r--r--Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp12
-rw-r--r--Source/WebCore/platform/network/qt/ResourceRequestQt.cpp20
-rw-r--r--Source/WebKit/CMakeLists.txt1
-rw-r--r--Source/WebKit/PlatformQt.cmake6
-rw-r--r--Source/WebKit/qt/Api/qwebsettings.cpp10
-rw-r--r--Source/WebKit/qt/Api/qwebsettings.h4
-rw-r--r--Source/cmake/OptionsQt.cmake20
-rw-r--r--Source/cmake/WebKitMacros.cmake4
-rw-r--r--Tools/QtTestBrowser/launcherwindow.cpp2
-rw-r--r--Tools/qmake/mkspecs/features/functions.prf13
-rw-r--r--Tools/qmake/projects/run_cmake.pro13
-rw-r--r--Tools/qt/jhbuild-qt-5.4.modules2
-rw-r--r--Tools/qt/jhbuild.modules14
-rwxr-xr-xTools/qt/make-snapshot.pl2
-rw-r--r--Tools/qt/patches/gdate-suppress-string-format-literal-warning.patch29
-rw-r--r--Tools/qt/patches/glib-warning-fix.patch34
-rw-r--r--Tools/qt/patches/qtbase-5.4-no-sslv2_3.patch89
-rw-r--r--Tools/qt/patches/qtbase-5.4-no-sslv3.patch100
24 files changed, 448 insertions, 57 deletions
diff --git a/Source/PlatformQt.cmake b/Source/PlatformQt.cmake
index fb3e0acb1..397ab8dbc 100644
--- a/Source/PlatformQt.cmake
+++ b/Source/PlatformQt.cmake
@@ -1,6 +1,28 @@
+# Minimal debug
+
+# Builds with debug flags result in a huge amount of symbols with the GNU toolchain,
+# resulting in the need of several gigabytes of memory at link-time. Reduce the pressure
+# by compiling any static library like WTF or JSC with optimization flags instead and keep
+# debug symbols for the static libraries that implement API.
+cmake_dependent_option(USE_MINIMAL_DEBUG_INFO "Add debug info only for the libraries that implement API" OFF
+ "NOT MINGW" ON)
+
+if (USE_MINIMAL_DEBUG_INFO)
+ target_compile_options(WTF PRIVATE -g0 -O1)
+ target_compile_options(JavaScriptCore PRIVATE -g0 -O1)
+ target_compile_options(WebCore PRIVATE -g0 -O1)
+ target_compile_options(WebCoreTestSupport PRIVATE -g0 -O1)
+ if (TARGET ANGLESupport)
+ target_compile_options(ANGLESupport PRIVATE -g0 -O1)
+ endif ()
+ if (TARGET gtest)
+ target_compile_options(gtest PRIVATE -g0 -O1)
+ endif ()
+endif ()
+
# GTest
-if (ENABLE_API_TESTS)
+if (TARGET gtest)
set(GTEST_DEFINITIONS QT_NO_KEYWORDS)
if (COMPILER_IS_GCC_OR_CLANG)
list(APPEND GTEST_DEFINITIONS "GTEST_API_=__attribute__((visibility(\"default\")))")
@@ -10,18 +32,60 @@ endif ()
# Installation
-target_include_directories(WebKit INTERFACE $<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/QtWebKit>)
-target_include_directories(WebKitWidgets INTERFACE $<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/QtWebKitWidgets>)
+target_compile_definitions(WebKit INTERFACE QT_WEBKIT_LIB)
+target_include_directories(WebKit INTERFACE
+ $<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}>
+ $<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/QtWebKit>
+)
+target_compile_definitions(WebKitWidgets INTERFACE QT_WEBKITWIDGETS_LIB)
+target_include_directories(WebKitWidgets INTERFACE
+ $<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}>
+ $<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/QtWebKitWidgets>
+)
+
+set(_package_footer_template "
+####### Expanded from QTWEBKIT_PACKAGE_FOOTER variable #######
+
+set(Qt5@MODULE_NAME@_LIBRARIES Qt5::@MODULE_NAME@)
+set(Qt5@MODULE_NAME@_VERSION_STRING \${Qt5@MODULE_NAME@_VERSION})
+set(Qt5@MODULE_NAME@_EXECUTABLE_COMPILE_FLAGS \"\")
+set(Qt5@MODULE_NAME@_PRIVATE_INCLUDE_DIRS \"\") # FIXME: Support private headers
+
+get_target_property(Qt5@MODULE_NAME@_INCLUDE_DIRS Qt5::@MODULE_NAME@ INTERFACE_INCLUDE_DIRECTORIES)
+get_target_property(Qt5@MODULE_NAME@_COMPILE_DEFINITIONS Qt5::@MODULE_NAME@ INTERFACE_COMPILE_DEFINITIONS)
+
+foreach (_module_dep \${_Qt5@MODULE_NAME@_MODULE_DEPENDENCIES})
+ list(APPEND Qt5@MODULE_NAME@_INCLUDE_DIRS \${Qt5\${_module_dep}_INCLUDE_DIRS})
+ list(APPEND Qt5@MODULE_NAME@_PRIVATE_INCLUDE_DIRS \${Qt5\${_module_dep}_PRIVATE_INCLUDE_DIRS})
+ list(APPEND Qt5@MODULE_NAME@_DEFINITIONS \${Qt5\${_module_dep}_DEFINITIONS})
+ list(APPEND Qt5@MODULE_NAME@_COMPILE_DEFINITIONS \${Qt5\${_module_dep}_COMPILE_DEFINITIONS})
+ list(APPEND Qt5@MODULE_NAME@_EXECUTABLE_COMPILE_FLAGS \${Qt5\${_module_dep}_EXECUTABLE_COMPILE_FLAGS})
+endforeach ()
+list(REMOVE_DUPLICATES Qt5@MODULE_NAME@_INCLUDE_DIRS)
+list(REMOVE_DUPLICATES Qt5@MODULE_NAME@_PRIVATE_INCLUDE_DIRS)
+list(REMOVE_DUPLICATES Qt5@MODULE_NAME@_DEFINITIONS)
+list(REMOVE_DUPLICATES Qt5@MODULE_NAME@_COMPILE_DEFINITIONS)
+list(REMOVE_DUPLICATES Qt5@MODULE_NAME@_EXECUTABLE_COMPILE_FLAGS)
+")
+
+set(MODULE_NAME WebKit)
+string(CONFIGURE ${_package_footer_template} QTWEBKIT_PACKAGE_FOOTER @ONLY)
ecm_configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/Qt5WebKitConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/Qt5WebKitConfig.cmake"
INSTALL_DESTINATION "${KDE_INSTALL_CMAKEPACKAGEDIR}/Qt5WebKit"
)
+
+set(MODULE_NAME WebKitWidgets)
+string(CONFIGURE ${_package_footer_template} QTWEBKIT_PACKAGE_FOOTER @ONLY)
ecm_configure_package_config_file("${CMAKE_CURRENT_SOURCE_DIR}/Qt5WebKitWidgetsConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/Qt5WebKitWidgetsConfig.cmake"
INSTALL_DESTINATION "${KDE_INSTALL_CMAKEPACKAGEDIR}/Qt5WebKitWidgets"
)
+unset(MODULE_NAME)
+unset(QTWEBKIT_PACKAGE_FOOTER)
+
write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/Qt5WebKitConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion)
diff --git a/Source/Qt5WebKitConfig.cmake.in b/Source/Qt5WebKitConfig.cmake.in
index c8107dac4..34e9aadca 100644
--- a/Source/Qt5WebKitConfig.cmake.in
+++ b/Source/Qt5WebKitConfig.cmake.in
@@ -5,3 +5,8 @@ find_dependency(Qt5Gui @Qt5_VERSION@ EXACT)
find_dependency(Qt5Network @Qt5_VERSION@ EXACT)
include("${CMAKE_CURRENT_LIST_DIR}/WebKitTargets.cmake")
+
+set(_Qt5WebKit_MODULE_DEPENDENCIES "Gui;Network;Core")
+set(Qt5WebKit_DEFINITIONS -DQT_WEBKIT_LIB)
+
+@QTWEBKIT_PACKAGE_FOOTER@
diff --git a/Source/Qt5WebKitWidgetsConfig.cmake.in b/Source/Qt5WebKitWidgetsConfig.cmake.in
index a96879a89..ade62eeae 100644
--- a/Source/Qt5WebKitWidgetsConfig.cmake.in
+++ b/Source/Qt5WebKitWidgetsConfig.cmake.in
@@ -8,3 +8,8 @@ find_dependency(Qt5Widgets @Qt5_VERSION@ EXACT)
find_dependency(Qt5WebKit @PROJECT_VERSION_STRING@ EXACT)
include("${CMAKE_CURRENT_LIST_DIR}/Qt5WebKitWidgetsTargets.cmake")
+
+set(_Qt5WebKitWidgets_MODULE_DEPENDENCIES "WebKit;Widgets;Gui;Network;Core")
+set(Qt5WebKitWidgets_DEFINITIONS -DQT_WEBKITWIDGETS_LIB)
+
+@QTWEBKIT_PACKAGE_FOOTER@
diff --git a/Source/WebCore/PlatformQt.cmake b/Source/WebCore/PlatformQt.cmake
index 26883021a..2e649507d 100644
--- a/Source/WebCore/PlatformQt.cmake
+++ b/Source/WebCore/PlatformQt.cmake
@@ -88,7 +88,6 @@ list(APPEND WebCore_SOURCES
platform/graphics/qt/IntPointQt.cpp
platform/graphics/qt/IntRectQt.cpp
platform/graphics/qt/IntSizeQt.cpp
- platform/graphics/qt/QFramebufferPaintDevice.cpp
platform/graphics/qt/PathQt.cpp
platform/graphics/qt/PatternQt.cpp
platform/graphics/qt/StillImageQt.cpp
@@ -198,6 +197,13 @@ if (ENABLE_NETSCAPE_PLUGIN_API AND WIN32)
)
endif ()
+if (ENABLE_SMOOTH_SCROLLING)
+ list(APPEND WebCore_SOURCES
+ platform/ScrollAnimationSmooth.cpp
+ platform/ScrollAnimatorSmooth.cpp
+ )
+endif ()
+
# Do it in the WebCore to support SHARED_CORE since WebKitWidgets won't load WebKit in that case.
# This should match the opposite statement in WebKit/PlatformQt.cmake
if (SHARED_CORE)
@@ -265,6 +271,8 @@ if (ENABLE_OPENGL)
platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
platform/graphics/opengl/TemporaryOpenGLSetting.cpp
+
+ platform/graphics/qt/QFramebufferPaintDevice.cpp
)
if (${Qt5Gui_OPENGL_IMPLEMENTATION} STREQUAL GLESv2)
diff --git a/Source/WebCore/platform/ScrollAnimationSmooth.cpp b/Source/WebCore/platform/ScrollAnimationSmooth.cpp
index c8f5d5dc0..14bccf74a 100644
--- a/Source/WebCore/platform/ScrollAnimationSmooth.cpp
+++ b/Source/WebCore/platform/ScrollAnimationSmooth.cpp
@@ -228,36 +228,66 @@ static inline double releaseArea(ScrollAnimationSmooth::Curve curve, double star
static inline void getAnimationParametersForGranularity(ScrollGranularity granularity, double& animationTime, double& repeatMinimumSustainTime, double& attackTime, double& releaseTime, ScrollAnimationSmooth::Curve& coastTimeCurve, double& maximumCoastTime)
{
+ // Qt uses a slightly different strategy for the animation with a steep attack curve and natural release curve.
+ // The fast acceleration makes the animation look more responsive to user input.
switch (granularity) {
case ScrollByDocument:
animationTime = 20 * tickTime;
repeatMinimumSustainTime = 10 * tickTime;
+#if !PLATFORM(QT)
attackTime = 10 * tickTime;
releaseTime = 10 * tickTime;
coastTimeCurve = ScrollAnimationSmooth::Curve::Linear;
maximumCoastTime = 1;
+#else
+ attackTime = 6 * tickTime;
+ releaseTime = 10 * tickTime;
+ coastTimeCurve = ScrollAnimationSmooth::Curve::Quadratic;
+ maximumCoastTime = 22;
+#endif
break;
case ScrollByLine:
+#if !PLATFORM(QT)
animationTime = 10 * tickTime;
repeatMinimumSustainTime = 7 * tickTime;
attackTime = 3 * tickTime;
releaseTime = 3 * tickTime;
+#else
+ animationTime = 6 * tickTime;
+ repeatMinimumSustainTime = 5 * tickTime;
+ attackTime = 1 * tickTime;
+ releaseTime = 4 * tickTime;
+#endif
coastTimeCurve = ScrollAnimationSmooth::Curve::Linear;
maximumCoastTime = 1;
break;
case ScrollByPage:
+#if !PLATFORM(QT)
animationTime = 15 * tickTime;
repeatMinimumSustainTime = 10 * tickTime;
attackTime = 5 * tickTime;
releaseTime = 5 * tickTime;
+#else
+ animationTime = 12 * tickTime;
+ repeatMinimumSustainTime = 10 * tickTime;
+ attackTime = 3 * tickTime;
+ releaseTime = 6 * tickTime;
+#endif
coastTimeCurve = ScrollAnimationSmooth::Curve::Linear;
maximumCoastTime = 1;
break;
case ScrollByPixel:
+#if !PLATFORM(QT)
animationTime = 11 * tickTime;
repeatMinimumSustainTime = 2 * tickTime;
attackTime = 3 * tickTime;
releaseTime = 3 * tickTime;
+#else
+ animationTime = 8 * tickTime;
+ repeatMinimumSustainTime = 3 * tickTime;
+ attackTime = 2 * tickTime;
+ releaseTime = 5 * tickTime;
+#endif
coastTimeCurve = ScrollAnimationSmooth::Curve::Quadratic;
maximumCoastTime = 1.25;
break;
@@ -344,7 +374,11 @@ bool ScrollAnimationSmooth::updatePerAxisData(PerAxisData& data, ScrollGranulari
}
double releaseSpot = (data.releaseTime - releaseTimeLeft) / data.releaseTime;
+#if !PLATFORM(QT)
double releaseAreaLeft = releaseArea(Curve::Cubic, releaseSpot, 1) * data.releaseTime;
+#else
+ double releaseAreaLeft = releaseArea(Curve::Quadratic, releaseSpot, 1) * data.releaseTime;
+#endif
data.desiredVelocity = remainingDelta / (attackAreaLeft + sustainTimeLeft + releaseAreaLeft);
data.releasePosition = data.desiredPosition - data.desiredVelocity * releaseAreaLeft;
@@ -386,7 +420,11 @@ bool ScrollAnimationSmooth::animateScroll(PerAxisData& data, double currentTime)
else {
// release is based on targeting the exact final position.
double releaseDeltaT = deltaTime - (data.animationTime - data.releaseTime);
+#if !PLATFORM(QT)
newPosition = releaseCurve(Curve::Cubic, releaseDeltaT, data.releaseTime, data.releasePosition, data.desiredPosition);
+#else
+ newPosition = releaseCurve(Curve::Quadratic, releaseDeltaT, data.releaseTime, data.releasePosition, data.desiredPosition);
+#endif
}
// Normalize velocity to a per second amount. Could be used to check for jank.
diff --git a/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp b/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp
index f0e7f23e7..8685e7c90 100644
--- a/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp
+++ b/Source/WebCore/platform/graphics/texmap/BitmapTexturePool.cpp
@@ -116,7 +116,7 @@ void BitmapTexturePool::releaseUnusedTexturesTimerFired()
RefPtr<BitmapTexture> BitmapTexturePool::createTexture(const BitmapTexture::Flags flags)
{
-#if PLATFORM(QT)
+#if PLATFORM(QT) && USE(TEXTURE_MAPPER_GL)
if (!m_context3D)
return BitmapTextureImageBuffer::create();
#endif
diff --git a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index e94367287..211cf892a 100644
--- a/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -85,9 +85,7 @@ void FormDataIODevice::prepareFormElements()
if (!m_formData)
return;
-#if ENABLE(BLOB)
m_formData = m_formData->resolveBlobReferences();
-#endif
// Take a deep copy of the FormDataElements
m_formElements = m_formData->elements();
@@ -102,14 +100,10 @@ qint64 FormDataIODevice::computeSize()
m_dataSize += element.m_data.size();
else {
QFileInfo fi(element.m_filename);
-#if ENABLE(BLOB)
qint64 fileEnd = fi.size();
if (element.m_fileLength != BlobDataItem::toEndOfFile)
fileEnd = qMin<qint64>(fi.size(), element.m_fileStart + element.m_fileLength);
m_fileSize += qMax<qint64>(0, fileEnd - element.m_fileStart);
-#else
- m_fileSize += fi.size();
-#endif
}
}
return m_dataSize + m_fileSize;
@@ -150,7 +144,6 @@ void FormDataIODevice::openFileForCurrentElement()
m_currentFile->setFileName(m_formElements[0].m_filename);
m_currentFile->open(QFile::ReadOnly);
-#if ENABLE(BLOB)
if (isValidFileTime(m_formElements[0].m_expectedFileModificationTime)) {
QFileInfo info(*m_currentFile);
if (!info.exists() || static_cast<time_t>(m_formElements[0].m_expectedFileModificationTime) < info.lastModified().toTime_t()) {
@@ -160,7 +153,6 @@ void FormDataIODevice::openFileForCurrentElement()
}
if (m_formElements[0].m_fileStart)
m_currentFile->seek(m_formElements[0].m_fileStart);
-#endif
}
// m_formElements[0] is the current item. If the destination buffer is
@@ -185,10 +177,8 @@ qint64 FormDataIODevice::readData(char* destination, qint64 size)
moveToNextElement();
} else if (element.m_type == FormDataElement::Type::EncodedFile) {
quint64 toCopy = available;
-#if ENABLE(BLOB)
if (element.m_fileLength != BlobDataItem::toEndOfFile)
toCopy = qMin<qint64>(toCopy, element.m_fileLength - m_currentDelta);
-#endif
const QByteArray data = m_currentFile->read(toCopy);
memcpy(destination+copied, data.constData(), data.size());
m_currentDelta += data.size();
@@ -196,10 +186,8 @@ qint64 FormDataIODevice::readData(char* destination, qint64 size)
if (m_currentFile->atEnd() || !m_currentFile->isOpen())
moveToNextElement();
-#if ENABLE(BLOB)
else if (element.m_fileLength != BlobDataItem::toEndOfFile && m_currentDelta == element.m_fileLength)
moveToNextElement();
-#endif
}
}
diff --git a/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp b/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp
index 83c50062d..d74073ec5 100644
--- a/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp
+++ b/Source/WebCore/platform/network/qt/ResourceRequestQt.cpp
@@ -22,11 +22,8 @@
#include "ResourceRequest.h"
#include "ThirdPartyCookiesQt.h"
-#if ENABLE(BLOB)
#include "BlobData.h"
#include "BlobRegistryImpl.h"
-#include "BlobStorageData.h"
-#endif
#include <qglobal.h>
@@ -46,10 +43,9 @@ unsigned initializeMaximumHTTPConnectionCountPerHost()
return 6 * (1 + 3 + 2);
}
-#if ENABLE(BLOB)
static void appendBlobResolved(QByteArray& data, const QUrl& url, QString* contentType = 0)
{
- RefPtr<BlobStorageData> blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(url);
+ RefPtr<BlobData> blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(url);
if (!blobData)
return;
@@ -60,12 +56,11 @@ static void appendBlobResolved(QByteArray& data, const QUrl& url, QString* conte
const BlobDataItemList::const_iterator itend = blobData->items().end();
for (; it != itend; ++it) {
const BlobDataItem& blobItem = *it;
- if (blobItem.type == BlobDataItem::Data)
- data.append(blobItem.data->data() + static_cast<int>(blobItem.offset), static_cast<int>(blobItem.length));
- else if (blobItem.type == BlobDataItem::Blob)
- appendBlobResolved(data, blobItem.url);
- else if (blobItem.type == BlobDataItem::File) {
+ if (blobItem.type() == BlobDataItem::Type::Data)
+ data.append(reinterpret_cast<const char*>(blobItem.data().data()->data()) + static_cast<int>(blobItem.offset()), static_cast<int>(blobItem.length()));
+ else if (blobItem.type() == BlobDataItem::Type::File) {
// File types are not allowed here, so just ignore it.
+ RELEASE_ASSERT_WITH_MESSAGE(false, "File types are not allowed here");
} else
ASSERT_NOT_REACHED();
}
@@ -73,7 +68,7 @@ static void appendBlobResolved(QByteArray& data, const QUrl& url, QString* conte
static void resolveBlobUrl(const QUrl& url, QUrl& resolvedUrl)
{
- RefPtr<BlobStorageData> blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(url);
+ RefPtr<BlobData> blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(url);
if (!blobData)
return;
@@ -87,7 +82,6 @@ static void resolveBlobUrl(const QUrl& url, QUrl& resolvedUrl)
dataUri.append(QString::fromLatin1(data.toBase64()));
resolvedUrl = QUrl(dataUri);
}
-#endif
static inline QByteArray stringToByteArray(const String& string)
{
@@ -101,10 +95,8 @@ QNetworkRequest ResourceRequest::toNetworkRequest(NetworkingContext *context) co
QNetworkRequest request;
QUrl newurl = url();
-#if ENABLE(BLOB)
if (newurl.scheme() == QLatin1String("blob"))
resolveBlobUrl(url(), newurl);
-#endif
request.setUrl(newurl);
request.setOriginatingObject(context ? context->originatingObject() : 0);
diff --git a/Source/WebKit/CMakeLists.txt b/Source/WebKit/CMakeLists.txt
index b48cc319e..081858daa 100644
--- a/Source/WebKit/CMakeLists.txt
+++ b/Source/WebKit/CMakeLists.txt
@@ -57,7 +57,6 @@ WEBKIT_FRAMEWORK(WebKit)
set_target_properties(WebKit PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
install(TARGETS WebKit EXPORT WebKitTargets
DESTINATION "${LIB_INSTALL_DIR}"
- INCLUDES DESTINATION "${KDE_INSTALL_INCLUDEDIR}/QtWebKitWidgets"
RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
)
diff --git a/Source/WebKit/PlatformQt.cmake b/Source/WebKit/PlatformQt.cmake
index 30b1a377a..61fb76047 100644
--- a/Source/WebKit/PlatformQt.cmake
+++ b/Source/WebKit/PlatformQt.cmake
@@ -171,6 +171,7 @@ list(APPEND WebKit_SOURCES
qt/Api/qwebhistory.cpp
qt/Api/qwebhistoryinterface.cpp
qt/Api/qwebkitglobal.cpp
+ qt/Api/qwebkitplatformplugin.h
qt/Api/qwebplugindatabase.cpp
qt/Api/qwebpluginfactory.cpp
qt/Api/qwebscriptworld.cpp
@@ -470,7 +471,7 @@ else ()
set(WebKit_LIBRARY_TYPE SHARED)
endif ()
-if (APPLE)
+if (APPLE AND NOT QT_STATIC_BUILD)
set(WebKit_OUTPUT_NAME QtWebKit)
else ()
set(WebKit_OUTPUT_NAME Qt5WebKit)
@@ -668,7 +669,7 @@ else ()
set(WebKitWidgets_LIBRARY_TYPE SHARED)
endif ()
-if (APPLE)
+if (APPLE AND NOT QT_STATIC_BUILD)
set(WebKitWidgets_OUTPUT_NAME QtWebKitWidgets)
else ()
set(WebKitWidgets_OUTPUT_NAME Qt5WebKitWidgets)
@@ -680,7 +681,6 @@ add_dependencies(WebKitWidgets WebKit)
set_target_properties(WebKitWidgets PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
install(TARGETS WebKitWidgets EXPORT Qt5WebKitWidgetsTargets
DESTINATION "${LIB_INSTALL_DIR}"
- INCLUDES DESTINATION "${KDE_INSTALL_INCLUDEDIR}/QtWebKitWidgets"
RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
)
diff --git a/Source/WebKit/qt/Api/qwebsettings.cpp b/Source/WebKit/qt/Api/qwebsettings.cpp
index ddd617a67..ddb8f75fe 100644
--- a/Source/WebKit/qt/Api/qwebsettings.cpp
+++ b/Source/WebKit/qt/Api/qwebsettings.cpp
@@ -272,6 +272,11 @@ void QWebSettingsPrivate::apply()
global->attributes.value(QWebSettings::LocalContentCanAccessFileUrls));
settings->setAllowFileAccessFromFileURLs(value);
+ value = attributes.value(QWebSettings::AllowRunningInsecureContent,
+ global->attributes.value(QWebSettings::AllowRunningInsecureContent));
+ settings->setAllowDisplayOfInsecureContent(value);
+ settings->setAllowRunningOfInsecureContent(value);
+
value = attributes.value(QWebSettings::XSSAuditingEnabled,
global->attributes.value(QWebSettings::XSSAuditingEnabled));
settings->setXSSAuditorEnabled(value);
@@ -309,6 +314,9 @@ void QWebSettingsPrivate::apply()
settings->setFullScreenEnabled(value);
#endif
+ value = attributes.value(QWebSettings::ImagesEnabled, global->attributes.value(QWebSettings::ImagesEnabled));
+ settings->setImagesEnabled(value);
+
settings->setUsesPageCache(WebCore::PageCache::singleton().maxSize());
} else {
QList<QWebSettingsPrivate*> settings = *::allSettings();
@@ -588,6 +596,8 @@ QWebSettings::QWebSettings()
d->attributes.insert(QWebSettings::Accelerated2dCanvasEnabled, false);
d->attributes.insert(QWebSettings::WebSecurityEnabled, true);
d->attributes.insert(QWebSettings::FullScreenSupportEnabled, true);
+ d->attributes.insert(QWebSettings::ImagesEnabled, true);
+ d->attributes.insert(QWebSettings::AllowRunningInsecureContent, false);
d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
d->defaultTextEncoding = QLatin1String("iso-8859-1");
d->thirdPartyCookiePolicy = AlwaysAllowThirdPartyCookies;
diff --git a/Source/WebKit/qt/Api/qwebsettings.h b/Source/WebKit/qt/Api/qwebsettings.h
index a0b75533e..d05775e1f 100644
--- a/Source/WebKit/qt/Api/qwebsettings.h
+++ b/Source/WebKit/qt/Api/qwebsettings.h
@@ -90,7 +90,9 @@ public:
MediaSourceEnabled,
MediaEnabled,
WebSecurityEnabled,
- FullScreenSupportEnabled
+ FullScreenSupportEnabled,
+ ImagesEnabled,
+ AllowRunningInsecureContent
};
enum WebGraphic {
MissingImageGraphic,
diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake
index 5c20e97d4..8f06820c5 100644
--- a/Source/cmake/OptionsQt.cmake
+++ b/Source/cmake/OptionsQt.cmake
@@ -58,6 +58,15 @@ set(CMAKE_MACOSX_RPATH ON)
add_definitions(-DBUILDING_QT__=1)
+if (WIN32)
+ if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ set(CMAKE_DEBUG_POSTFIX d)
+ endif ()
+
+ set(CMAKE_SHARED_LIBRARY_PREFIX "")
+ set(CMAKE_SHARED_MODULE_PREFIX "")
+endif ()
+
WEBKIT_OPTION_BEGIN()
if (APPLE)
@@ -161,11 +170,16 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_COLOR PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CONTROLS_SCRIPT PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NOTIFICATIONS PRIVATE ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SMOOTH_SCROLLING PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_USERSELECT_ALL PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIDEO_TRACK PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_TIMING PRIVATE ON)
WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEBGL PRIVATE ON)
+if (MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_JIT PRIVATE OFF)
+endif ()
+
WEBKIT_OPTION_CONFLICT(USE_GSTREAMER USE_QT_MULTIMEDIA)
WEBKIT_OPTION_DEPEND(ENABLE_3D_TRANSFORMS ENABLE_OPENGL)
@@ -317,10 +331,10 @@ else ()
endif ()
if (MACOS_FORCE_SYSTEM_XML_LIBRARIES)
- set(LIBXML2_INCLUDE_DIR "/usr/include/libxml2")
+ set(LIBXML2_INCLUDE_DIR "${CMAKE_OSX_SYSROOT}/usr/include/libxml2")
set(LIBXML2_LIBRARIES xml2)
if (ENABLE_XSLT)
- set(LIBXSLT_INCLUDE_DIR "/usr/include/libxslt")
+ set(LIBXSLT_INCLUDE_DIR "${CMAKE_OSX_SYSROOT}/usr/include/libxslt")
set(LIBXSLT_LIBRARIES xslt)
endif ()
else ()
@@ -628,8 +642,6 @@ if (MSVC)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG:FASTLINK")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG:FASTLINK")
endif ()
-
- set(CMAKE_DEBUG_POSTFIX d)
elseif (${CMAKE_BUILD_TYPE} MATCHES "Release")
add_compile_options(/Oy-)
endif ()
diff --git a/Source/cmake/WebKitMacros.cmake b/Source/cmake/WebKitMacros.cmake
index 53f294abb..d1edb210c 100644
--- a/Source/cmake/WebKitMacros.cmake
+++ b/Source/cmake/WebKitMacros.cmake
@@ -374,7 +374,9 @@ macro(GENERATE_WEBKIT2_MESSAGE_SOURCES _output_source _input_files)
endmacro()
macro(MAKE_JS_FILE_ARRAYS _output_cpp _output_h _scripts _scripts_dependencies)
- if (WIN32)
+ if (NOT CMAKE_VERSION VERSION_LESS 3.1)
+ set(_python_path ${CMAKE_COMMAND} -E env "PYTHONPATH=${JavaScriptCore_SCRIPTS_DIR}")
+ elseif (WIN32)
set(_python_path set "PYTHONPATH=${JavaScriptCore_SCRIPTS_DIR}" &&)
else ()
set(_python_path "PYTHONPATH=${JavaScriptCore_SCRIPTS_DIR}")
diff --git a/Tools/QtTestBrowser/launcherwindow.cpp b/Tools/QtTestBrowser/launcherwindow.cpp
index c1974552e..1321760f8 100644
--- a/Tools/QtTestBrowser/launcherwindow.cpp
+++ b/Tools/QtTestBrowser/launcherwindow.cpp
@@ -1151,7 +1151,7 @@ void LauncherWindow::fileDownloadFinished()
if (fileName.isEmpty())
return;
if (m_reply->error() != QNetworkReply::NoError)
- QMessageBox::critical(this, QString("Download"), QString("Download failed."));
+ QMessageBox::critical(this, QStringLiteral("Download"), QStringLiteral("Download failed: ") + m_reply->errorString());
else {
QFile file(fileName);
file.open(QIODevice::WriteOnly);
diff --git a/Tools/qmake/mkspecs/features/functions.prf b/Tools/qmake/mkspecs/features/functions.prf
index 831e01a98..3a775dcfd 100644
--- a/Tools/qmake/mkspecs/features/functions.prf
+++ b/Tools/qmake/mkspecs/features/functions.prf
@@ -67,13 +67,6 @@ defineTest(isPlatformSupported) {
qtConfig(opengles2):!qtConfig(dynamicgl) {
skipBuild("QtWebKit supports only dynamic GL Qt builds on Windows at the moment.")
}
-
- CONFIG(debug, debug|release):!contains(QMAKE_HOST.arch, x86_64) {
- # debug_and_release is built as release, see Tools/qmake/projects/run_cmake.pro
- !debug_and_release {
- skipBuild("QtWebKit requires a 64-bit toolchain for debug build")
- }
- }
winrt {
skipBuild("WinRT is not supported.")
}
@@ -81,6 +74,12 @@ defineTest(isPlatformSupported) {
!isVersionAtLeast($$MSVC_VER, "14.0") {
skipBuild("QtWebKit on Windows requires MSVC 2015.")
}
+ CONFIG(debug, debug|release):!contains(QMAKE_HOST.arch, x86_64) {
+ # debug_and_release is built as release, see Tools/qmake/projects/run_cmake.pro
+ !debug_and_release {
+ skipBuild("QtWebKit requires 64-bit MSVC toolchain for debug build")
+ }
+ }
} else {
isGCCVersionSupported()
}
diff --git a/Tools/qmake/projects/run_cmake.pro b/Tools/qmake/projects/run_cmake.pro
index 1192197bd..1b8742c4a 100644
--- a/Tools/qmake/projects/run_cmake.pro
+++ b/Tools/qmake/projects/run_cmake.pro
@@ -4,7 +4,7 @@ ROOT_QT_BUILD_DIR = $$ROOT_BUILD_DIR/..
TEMPLATE = aux
-win32:!contains(QMAKE_HOST.arch, x86_64) {
+msvc:!contains(QMAKE_HOST.arch, x86_64) {
debug_and_release {
warning("Skipping debug build of QtWebKit because it requires a 64-bit toolchain")
CONFIG -= debug_and_release debug
@@ -62,6 +62,17 @@ build_pass|!debug_and_release {
CMAKE_CONFIG += QT_CONAN_DIR=$$ROOT_BUILD_DIR
}
+ macos {
+ # Reuse the cached sdk version value from mac/sdk.prf if available
+ # otherwise query for it.
+ QMAKE_MAC_SDK_PATH = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.Path)
+ isEmpty(QMAKE_MAC_SDK_PATH) {
+ QMAKE_MAC_SDK_PATH = $$system("/usr/bin/xcodebuild -sdk $${QMAKE_MAC_SDK} -version Path 2>/dev/null")
+ }
+ exists($$QMAKE_MAC_SDK_PATH): CMAKE_CONFIG += CMAKE_OSX_SYSROOT=$$QMAKE_MAC_SDK_PATH
+ !isEmpty($$QMAKE_MACOSX_DEPLOYMENT_TARGET): CMAKE_CONFIG += CMAKE_OSX_DEPLOYMENT_TARGET=$$QMAKE_MACOSX_DEPLOYMENT_TARGET
+ }
+
equals(QMAKE_HOST.os, Windows) {
if(equals(MAKEFILE_GENERATOR, MSVC.NET)|equals(MAKEFILE_GENERATOR, MSBUILD)) {
cmake_generator = "NMake Makefiles JOM"
diff --git a/Tools/qt/jhbuild-qt-5.4.modules b/Tools/qt/jhbuild-qt-5.4.modules
index 924a19a6b..fc85f6ee0 100644
--- a/Tools/qt/jhbuild-qt-5.4.modules
+++ b/Tools/qt/jhbuild-qt-5.4.modules
@@ -62,6 +62,8 @@
repo="download.qt.io"
hash="sha256:daea240ba5e77bc2d78ec21a2cb664eed83b3d4ad409b6277a6f7d4c0c8e91d1">
<patch file="qtbase-5.4-fontconfig-fix.patch" strip="1"/>
+ <patch file="qtbase-5.4-no-sslv3.patch" strip="1"/>
+ <patch file="qtbase-5.4-no-sslv2_3.patch" strip="1"/>
</branch>
<dependencies>
<dep package="fontconfig"/>
diff --git a/Tools/qt/jhbuild.modules b/Tools/qt/jhbuild.modules
index 9a10e9f39..f59f198df 100644
--- a/Tools/qt/jhbuild.modules
+++ b/Tools/qt/jhbuild.modules
@@ -51,8 +51,8 @@
href="http://webkitgtk.org/jhbuild_mirror/"/>
<repository type="tarball" name="nice.freedesktop.org"
href="http://nice.freedesktop.org/"/>
- <repository type="tarball" name="people.freedesktop.org"
- href="http://people.freedesktop.org"/>
+ <repository type="tarball" name="mesa.freedesktop.org"
+ href="http://mesa.freedesktop.org"/>
<repository type="tarball" name="llvm.org"
href="http://llvm.org"/>
@@ -102,6 +102,8 @@
<branch module="/pub/GNOME/sources/glib/2.44/glib-2.44.1.tar.xz" version="2.44.1"
repo="ftp.gnome.org"
hash="sha256:8811deacaf8a503d0a9b701777ea079ca6a4277be10e3d730d2112735d5eca07">
+ <patch file="glib-warning-fix.patch" strip="1"/>
+ <patch file="gdate-suppress-string-format-literal-warning.patch" strip="1"/>
</branch>
</autotools>
@@ -231,7 +233,7 @@
<branch repo="github.com" module="EricssonResearch/openwebrtc-gst-plugins.git" checkoutdir="gst-plugins-openwebrtc" tag="e359b67484af90f416ea35e301205d2b53c77a14"/>
</autotools>
- <autotools id="libnice">
+ <autotools id="libnice" supports-non-srcdir-builds="no">
<dependencies>
<dep package="gstreamer"/>
</dependencies>
@@ -267,7 +269,7 @@
</autotools>
<autotools id="llvm"
- autogenargs="--enable-optimized --disable-terminfo --disable-zlib --enable-targets=host --disable-backtraces --disable-crash-overrides --disable-expensive-checks --disable-debug-runtime --disable-assertions --enable-shared">
+ autogenargs="--enable-optimized --disable-terminfo --disable-zlib --enable-targets=host --disable-backtraces --disable-crash-overrides --disable-expensive-checks --disable-debug-runtime --disable-assertions --enable-shared --enable-bindings=none">
<branch repo="llvm.org"
module="/releases/3.7.0/llvm-3.7.0.src.tar.xz" version="3.7.0" checkoutdir="llvm-3.7.0"
hash="sha256:ab45895f9dcdad1e140a3a79fd709f64b05ad7364e308c0e582c5b02e9cc3153"/>
@@ -276,9 +278,9 @@
<autotools id="mesa" autogenargs="--enable-xlib-glx --disable-dri --disable-egl --with-gallium-drivers=swrast" skip-install="true">
<!--- WARNING: At jhbuildrc, when we define the path to the Gallium llvmpipe software rasterizer (needed by XvfbDriver),
we assume that the directory is named "Mesa". So, don't change the checkoutdir name even if you update the version. -->
- <branch module="/~brianp/mesa/11.0.6/mesa-11.0.6.tar.xz" version="11.0.6"
+ <branch module="/archive/older-versions/11.x/11.0.6/mesa-11.0.6.tar.xz" version="11.0.6"
checkoutdir="Mesa"
- repo="people.freedesktop.org"
+ repo="mesa.freedesktop.org"
hash="sha256:8340e64cdc91999840404c211496f3de38e7b4cb38db34e2f72f1642c5134760">
</branch>
<dependencies>
diff --git a/Tools/qt/make-snapshot.pl b/Tools/qt/make-snapshot.pl
index 316fe7b35..667890de0 100755
--- a/Tools/qt/make-snapshot.pl
+++ b/Tools/qt/make-snapshot.pl
@@ -53,7 +53,7 @@ my @commands = (
"tar -xf $src_repo/snapshot.tar --strip-components=1",
"git add -A",
"rm $src_repo/snapshot.tar",
- "git commit -m 'Imported WebKit commit $commit'"
+ "git commit -m 'Import WebKit commit $commit'"
);
my $cmd = join " && ", @commands;
diff --git a/Tools/qt/patches/gdate-suppress-string-format-literal-warning.patch b/Tools/qt/patches/gdate-suppress-string-format-literal-warning.patch
new file mode 100644
index 000000000..90cb951a1
--- /dev/null
+++ b/Tools/qt/patches/gdate-suppress-string-format-literal-warning.patch
@@ -0,0 +1,29 @@
+From 3a7efd598d39366c2c9de0def2fdfb35e5e9f2a1 Mon Sep 17 00:00:00 2001
+From: coypu <coypu@sdf.org>
+Date: Mon, 8 Feb 2016 00:06:06 +0200
+Subject: [PATCH 1/1] gdate: Suppress string format literal warning
+
+Newer versions of GCC emit an error here, but we know it's safe.
+https://bugzilla.gnome.org/761550
+---
+ glib/gdate.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/glib/gdate.c b/glib/gdate.c
+index 4aece02..cdc735c 100644
+--- a/glib/gdate.c
++++ b/glib/gdate.c
+@@ -2494,7 +2494,10 @@ g_date_strftime (gchar *s,
+ * recognize whether strftime actually failed or just returned "".
+ */
+ tmpbuf[0] = '\1';
++ #pragma GCC diagnostic push
++ #pragma GCC diagnostic ignored "-Wformat-nonliteral"
+ tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
++ #pragma GCC diagnostic pop
+
+ if (tmplen == 0 && tmpbuf[0] != '\0')
+ {
+--
+2.7.0
+
diff --git a/Tools/qt/patches/glib-warning-fix.patch b/Tools/qt/patches/glib-warning-fix.patch
new file mode 100644
index 000000000..f2c873be5
--- /dev/null
+++ b/Tools/qt/patches/glib-warning-fix.patch
@@ -0,0 +1,34 @@
+From 9f90ee5eeccd47f39c7a03dcd786b125a19c195d Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro@gnome.org>
+Date: Sat, 13 Jun 2015 22:52:33 -0500
+Subject: [PATCH] genmarshal: silence register storage class warnings
+
+Using the register keyword triggers warnings on noteworthy compilers
+(clang), since it's deprecated in C++ and at danger of being removed
+from the language. There is no reason to use it since it isn't 1980
+anymore.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=750918
+---
+ gobject/glib-genmarshal.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gobject/glib-genmarshal.c b/gobject/glib-genmarshal.c
+index be4151a..ca78a6f 100644
+--- a/gobject/glib-genmarshal.c
++++ b/gobject/glib-genmarshal.c
+@@ -412,9 +412,9 @@ generate_marshal (const gchar *signame,
+ g_fprintf (fout, "%s%s data2);\n", indent (ind), pad ("gpointer"));
+
+ /* cfile marshal variables */
+- g_fprintf (fout, " register GMarshalFunc_%s callback;\n", signame);
+- g_fprintf (fout, " register GCClosure *cc = (GCClosure*) closure;\n");
+- g_fprintf (fout, " register gpointer data1, data2;\n");
++ g_fprintf (fout, " GMarshalFunc_%s callback;\n", signame);
++ g_fprintf (fout, " GCClosure *cc = (GCClosure*) closure;\n");
++ g_fprintf (fout, " gpointer data1, data2;\n");
+ if (sig->rarg->setter)
+ g_fprintf (fout, " %s v_return;\n", sig->rarg->ctype);
+
+--
+2.4.2
diff --git a/Tools/qt/patches/qtbase-5.4-no-sslv2_3.patch b/Tools/qt/patches/qtbase-5.4-no-sslv2_3.patch
new file mode 100644
index 000000000..21cd1c787
--- /dev/null
+++ b/Tools/qt/patches/qtbase-5.4-no-sslv2_3.patch
@@ -0,0 +1,89 @@
+From 027571c8c3efe8b1451fb73b74be7e617db1899f Mon Sep 17 00:00:00 2001
+From: Daniel Molkentin <danimo@owncloud.com>
+Date: Fri, 10 Apr 2015 09:57:29 +0200
+Subject: [PATCH 1/1] Also add support for linked OpenSSL without SSL v2 & v3
+ support
+
+So far, this was only supported for dlopen mode. This adds symmetric
+defines for the linking case.
+
+Change-Id: I9cbfa18e04d041dde0cbd833929782cada9eb812
+Reviewed-by: Richard J. Moore <rich@kde.org>
+---
+ src/network/ssl/qsslsocket_openssl_symbols.cpp | 4 ++++
+ src/network/ssl/qsslsocket_openssl_symbols_p.h | 16 ++++++++++++++++
+ 2 files changed, 20 insertions(+)
+
+diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
+index 332b64264e..042c593e62 100644
+--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
++++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
+@@ -312,13 +312,17 @@ DEFINEFUNC(const SSL_METHOD *, TLSv1_1_server_method, DUMMYARG, DUMMYARG, return
+ DEFINEFUNC(const SSL_METHOD *, TLSv1_2_server_method, DUMMYARG, DUMMYARG, return 0, return)
+ #endif
+ #else
++#ifndef OPENSSL_NO_SSL2
+ DEFINEFUNC(SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
++#endif
+ #ifndef OPENSSL_NO_SSL3_METHOD
+ DEFINEFUNC(SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
+ #endif
+ DEFINEFUNC(SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
+ DEFINEFUNC(SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
++#ifndef OPENSSL_NO_SSL2
+ DEFINEFUNC(SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
++#endif
+ #ifndef OPENSSL_NO_SSL3_METHOD
+ DEFINEFUNC(SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
+ #endif
+diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
+index 626c049629..a15bf4b87d 100644
+--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
++++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
+@@ -363,27 +363,43 @@ typedef unsigned int (*q_psk_client_callback_t)(SSL *ssl, const char *hint, char
+ void q_SSL_set_psk_client_callback(SSL *ssl, q_psk_client_callback_t callback);
+ #endif // OPENSSL_NO_PSK
+ #if OPENSSL_VERSION_NUMBER >= 0x10000000L
++#ifndef OPENSSL_NO_SSL2
+ const SSL_METHOD *q_SSLv2_client_method();
++#endif
++#ifndef OPENSSL_NO_SSL3_METHOD
+ const SSL_METHOD *q_SSLv3_client_method();
++#endif
+ const SSL_METHOD *q_SSLv23_client_method();
+ const SSL_METHOD *q_TLSv1_client_method();
+ const SSL_METHOD *q_TLSv1_1_client_method();
+ const SSL_METHOD *q_TLSv1_2_client_method();
++#ifndef OPENSSL_NO_SSL2
+ const SSL_METHOD *q_SSLv2_server_method();
++#endif
++#ifndef OPENSSL_NO_SSL3_METHOD
+ const SSL_METHOD *q_SSLv3_server_method();
++#endif
+ const SSL_METHOD *q_SSLv23_server_method();
+ const SSL_METHOD *q_TLSv1_server_method();
+ const SSL_METHOD *q_TLSv1_1_server_method();
+ const SSL_METHOD *q_TLSv1_2_server_method();
+ #else
++#ifndef OPENSSL_NO_SSL2
+ SSL_METHOD *q_SSLv2_client_method();
++#endif
++#ifndef OPENSSL_NO_SSL3_METHOD
+ SSL_METHOD *q_SSLv3_client_method();
++#endif
+ SSL_METHOD *q_SSLv23_client_method();
+ SSL_METHOD *q_TLSv1_client_method();
+ SSL_METHOD *q_TLSv1_1_client_method();
+ SSL_METHOD *q_TLSv1_2_client_method();
++#ifndef OPENSSL_NO_SSL2
+ SSL_METHOD *q_SSLv2_server_method();
++#endif
++#ifndef OPENSSL_NO_SSL3_METHOD
+ SSL_METHOD *q_SSLv3_server_method();
++#endif
+ SSL_METHOD *q_SSLv23_server_method();
+ SSL_METHOD *q_TLSv1_server_method();
+ SSL_METHOD *q_TLSv1_1_server_method();
+--
+2.11.0
+
diff --git a/Tools/qt/patches/qtbase-5.4-no-sslv3.patch b/Tools/qt/patches/qtbase-5.4-no-sslv3.patch
new file mode 100644
index 000000000..6724d9564
--- /dev/null
+++ b/Tools/qt/patches/qtbase-5.4-no-sslv3.patch
@@ -0,0 +1,100 @@
+From 6839aead0430a9b07b60fa3a1a7d685fe5d2d1ef Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= <aklitzing@gmail.com>
+Date: Fri, 9 Jan 2015 11:53:17 +0100
+Subject: [PATCH 1/1] Fix compile error if openssl is built with no-ssl3-method
+
+Since openssl 1.0.1k with enabled option no-ssl3-method we need to
+check for OPENSSL_NO_SSL3_METHOD to use following functions:
+
+- SSLv3_method
+- SSLv3_server_method
+- SSLv3_client_method
+
+Change-Id: Iee83a6f4bacbf5660baa6bdb89eb02ceb9f11614
+Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
+---
+ src/network/ssl/qsslcontext_openssl.cpp | 6 ++++++
+ src/network/ssl/qsslsocket_openssl_symbols.cpp | 12 ++++++++++++
+ 2 files changed, 18 insertions(+)
+
+diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp
+index 92e726bc01..18eef2fc60 100644
+--- a/src/network/ssl/qsslcontext_openssl.cpp
++++ b/src/network/ssl/qsslcontext_openssl.cpp
+@@ -138,7 +138,13 @@ init_context:
+ #endif
+ break;
+ case QSsl::SslV3:
++#ifndef OPENSSL_NO_SSL3_METHOD
+ sslContext->ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method());
++#else
++ // SSL 3 not supported by the system, but chosen deliberately -> error
++ sslContext->ctx = 0;
++ unsupportedProtocol = true;
++#endif
+ break;
+ case QSsl::SecureProtocols:
+ // SSLv2 and SSLv3 will be disabled by SSL options
+diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
+index ea6e84adef..c1fea930d0 100644
+--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
++++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
+@@ -270,7 +270,9 @@ DEFINEFUNC(SSL_SESSION*, SSL_get_session, const SSL *ssl, ssl, return 0, return)
+ #ifndef OPENSSL_NO_SSL2
+ DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
+ #endif
++#ifndef OPENSSL_NO_SSL3_METHOD
+ DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
++#endif
+ DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
+ DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
+ #if OPENSSL_VERSION_NUMBER >= 0x10001000L
+@@ -280,7 +282,9 @@ DEFINEFUNC(const SSL_METHOD *, TLSv1_2_client_method, DUMMYARG, DUMMYARG, return
+ #ifndef OPENSSL_NO_SSL2
+ DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
+ #endif
++#ifndef OPENSSL_NO_SSL3_METHOD
+ DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
++#endif
+ DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
+ DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
+ #if OPENSSL_VERSION_NUMBER >= 0x10001000L
+@@ -289,11 +293,15 @@ DEFINEFUNC(const SSL_METHOD *, TLSv1_2_server_method, DUMMYARG, DUMMYARG, return
+ #endif
+ #else
+ DEFINEFUNC(SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return)
++#ifndef OPENSSL_NO_SSL3_METHOD
+ DEFINEFUNC(SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return)
++#endif
+ DEFINEFUNC(SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return)
+ DEFINEFUNC(SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return)
+ DEFINEFUNC(SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return)
++#ifndef OPENSSL_NO_SSL3_METHOD
+ DEFINEFUNC(SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return)
++#endif
+ DEFINEFUNC(SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return)
+ DEFINEFUNC(SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return)
+ #endif
+@@ -799,7 +807,9 @@ bool q_resolveOpenSslSymbols()
+ #ifndef OPENSSL_NO_SSL2
+ RESOLVEFUNC(SSLv2_client_method)
+ #endif
++#ifndef OPENSSL_NO_SSL3_METHOD
+ RESOLVEFUNC(SSLv3_client_method)
++#endif
+ RESOLVEFUNC(SSLv23_client_method)
+ RESOLVEFUNC(TLSv1_client_method)
+ #if OPENSSL_VERSION_NUMBER >= 0x10001000L
+@@ -809,7 +819,9 @@ bool q_resolveOpenSslSymbols()
+ #ifndef OPENSSL_NO_SSL2
+ RESOLVEFUNC(SSLv2_server_method)
+ #endif
++#ifndef OPENSSL_NO_SSL3_METHOD
+ RESOLVEFUNC(SSLv3_server_method)
++#endif
+ RESOLVEFUNC(SSLv23_server_method)
+ RESOLVEFUNC(TLSv1_server_method)
+ #if OPENSSL_VERSION_NUMBER >= 0x10001000L
+--
+2.11.0
+