summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-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
14 files changed, 166 insertions, 41 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}")