From 747609969d3a8bd95ed2293bb5d943660188ede4 Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Sun, 2 Oct 2016 01:14:19 +0300 Subject: Imported WebKit commit fbdeb5a5c78f666271a638ba10137127bcea61f4 Change-Id: Ie14bf4e3f1f1f7e3b9e5cf60e69a7572dd481006 Reviewed-by: Konstantin Tokarev --- Source/PlatformQt.cmake | 11 +++++++---- Source/WebCore/bridge/qt/qt_runtime.cpp | 9 ++++----- Source/WebCore/platform/qt/RenderThemeQStyle.cpp | 24 ++++++++++++++---------- Source/WebCore/platform/qt/RenderThemeQStyle.h | 4 ++-- Source/WebCore/platform/qt/RenderThemeQt.cpp | 8 ++++---- Source/WebCore/platform/qt/RenderThemeQt.h | 4 ++-- Source/WebKit/CMakeLists.txt | 1 + Source/WebKit/PlatformQt.cmake | 1 + Source/cmake/KDEInstallDirs.cmake | 8 ++++++++ Source/cmake/OptionsQt.cmake | 2 +- Tools/qt/make-snapshot.pl | 2 -- 11 files changed, 44 insertions(+), 30 deletions(-) diff --git a/Source/PlatformQt.cmake b/Source/PlatformQt.cmake index 7556ff163..684595cce 100644 --- a/Source/PlatformQt.cmake +++ b/Source/PlatformQt.cmake @@ -72,12 +72,15 @@ if (NOT TARGET Qt5::qhelpgenerator) endif () query_qmake(QT_INSTALL_DOCS QT_INSTALL_DOCS) -#set(QDOC_CONFIG "${DERIVED_SOURCES_DIR}/qtwebkit.qdocconf") set(QDOC_CONFIG "${CMAKE_SOURCE_DIR}/Source/qtwebkit.qdocconf") set(DOC_OUTPUT_DIR "${CMAKE_BINARY_DIR}/doc") -set(DOC_INSTALL_DIR "doc") set(PROJECT_VERSION_TAG ${PROJECT_VERSION_MAJOR}${PROJECT_VERSION_MINOR}${PROJECT_VERSION_MICRO}) -#configure_file(qtwebkit.qdocconf.in ${QDOC_CONFIG} @ONLY) + +if (KDE_INSTALL_USE_QT_SYS_PATHS) + set(DOC_INSTALL_DIR ${QT_INSTALL_DOCS}) +else () + set(DOC_INSTALL_DIR "doc") +endif () if (WIN32) set(EXPORT_VAR set) @@ -124,6 +127,6 @@ add_custom_target(docs) add_dependencies(docs qch_docs) if (GENERATE_DOCUMENTATION) - install(DIRECTORY ${DOC_OUTPUT_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX}) + install(DIRECTORY "${DOC_OUTPUT_DIR}/qtwebkit" DESTINATION ${DOC_INSTALL_DIR}) install(FILES "${DOC_OUTPUT_DIR}/qtwebkit.qch" DESTINATION ${DOC_INSTALL_DIR}) endif () diff --git a/Source/WebCore/bridge/qt/qt_runtime.cpp b/Source/WebCore/bridge/qt/qt_runtime.cpp index 6912422d0..84335e8ca 100644 --- a/Source/WebCore/bridge/qt/qt_runtime.cpp +++ b/Source/WebCore/bridge/qt/qt_runtime.cpp @@ -1589,12 +1589,11 @@ void QtConnectionObject::execute(void** argv) args[i] = convertQVariantToValue(m_context, m_rootObject, QVariant(argType, argv[i+1]), ignoredException); } - JSValueRef call_exception = 0; + JSValueRef callException = 0; ExecState* exec = toJS(m_context); - JSObjectCallAsFunction(m_context, m_receiverFunction, m_receiver, argc, args.data(), &call_exception); - if (call_exception) { - WebCore::reportException(exec, toJS(exec, call_exception)); - } + JSObjectCallAsFunction(m_context, m_receiverFunction, m_receiver, argc, args.data(), &callException); + if (callException) + WebCore::reportException(exec, toJS(exec, callException)); } bool QtConnectionObject::match(JSContextRef context, QObject* sender, int signalIndex, JSObjectRef receiver, JSObjectRef receiverFunction) diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp index b9c6953fa..edc252d1d 100644 --- a/Source/WebCore/platform/qt/RenderThemeQStyle.cpp +++ b/Source/WebCore/platform/qt/RenderThemeQStyle.cpp @@ -191,21 +191,25 @@ template static void inflateCheckBoxRectImpl(T& originalRect, const QRect& rect) { if (!rect.isNull()) { - int dx = static_cast((rect.width() - originalRect.width()) / 2); - originalRect.setX(originalRect.x() - dx); - originalRect.setWidth(rect.width()); - int dy = static_cast((rect.height() - originalRect.height()) / 2); - originalRect.setY(originalRect.y() - dy); - originalRect.setHeight(rect.height()); + if (rect.width() > originalRect.width()) { + int dx = static_cast((rect.width() - originalRect.width()) / 2); + originalRect.setX(originalRect.x() - dx); + originalRect.setWidth(rect.width()); + } + if (rect.height() > originalRect.height()) { + int dy = static_cast((rect.height() - originalRect.height()) / 2); + originalRect.setY(originalRect.y() - dy); + originalRect.setHeight(rect.height()); + } } } -void RenderThemeQStyle::computeControlRect(QStyleFacade::ButtonType part, QRect& originalRect) const +void RenderThemeQStyle::inflateControlRect(QStyleFacade::ButtonType part, QRect& originalRect) const { inflateCheckBoxRectImpl(originalRect, indicatorRect(part, originalRect)); } -void RenderThemeQStyle::computeControlRect(QStyleFacade::ButtonType part, FloatRect& originalRect) const +void RenderThemeQStyle::inflateControlRect(QStyleFacade::ButtonType part, FloatRect& originalRect) const { inflateCheckBoxRectImpl(originalRect, indicatorRect(part, enclosingIntRect(originalRect))); } @@ -365,10 +369,10 @@ bool RenderThemeQStyle::paintButton(const RenderObject& o, const PaintInfo& i, c p.styleOption.rect = inflateButtonRect(p.styleOption.rect); p.paintButton(QStyleFacade::PushButton); } else if (p.appearance == RadioPart) { - computeControlRect(QStyleFacade::RadioButton, p.styleOption.rect); + inflateControlRect(QStyleFacade::RadioButton, p.styleOption.rect); p.paintButton(QStyleFacade::RadioButton); } else if (p.appearance == CheckboxPart) { - computeControlRect(QStyleFacade::CheckBox, p.styleOption.rect); + inflateControlRect(QStyleFacade::CheckBox, p.styleOption.rect); p.paintButton(QStyleFacade::CheckBox); } diff --git a/Source/WebCore/platform/qt/RenderThemeQStyle.h b/Source/WebCore/platform/qt/RenderThemeQStyle.h index d49f5e19b..444f8292e 100644 --- a/Source/WebCore/platform/qt/RenderThemeQStyle.h +++ b/Source/WebCore/platform/qt/RenderThemeQStyle.h @@ -94,8 +94,8 @@ protected: QRect inflateButtonRect(const QRect& originalRect) const override; QRectF inflateButtonRect(const QRectF& originalRect) const override; - void computeControlRect(QStyleFacade::ButtonType, QRect& originalRect) const override; - void computeControlRect(QStyleFacade::ButtonType, FloatRect& originalRect) const override; + void inflateControlRect(QStyleFacade::ButtonType, QRect& originalRect) const override; + void inflateControlRect(QStyleFacade::ButtonType, FloatRect& originalRect) const override; void setPopupPadding(RenderStyle&) const override; diff --git a/Source/WebCore/platform/qt/RenderThemeQt.cpp b/Source/WebCore/platform/qt/RenderThemeQt.cpp index a5a48f92b..442ae9454 100644 --- a/Source/WebCore/platform/qt/RenderThemeQt.cpp +++ b/Source/WebCore/platform/qt/RenderThemeQt.cpp @@ -217,11 +217,11 @@ QRectF RenderThemeQt::inflateButtonRect(const QRectF& originalRect) const return originalRect; } -void RenderThemeQt::computeControlRect(QStyleFacade::ButtonType, QRect&) const +void RenderThemeQt::inflateControlRect(QStyleFacade::ButtonType, QRect&) const { } -void RenderThemeQt::computeControlRect(QStyleFacade::ButtonType, FloatRect&) const +void RenderThemeQt::inflateControlRect(QStyleFacade::ButtonType, FloatRect&) const { } @@ -229,10 +229,10 @@ void RenderThemeQt::adjustRepaintRect(const RenderObject& o, FloatRect& rect) { switch (o.style().appearance()) { case CheckboxPart: - computeControlRect(QStyleFacade::CheckBox, rect); + inflateControlRect(QStyleFacade::CheckBox, rect); break; case RadioPart: - computeControlRect(QStyleFacade::RadioButton, rect); + inflateControlRect(QStyleFacade::RadioButton, rect); break; case PushButtonPart: case ButtonPart: { diff --git a/Source/WebCore/platform/qt/RenderThemeQt.h b/Source/WebCore/platform/qt/RenderThemeQt.h index ee572bace..d38d299af 100644 --- a/Source/WebCore/platform/qt/RenderThemeQt.h +++ b/Source/WebCore/platform/qt/RenderThemeQt.h @@ -167,8 +167,8 @@ protected: virtual QRect inflateButtonRect(const QRect& originalRect) const; virtual QRectF inflateButtonRect(const QRectF& originalRect) const; - virtual void computeControlRect(QStyleFacade::ButtonType, QRect& originalRect) const; - virtual void computeControlRect(QStyleFacade::ButtonType, FloatRect& originalRect) const; + virtual void inflateControlRect(QStyleFacade::ButtonType, QRect& originalRect) const; + virtual void inflateControlRect(QStyleFacade::ButtonType, FloatRect& originalRect) const; virtual void setPopupPadding(RenderStyle&) const = 0; diff --git a/Source/WebKit/CMakeLists.txt b/Source/WebKit/CMakeLists.txt index cfdb79965..f316298e7 100644 --- a/Source/WebKit/CMakeLists.txt +++ b/Source/WebKit/CMakeLists.txt @@ -67,6 +67,7 @@ set_target_properties(WebKit PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${P install(TARGETS WebKit EXPORT WebKitTargets DESTINATION "${LIB_INSTALL_DIR}" INCLUDES DESTINATION "${KDE_INSTALL_INCLUDEDIR}/QtWebKitWidgets" + RUNTIME DESTINATION "${BIN_INSTALL_DIR}" ) add_dependencies(WebKit WebCore) diff --git a/Source/WebKit/PlatformQt.cmake b/Source/WebKit/PlatformQt.cmake index 7054e6784..4675a3abb 100644 --- a/Source/WebKit/PlatformQt.cmake +++ b/Source/WebKit/PlatformQt.cmake @@ -686,6 +686,7 @@ set_target_properties(WebKitWidgets PROPERTIES VERSION ${PROJECT_VERSION} SOVERS install(TARGETS WebKitWidgets EXPORT Qt5WebKitWidgetsTargets DESTINATION "${LIB_INSTALL_DIR}" INCLUDES DESTINATION "${KDE_INSTALL_INCLUDEDIR}/QtWebKitWidgets" + RUNTIME DESTINATION "${BIN_INSTALL_DIR}" ) if (USE_LINKER_VERSION_SCRIPT) diff --git a/Source/cmake/KDEInstallDirs.cmake b/Source/cmake/KDEInstallDirs.cmake index e84c0b39e..4248c859d 100644 --- a/Source/cmake/KDEInstallDirs.cmake +++ b/Source/cmake/KDEInstallDirs.cmake @@ -437,6 +437,14 @@ endif() option (KDE_INSTALL_USE_QT_SYS_PATHS "Install mkspecs files, Plugins and Imports to the Qt 5 install dir" "${_default_KDE_INSTALL_USE_QT_SYS_PATHS}") if(KDE_INSTALL_USE_QT_SYS_PATHS) + query_qmake(qt_lib_dir QT_INSTALL_LIBS) + query_qmake(qt_install_prefix QT_INSTALL_PREFIX) + file(RELATIVE_PATH LIB_INSTALL_DIR ${qt_install_prefix} ${qt_lib_dir}) + set(KDE_INSTALL_LIBDIR ${LIB_INSTALL_DIR}) + + set(CMAKECONFIG_INSTALL_PREFIX "${LIB_INSTALL_DIR}/cmake") + set(KDE_INSTALL_CMAKEPACKAGEDIR "${LIB_INSTALL_DIR}/cmake") + # Qt-specific vars query_qmake(qt_plugins_dir QT_INSTALL_PLUGINS) diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake index 6e709f0c9..5b0212fa0 100644 --- a/Source/cmake/OptionsQt.cmake +++ b/Source/cmake/OptionsQt.cmake @@ -41,7 +41,7 @@ endmacro() set(PROJECT_VERSION_MAJOR 5) set(PROJECT_VERSION_MINOR 602) -set(PROJECT_VERSION_MICRO 1) +set(PROJECT_VERSION_MICRO 2) set(PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_MICRO}) set(PROJECT_VERSION_STRING "${PROJECT_VERSION}") diff --git a/Tools/qt/make-snapshot.pl b/Tools/qt/make-snapshot.pl index b8a527e3f..27c5621d6 100755 --- a/Tools/qt/make-snapshot.pl +++ b/Tools/qt/make-snapshot.pl @@ -28,8 +28,6 @@ my @commands = ( "Tools/gtk/make-dist.py -t snapshot Tools/qt/manifest.txt", "cd $target_repo", "git rm -rf *", - "git reset -- dist LICENSE.LGPLv21", - "git checkout -- dist LICENSE.LGPLv21", "tar -xf $src_repo/snapshot.tar --strip-components=1", "git add -A", "rm $src_repo/snapshot.tar", -- cgit v1.2.1