summaryrefslogtreecommitdiff
path: root/Source/WebKit
diff options
context:
space:
mode:
authorKonstantin Tokarev <annulen@yandex.ru>2017-04-21 06:12:49 +0300
committerKonstantin Tokarev <annulen@yandex.ru>2017-04-22 08:43:17 +0000
commitbd3f57b00bee3088971209a0ebc513eb1ef4ba14 (patch)
tree651d181d7348d440ff164909e8480297e4e7f18e /Source/WebKit
parent3b7091813e38631b9ca03ce9657c170ee8826439 (diff)
downloadqtwebkit-bd3f57b00bee3088971209a0ebc513eb1ef4ba14.tar.gz
Import WebKit commit 584c4a7a6a8bffb60f03b9eb10a65dbcf41dc0b7
Change-Id: Ife943bbbd8226afa05ef6320b10ba351d55fd797 Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebKit')
-rw-r--r--Source/WebKit/PlatformQt.cmake48
-rw-r--r--Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp17
-rw-r--r--Source/WebKit/qt/tests/CMakeLists.txt2
-rw-r--r--Source/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp14
-rw-r--r--Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp4
5 files changed, 54 insertions, 31 deletions
diff --git a/Source/WebKit/PlatformQt.cmake b/Source/WebKit/PlatformQt.cmake
index aa95a86e0..6b6e0562e 100644
--- a/Source/WebKit/PlatformQt.cmake
+++ b/Source/WebKit/PlatformQt.cmake
@@ -392,17 +392,38 @@ install(
set(WEBKIT_PKGCONGIG_DEPS "Qt5Core Qt5Gui Qt5Network")
set(WEBKIT_PRI_DEPS "core gui network")
-set(WEBKIT_PRI_RUNTIME_DEPS "sensors positioning qml quick webchannel core_private gui_private")
set(WEBKIT_PRI_EXTRA_LIBS "")
-set(WEBKITWIDGETS_PKGCONGIG_DEPS "Qt5Core Qt5Gui Qt5Network Qt5Widgets Qt5WebKit")
-set(WEBKITWIDGETS_PRI_DEPS "core gui network widgets webkit")
-set(WEBKITWIDGETS_PRI_RUNTIME_DEPS "sensors positioning widgets_private opengl sql core_private gui_private")
+set(WEBKIT_PRI_RUNTIME_DEPS "core_private gui_private")
+
+if (QT_WEBCHANNEL)
+ set(WEBKIT_PRI_RUNTIME_DEPS "webchannel ${WEBKIT_PRI_RUNTIME_DEPS}")
+endif ()
+if (ENABLE_WEBKIT2)
+ set(WEBKIT_PRI_RUNTIME_DEPS "qml quick ${WEBKIT_PRI_RUNTIME_DEPS}")
+endif ()
+if (ENABLE_GEOLOCATION)
+ set(WEBKIT_PRI_RUNTIME_DEPS "positioning ${WEBKIT_PRI_RUNTIME_DEPS}")
+endif ()
+if (ENABLE_DEVICE_ORIENTATION)
+ set(WEBKIT_PRI_RUNTIME_DEPS "sensors ${WEBKIT_PRI_RUNTIME_DEPS}")
+endif ()
+
+set(WEBKITWIDGETS_PKGCONGIG_DEPS "${WEBKIT_PKGCONGIG_DEPS} Qt5Widgets Qt5WebKit")
+set(WEBKITWIDGETS_PRI_DEPS "${WEBKIT_PRI_DEPS} widgets webkit")
+set(WEBKITWIDGETS_PRI_RUNTIME_DEPS "${WEBKIT_PRI_RUNTIME_DEPS} widgets_private")
+
+if (Qt5OpenGL_FOUND)
+ set(WEBKITWIDGETS_PRI_RUNTIME_DEPS "${WEBKITWIDGETS_PRI_RUNTIME_DEPS} opengl")
+endif ()
+
+if (ENABLE_PRINT_SUPPORT)
+ set(WEBKITWIDGETS_PRI_RUNTIME_DEPS "${WEBKITWIDGETS_PRI_RUNTIME_DEPS} printsupport")
+endif ()
+
if (QT_STATIC_BUILD)
if (MSVC)
set(LIB_PREFIX "lib")
endif ()
- set(WEBKIT_PKGCONGIG_DEPS "${WEBKIT_PKGCONGIG_DEPS} Qt5Sql")
- set(WEBKIT_PRI_DEPS "${WEBKIT_PRI_DEPS} sql")
set(WEBKITWIDGETS_PKGCONGIG_DEPS "${WEBKITWIDGETS_PKGCONGIG_DEPS} Qt5PrintSupport")
set(WEBKITWIDGETS_PRI_DEPS "${WEBKITWIDGETS_PRI_DEPS} printsupport")
set(EXTRA_LIBS_NAMES WebCore JavaScriptCore WTF xml2)
@@ -428,9 +449,6 @@ if (QT_STATIC_BUILD)
set(WEBKIT_PKGCONGIG_DEPS "${WEBKIT_PKGCONGIG_DEPS} ${LIB_PREFIX}${LIB_NAME}")
set(WEBKIT_PRI_EXTRA_LIBS "${WEBKIT_PRI_EXTRA_LIBS} -l${LIB_PREFIX}${LIB_NAME}")
endforeach ()
-else ()
- set(WEBKIT_PRI_RUNTIME_DEPS "${WEBKIT_PRI_RUNTIME_DEPS} sql")
- set(WEBKITWIDGETS_PRI_RUNTIME_DEPS "${WEBKITWIDGETS_PRI_RUNTIME_DEPS} printsupport")
endif ()
if (NOT MACOS_BUILD_FRAMEWORKS)
@@ -445,12 +463,13 @@ endif ()
if (KDE_INSTALL_USE_QT_SYS_PATHS)
set(WebKit_PRI_ARGUMENTS
+ BIN_INSTALL_DIR "$$QT_MODULE_BIN_BASE"
LIB_INSTALL_DIR "$$QT_MODULE_LIB_BASE"
)
if (MACOS_BUILD_FRAMEWORKS)
list(APPEND WebKit_PRI_ARGUMENTS
INCLUDE_INSTALL_DIR "$$QT_MODULE_LIB_BASE/QtWebKit.framework/Headers"
- MODULE_CONFIG "v2 lib_bundle"
+ MODULE_CONFIG "lib_bundle"
)
else ()
list(APPEND WebKit_PRI_ARGUMENTS
@@ -465,7 +484,7 @@ else ()
if (MACOS_BUILD_FRAMEWORKS)
list(APPEND WebKit_PRI_ARGUMENTS
INCLUDE_INSTALL_DIR "${LIB_INSTALL_DIR}/QtWebKit.framework/Headers"
- MODULE_CONFIG "v2 lib_bundle"
+ MODULE_CONFIG "lib_bundle"
)
else ()
list(APPEND WebKit_PRI_ARGUMENTS
@@ -483,6 +502,7 @@ endif ()
ecm_generate_pri_file(
BASE_NAME webkit
+ NAME QtWebKit
LIB_NAME ${WebKit_OUTPUT_NAME}
INCLUDE_INSTALL_DIR "${KDE_INSTALL_INCLUDEDIR}/QtWebKit"
DEPS "${WEBKIT_PRI_DEPS}"
@@ -633,12 +653,13 @@ endif ()
if (KDE_INSTALL_USE_QT_SYS_PATHS)
set(WebKitWidgets_PRI_ARGUMENTS
+ BIN_INSTALL_DIR "$$QT_MODULE_BIN_BASE"
LIB_INSTALL_DIR "$$QT_MODULE_LIB_BASE"
)
if (MACOS_BUILD_FRAMEWORKS)
list(APPEND WebKitWidgets_PRI_ARGUMENTS
INCLUDE_INSTALL_DIR "$$QT_MODULE_LIB_BASE/QtWebKitWidgets.framework/Headers"
- MODULE_CONFIG "v2 lib_bundle"
+ MODULE_CONFIG "lib_bundle"
)
else ()
list(APPEND WebKitWidgets_PRI_ARGUMENTS
@@ -653,7 +674,7 @@ else ()
if (MACOS_BUILD_FRAMEWORKS)
list(APPEND WebKitWidgets_PRI_ARGUMENTS
INCLUDE_INSTALL_DIR "${LIB_INSTALL_DIR}/QtWebKitWidgets.framework/Headers"
- MODULE_CONFIG "v2 lib_bundle"
+ MODULE_CONFIG "lib_bundle"
)
else ()
list(APPEND WebKitWidgets_PRI_ARGUMENTS
@@ -671,6 +692,7 @@ endif ()
ecm_generate_pri_file(
BASE_NAME webkitwidgets
+ NAME QtWebKitWidgets
LIB_NAME ${WebKitWidgets_OUTPUT_NAME}
INCLUDE_INSTALL_DIR "${KDE_INSTALL_INCLUDEDIR}/QtWebKitWidgets"
DEPS "${WEBKITWIDGETS_PRI_DEPS}"
diff --git a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 76038cbc0..50f91e203 100644
--- a/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -565,9 +565,8 @@ void FrameLoaderClientQt::finishedLoading(DocumentLoader*)
{
if (!m_pluginView)
return;
- if (m_pluginView->isPluginView())
- m_pluginView->didFinishLoading();
- m_pluginView = 0;
+ m_pluginView->didFinishLoading();
+ m_pluginView = nullptr;
m_hasSentResponseToPlugin = false;
}
@@ -803,8 +802,7 @@ void FrameLoaderClientQt::setMainDocumentError(WebCore::DocumentLoader* loader,
{
if (!m_pluginView)
return;
- if (m_pluginView->isPluginView())
- m_pluginView->didFail(error);
+ m_pluginView->didFail(error);
m_pluginView = 0;
m_hasSentResponseToPlugin = false;
}
@@ -820,7 +818,7 @@ void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader* loader, const c
loader->cancelMainResourceLoad(pluginWillHandleLoadError(loader->response()));
// We re-check here as the plugin can have been created.
- if (m_pluginView && m_pluginView->isPluginView()) {
+ if (m_pluginView) {
if (!m_hasSentResponseToPlugin) {
m_pluginView->didReceiveResponse(loader->response());
// The function didReceiveResponse sets up a new stream to the plug-in.
@@ -1496,9 +1494,12 @@ RefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, HTML
void FrameLoaderClientQt::redirectDataToPlugin(Widget* pluginWidget)
{
+ if (!pluginWidget || !pluginWidget->isPluginView()) {
+ m_pluginView = nullptr;
+ return;
+ }
m_pluginView = toPluginView(pluginWidget);
- if (pluginWidget)
- m_hasSentResponseToPlugin = false;
+ m_hasSentResponseToPlugin = false;
}
PassRefPtr<Widget> FrameLoaderClientQt::createJavaAppletWidget(const IntSize& pluginSize, HTMLAppletElement* element, const URL& url, const Vector<String>& paramNames, const Vector<String>& paramValues)
diff --git a/Source/WebKit/qt/tests/CMakeLists.txt b/Source/WebKit/qt/tests/CMakeLists.txt
index 685896bfe..2691196b3 100644
--- a/Source/WebKit/qt/tests/CMakeLists.txt
+++ b/Source/WebKit/qt/tests/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.12)
+remove_definitions(-DQT_ASCII_CAST_WARNINGS)
include_directories(
"${CMAKE_SOURCE_DIR}/Source"
diff --git a/Source/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp b/Source/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
index 9d6425ad6..17488ebb9 100644
--- a/Source/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
+++ b/Source/WebKit/qt/tests/qwebhistory/tst_qwebhistory.cpp
@@ -126,7 +126,7 @@ void tst_QWebHistory::count()
void tst_QWebHistory::back()
{
for (int i = histsize;i > 1;i--) {
- QCOMPARE(page->mainFrame()->toPlainText(), QString("page") + QString::number(i));
+ QCOMPARE(page->mainFrame()->toPlainText(), QStringLiteral("page%1").arg(i));
hist->back();
loadFinishedBarrier->ensureSignalEmitted();
}
@@ -147,13 +147,13 @@ void tst_QWebHistory::forward()
}
for (int i = 1;i < histsize;i++) {
- QCOMPARE(page->mainFrame()->toPlainText(), QString("page") + QString::number(i));
+ QCOMPARE(page->mainFrame()->toPlainText(), QStringLiteral("page%1").arg(i));
hist->forward();
loadFinishedBarrier->ensureSignalEmitted();
}
//try one more time (too many). crash test
hist->forward();
- QCOMPARE(page->mainFrame()->toPlainText(), QString("page") + QString::number(histsize));
+ QCOMPARE(page->mainFrame()->toPlainText(), QStringLiteral("page%1").arg(histsize));
}
/**
@@ -162,7 +162,7 @@ void tst_QWebHistory::forward()
void tst_QWebHistory::itemAt()
{
for (int i = 1;i < histsize;i++) {
- QCOMPARE(hist->itemAt(i - 1).title(), QString("page") + QString::number(i));
+ QCOMPARE(hist->itemAt(i - 1).title(), QStringLiteral("page%1").arg(i));
QVERIFY(hist->itemAt(i - 1).isValid());
}
//check out of range values
@@ -197,7 +197,7 @@ void tst_QWebHistory::items()
//check order
for (int i = 1;i <= histsize;i++) {
- QCOMPARE(items.at(i - 1).title(), QString("page") + QString::number(i));
+ QCOMPARE(items.at(i - 1).title(), QStringLiteral("page%1").arg(i));
}
}
@@ -226,7 +226,7 @@ void tst_QWebHistory::serialize_1()
//check order of historyItems
QList<QWebHistoryItem> items = hist->items();
for (int i = 1;i <= histsize;i++) {
- QCOMPARE(items.at(i - 1).title(), QString("page") + QString::number(i));
+ QCOMPARE(items.at(i - 1).title(), QStringLiteral("page%1").arg(i));
}
}
@@ -241,7 +241,7 @@ void tst_QWebHistory::serialize_2()
QDataStream load(&tmp, QIODevice::ReadOnly); //from here data will be loaded
// Force a "same document" navigation.
- frame->load(frame->url().toString() + QLatin1String("#dummyAnchor"));
+ frame->load(QUrl(frame->url().toString() + QLatin1String("#dummyAnchor")));
int initialCurrentIndex = hist->currentItemIndex();
diff --git a/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 67fe242f9..e545c5c0f 100644
--- a/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/Source/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -596,8 +596,8 @@ void tst_QWebPage::userStyleSheet()
TestNetworkManager* networkManager = new TestNetworkManager(m_page);
m_page->setNetworkAccessManager(networkManager);
- m_page->settings()->setUserStyleSheetUrl(QUrl("data:text/css;charset=utf-8;base64,"
- + QByteArray("p { background-image: url('http://does.not/exist.png');}").toBase64()));
+ m_page->settings()->setUserStyleSheetUrl(QUrl(QString::fromLatin1("data:text/css;charset=utf-8;base64,"
+ + QByteArray("p { background-image: url('http://does.not/exist.png');}").toBase64())));
m_view->setHtml("<p>hello world</p>");
QVERIFY(::waitForSignal(m_view, SIGNAL(loadFinished(bool))));