diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-10 13:08:05 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-11 09:25:42 +0200 |
commit | 5909e6d0d10de3e1370b3ea0bc596f580101e3b4 (patch) | |
tree | 6acc39b8ea0165562d480f1c54608c6c4ae9f865 /Tools | |
parent | beaeeb99881184fd368c121fcbb1a31c78b794a3 (diff) | |
parent | 81cbb264cb9446c4408124d50aeff50164ad0ab4 (diff) | |
download | qtwebkit-5909e6d0d10de3e1370b3ea0bc596f580101e3b4.tar.gz |
Merge "Merge remote-tracking branch 'origin/5.212' into dev"
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/QtTestBrowser/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tools/QtTestBrowser/launcherwindow.cpp | 37 | ||||
-rw-r--r-- | Tools/QtTestBrowser/launcherwindow.h | 4 | ||||
-rw-r--r-- | Tools/QtTestBrowser/mainwindow.cpp | 1 | ||||
-rw-r--r-- | Tools/QtTestBrowser/webpage.cpp | 21 | ||||
-rw-r--r-- | Tools/QtTestBrowser/webpage.h | 2 | ||||
-rwxr-xr-x | Tools/Scripts/build-webkit | 8 | ||||
-rwxr-xr-x | Tools/Scripts/webkitdirs.pm | 7 | ||||
-rw-r--r-- | Tools/Scripts/webkitperl/FeatureList.pm | 2 | ||||
-rw-r--r-- | Tools/TestWebKitAPI/PlatformQt.cmake | 2 | ||||
-rw-r--r-- | Tools/qmake/projects/qtjpeg/qtjpeg.pro | 14 | ||||
-rw-r--r-- | Tools/qmake/projects/run_cmake.pro | 14 | ||||
-rw-r--r-- | Tools/qt/jhbuild-qt-5.4.modules | 1 | ||||
-rw-r--r-- | Tools/qt/jhbuild.modules | 61 | ||||
-rwxr-xr-x | Tools/qt/make-release.pl | 69 | ||||
-rwxr-xr-x | Tools/qt/make-snapshot.pl | 2 | ||||
-rw-r--r-- | Tools/qt/manifest.txt | 3 | ||||
-rw-r--r-- | Tools/qt/patches/fontconfig-2.11.1-no-bitmaps.patch | 10 | ||||
-rw-r--r-- | Tools/qt/patches/openwebrtc-no-gtk-doc.patch | 60 | ||||
-rw-r--r-- | Tools/qt/patches/qtbase-5.4-fix-QTBUG-77231.patch | 50 | ||||
-rwxr-xr-x | Tools/qt/update-wip-qtwebkit-refs | 47 |
21 files changed, 243 insertions, 176 deletions
diff --git a/Tools/QtTestBrowser/CMakeLists.txt b/Tools/QtTestBrowser/CMakeLists.txt index ccd8e0ff2..19827fd02 100644 --- a/Tools/QtTestBrowser/CMakeLists.txt +++ b/Tools/QtTestBrowser/CMakeLists.txt @@ -48,6 +48,10 @@ qt_wrap_cpp(WebKit QtTestBrowser_SOURCES webinspector.h ) +qt5_add_resources(QtTestBrowser_SOURCES + QtTestBrowser.qrc +) + if (Qt5OpenGL_FOUND) list(APPEND QtTestBrowser_SYSTEM_INCLUDE_DIRECTORIES ${Qt5OpenGL_INCLUDE_DIRS} diff --git a/Tools/QtTestBrowser/launcherwindow.cpp b/Tools/QtTestBrowser/launcherwindow.cpp index 716a6e3e8..6e9d388e9 100644 --- a/Tools/QtTestBrowser/launcherwindow.cpp +++ b/Tools/QtTestBrowser/launcherwindow.cpp @@ -106,6 +106,8 @@ LauncherWindow::LauncherWindow(WindowOptions* data, QGraphicsScene* sharedScene) createChrome(); #if !defined(QT_NO_FILEDIALOG) && !defined(QT_NO_MESSAGEBOX) connect(page(), SIGNAL(downloadRequested(const QNetworkRequest&)), this, SLOT(downloadRequest(const QNetworkRequest&))); + connect(page()->networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)), + this, SLOT(showSSLErrorConfirmation(QNetworkReply*, const QList<QSslError>&))); #endif } @@ -222,6 +224,7 @@ void LauncherWindow::applyPrefs() settings->setAttribute(QWebSettings::TiledBackingStoreEnabled, m_windowOptions.useTiledBackingStore); settings->setAttribute(QWebSettings::FrameFlatteningEnabled, m_windowOptions.useFrameFlattening); settings->setAttribute(QWebSettings::WebGLEnabled, m_windowOptions.useWebGL); + settings->setAttribute(QWebSettings::MediaEnabled, m_windowOptions.useMedia); m_windowOptions.useWebAudio = settings->testAttribute(QWebSettings::WebAudioEnabled); m_windowOptions.useMediaSource = settings->testAttribute(QWebSettings::MediaSourceEnabled); @@ -326,6 +329,15 @@ void LauncherWindow::createChrome() toggleWebGL->setEnabled(false); #endif + QAction* toggleMedia = toolsMenu->addAction("Toggle Media", this, SLOT(toggleMedia(bool))); + toggleMedia->setCheckable(true); +#if ENABLE(VIDEO) + toggleMedia->setChecked(settings->testAttribute(QWebSettings::MediaEnabled)); +#else + toggleMedia->setChecked(false); + toggleMedia->setEnabled(false); +#endif + QAction* toggleWebAudio = toolsMenu->addAction("Toggle WebAudio", this, SLOT(toggleWebAudio(bool))); toggleWebAudio->setCheckable(true); #if ENABLE(WEB_AUDIO) @@ -336,7 +348,7 @@ void LauncherWindow::createChrome() QAction* toggleMediaSource = toolsMenu->addAction("Toggle MediaSource", this, SLOT(toggleMediaSource(bool))); toggleMediaSource->setCheckable(true); - toggleWebGL->setChecked(settings->testAttribute(QWebSettings::MediaSourceEnabled)); + toggleMediaSource->setChecked(settings->testAttribute(QWebSettings::MediaSourceEnabled)); #if !ENABLE(MEDIA_SOURCE) toggleMediaSource->setEnabled(false); #endif @@ -948,6 +960,12 @@ void LauncherWindow::toggleWebGL(bool toggle) page()->settings()->setAttribute(QWebSettings::WebGLEnabled, toggle); } +void LauncherWindow::toggleMedia(bool toggle) +{ + m_windowOptions.useMedia = toggle; + page()->settings()->setAttribute(QWebSettings::MediaEnabled, toggle); +} + void LauncherWindow::toggleWebAudio(bool toggle) { m_windowOptions.useWebAudio = toggle; @@ -1142,6 +1160,23 @@ void LauncherWindow::showUserAgentDialog() delete dialog; } +void LauncherWindow::showSSLErrorConfirmation(QNetworkReply* reply, const QList<QSslError>& errors) +{ + QString errorStrings = "<ul>"; + for (const QSslError& error : errors) + errorStrings += "<li>" + error.errorString() + "</li>"; + errorStrings += "</ul>"; + + QMessageBox sslWarningBox; + sslWarningBox.setText("TLS handshake problem"); + sslWarningBox.setInformativeText(errorStrings); + sslWarningBox.setStandardButtons(QMessageBox::Abort | QMessageBox::Ignore); + sslWarningBox.setDefaultButton(QMessageBox::Abort); + sslWarningBox.setIcon(QMessageBox::Warning); + if (sslWarningBox.exec() == QMessageBox::Ignore) + reply->ignoreSslErrors(); +} + void LauncherWindow::loadURLListFromFile() { QString selectedFile; diff --git a/Tools/QtTestBrowser/launcherwindow.h b/Tools/QtTestBrowser/launcherwindow.h index e475a8022..8a8baeeda 100644 --- a/Tools/QtTestBrowser/launcherwindow.h +++ b/Tools/QtTestBrowser/launcherwindow.h @@ -72,6 +72,7 @@ public: bool useCompositing { false }; bool useTiledBackingStore { false }; bool useWebGL { false }; + bool useMedia { true }; bool useWebAudio { false }; bool useMediaSource { false }; bool useFrameFlattening { false }; @@ -134,6 +135,7 @@ protected Q_SLOTS: void toggleTiledBackingStore(bool toggle); void toggleResizesToContents(bool toggle); void toggleWebGL(bool toggle); + void toggleMedia(bool toggle); void toggleWebAudio(bool toggle); void toggleMediaSource(bool toggle); void toggleSpatialNavigation(bool enable); @@ -170,6 +172,8 @@ protected Q_SLOTS: void clearSelection(); void showFPS(bool enable); void showUserAgentDialog(); + void showSSLErrorConfirmation(QNetworkReply*, const QList<QSslError>&); + void printURL(const QUrl&); #if !defined(QT_NO_FILEDIALOG) && !defined(QT_NO_MESSAGEBOX) diff --git a/Tools/QtTestBrowser/mainwindow.cpp b/Tools/QtTestBrowser/mainwindow.cpp index d342147ac..573bc77c9 100644 --- a/Tools/QtTestBrowser/mainwindow.cpp +++ b/Tools/QtTestBrowser/mainwindow.cpp @@ -43,6 +43,7 @@ #include <QFileDialog> #endif #include <QMenuBar> +#include <QMessageBox> MainWindow::MainWindow() : m_page(new WebPage(this)) diff --git a/Tools/QtTestBrowser/webpage.cpp b/Tools/QtTestBrowser/webpage.cpp index a0efed1d8..6188e4ca2 100644 --- a/Tools/QtTestBrowser/webpage.cpp +++ b/Tools/QtTestBrowser/webpage.cpp @@ -80,27 +80,6 @@ void WebPage::applyProxy() } } -bool WebPage::supportsExtension(QWebPage::Extension extension) const -{ - if (extension == ChooseMultipleFilesExtension || extension == QWebPage::ErrorPageExtension) - return true; - return false; -} - -bool WebPage::extension(Extension extension, const ExtensionOption* option, ExtensionReturn* output) -{ - if (extension == ChooseMultipleFilesExtension) - return QWebPage::extension(extension, option, output); - - const QWebPage::ErrorPageExtensionOption* info = static_cast<const QWebPage::ErrorPageExtensionOption*>(option); - QWebPage::ErrorPageExtensionReturn* errorPage = static_cast<QWebPage::ErrorPageExtensionReturn*>(output); - - errorPage->content = QString("<html><head><title>Failed loading page</title></head><body>%1</body></html>") - .arg(info->errorString).toUtf8(); - - return true; -} - bool WebPage::acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, NavigationType type) { QObject* view = parent(); diff --git a/Tools/QtTestBrowser/webpage.h b/Tools/QtTestBrowser/webpage.h index 0238354aa..77a19c14f 100644 --- a/Tools/QtTestBrowser/webpage.h +++ b/Tools/QtTestBrowser/webpage.h @@ -46,8 +46,6 @@ public: QWebPage* createWindow(QWebPage::WebWindowType) override; QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&) override; - bool supportsExtension(QWebPage::Extension) const override; - bool extension(Extension, const ExtensionOption*, ExtensionReturn*) override; bool acceptNavigationRequest(QWebFrame*, const QNetworkRequest&, NavigationType) override; diff --git a/Tools/Scripts/build-webkit b/Tools/Scripts/build-webkit index b8a4bd1e2..fbaee1c0d 100755 --- a/Tools/Scripts/build-webkit +++ b/Tools/Scripts/build-webkit @@ -240,10 +240,6 @@ if (isInspectorFrontend()) { } if (isCMakeBuild() && (!isAnyWindows() || isQt())) { - if ($shouldInstall) { - $makeArgs .= ($makeArgs ? " " : "") . "install"; - } - # Visual Studio generator doesn't support -j switch if (canUseNinja() || !isAnyWindows()) { # By default we build using all of the available CPUs. @@ -258,6 +254,10 @@ if (isCMakeBuild() && (!isAnyWindows() || isQt())) { removeCMakeCache(@featureArgs); buildCMakeProjectOrExit($clean, $prefixPath, $makeArgs, (cmakeBasedPortArguments(), @featureArgs), $cmakeArgs); + + if ($shouldInstall) { + installCMakeProjectOrExit(); + } } my $baseProductDir = baseProductDir(); diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm index 84b18c7b6..afe4af015 100755 --- a/Tools/Scripts/webkitdirs.pm +++ b/Tools/Scripts/webkitdirs.pm @@ -2145,6 +2145,13 @@ sub buildCMakeProjectOrExit($$$@) return 0; } +sub installCMakeProjectOrExit +{ + my $returnCode = exitStatus(system(qw(cmake -P cmake_install.cmake))); + exit($returnCode) if $returnCode; + return 0; +} + sub cmakeBasedPortArguments() { return (); diff --git a/Tools/Scripts/webkitperl/FeatureList.pm b/Tools/Scripts/webkitperl/FeatureList.pm index 067779122..919c85875 100644 --- a/Tools/Scripts/webkitperl/FeatureList.pm +++ b/Tools/Scripts/webkitperl/FeatureList.pm @@ -233,7 +233,7 @@ my @features = ( define => "ENABLE_CSS_REGIONS", default => 1, value => \$cssRegionsSupport }, { option => "css-compositing", desc => "Toggle CSS Compositing support", - define => "ENABLE_CSS_COMPOSITING", default => isAppleWebKit(), value => \$cssCompositingSupport }, + define => "ENABLE_CSS_COMPOSITING", default => (isAppleWebKit() || isQt()), value => \$cssCompositingSupport }, { option => "custom-elements", desc => "Toggle custom elements support", define => "ENABLE_CUSTOM_ELEMENTS", default => (isAppleMacWebKit() || isIOSWebKit()), value => \$customElementsSupport }, diff --git a/Tools/TestWebKitAPI/PlatformQt.cmake b/Tools/TestWebKitAPI/PlatformQt.cmake index c054c661b..81d98bcb5 100644 --- a/Tools/TestWebKitAPI/PlatformQt.cmake +++ b/Tools/TestWebKitAPI/PlatformQt.cmake @@ -35,7 +35,7 @@ set(test_webcore_LIBRARIES WebCore gtest ${Qt5Gui_LIBRARIES} - ${DEPEND_STATIC_LIBS} + ${STATIC_LIB_DEPENDENCIES} ) add_executable(TestWebCore diff --git a/Tools/qmake/projects/qtjpeg/qtjpeg.pro b/Tools/qmake/projects/qtjpeg/qtjpeg.pro deleted file mode 100644 index 33aa665d3..000000000 --- a/Tools/qmake/projects/qtjpeg/qtjpeg.pro +++ /dev/null @@ -1,14 +0,0 @@ -load(functions) - -TARGET = qtjpeg - -CONFIG += \ - static \ - hide_symbols \ - exceptions_off rtti_off warn_off - -load(qt_helper_lib) - -DESTDIR = $$ROOT_BUILD_DIR/lib - -include($$QTBASE_DIR/src/3rdparty/libjpeg.pri) diff --git a/Tools/qmake/projects/run_cmake.pro b/Tools/qmake/projects/run_cmake.pro index f63fcd658..5cdd40a77 100644 --- a/Tools/qmake/projects/run_cmake.pro +++ b/Tools/qmake/projects/run_cmake.pro @@ -35,15 +35,9 @@ build_pass|!debug_and_release { static_runtime: CMAKE_CONFIG += USE_STATIC_RUNTIME=ON QT_FOR_CONFIG += gui-private - !qtConfig(system-jpeg):exists($$QTBASE_DIR) { - CMAKE_CONFIG += \ - QT_BUNDLED_JPEG=1 \ - JPEG_LIBRARIES=$$staticLibPath(qtjpeg) - - exists($$QTBASE_DIR/src/3rdparty/libjpeg/src/jpeglib.h): \ - CMAKE_CONFIG += JPEG_INCLUDE_DIR=$$QTBASE_DIR/src/3rdparty/libjpeg/src - else: \ - CMAKE_CONFIG += JPEG_INCLUDE_DIR=$$QTBASE_DIR/src/3rdparty/libjpeg + !win32:!qtConfig(system-jpeg):qtConfig(jpeg) { + # Use QImageReader for JPEG + CMAKE_CONFIG += USE_LIBJPEG=OFF } !qtConfig(system-png):qtConfig(png):exists($$QTBASE_DIR) { @@ -83,6 +77,8 @@ build_pass|!debug_and_release { debug_and_release:build_all:CONFIG(debug, debug|release) { CMAKE_CONFIG += CMAKE_INSTALL_PREFIX=\"$$[QT_INSTALL_PREFIX]/debug\" } + + !qt_framework: CMAKE_CONFIG += MACOS_BUILD_FRAMEWORKS=OFF } !isEmpty(use_ninja): cmake_args += "-G Ninja" diff --git a/Tools/qt/jhbuild-qt-5.4.modules b/Tools/qt/jhbuild-qt-5.4.modules index 194335129..0bffc61a0 100644 --- a/Tools/qt/jhbuild-qt-5.4.modules +++ b/Tools/qt/jhbuild-qt-5.4.modules @@ -69,6 +69,7 @@ <patch file="qtbase-5.4-add-macros-for-enabling-disabling-warnings.patch" strip="1"/> <patch file="qtbase-5.4-fix-Clang-warning-about-inconsistent-use-of-C-11-ove.patch" strip="1"/> <patch file="qtbase-5.4-fix-gcc-Wsuggest-override-warning-on-Q_OBJECT.patch" strip="1"/> + <patch file="qtbase-5.4-fix-QTBUG-77231.patch" strip="1"/> </branch> <dependencies> <dep package="fontconfig"/> diff --git a/Tools/qt/jhbuild.modules b/Tools/qt/jhbuild.modules index b3e0c5101..2c8ba1384 100644 --- a/Tools/qt/jhbuild.modules +++ b/Tools/qt/jhbuild.modules @@ -17,7 +17,6 @@ <dep package="gst-plugins-good"/> <dep package="gst-plugins-bad"/> <dep package="gst-libav"/> - <dep package="openwebrtc"/> <dep package="qt"/> <if condition-set="linux"> <dep package="llvm"/> @@ -75,7 +74,8 @@ </branch> </autotools> - <autotools id="harfbuzz" autogen-sh="configure"> + <autotools id="harfbuzz" autogen-sh="configure" + autogenargs="--with-cairo=no"> <dependencies> <dep package="icu"/> </dependencies> @@ -107,22 +107,21 @@ </branch> </autotools> - <autotools id="fontconfig" - autogen-sh="configure" - autogenargs="--enable-libxml2"> + <autotools id="fontconfig" + autogenargs="--enable-libxml2 --disable-docs" + supports-non-srcdir-builds="no"> + <if condition-set="macos"> + <autogenargs value="--with-add-fonts=/System/Library/Fonts,/Library/Fonts,~/Library/Fonts"/> + </if> <dependencies> <dep package="freetype6"/> <dep package="libxml2"/> </dependencies> - <branch module="software/fontconfig/release/fontconfig-2.11.1.tar.gz" version="2.11.1" + <branch module="software/fontconfig/release/fontconfig-2.12.4.tar.bz2" version="2.12.4" repo="freedesktop.org" - hash="sha256:b6b066c7dce3f436fdc0dfbae9d36122b38094f4f53bd8dffd45e195b0540d8d" - md5sum="e75e303b4f7756c2b16203a57ac87eba"> - <patch file="fontconfig-2.11.1-no-bitmaps.patch" strip="0"/> - </branch> + hash="sha256:668293fcc4b3c59765cdee5cee05941091c0879edcc24dfec5455ef83912e45c"/> </autotools> - <autotools id="libxml2" supports-non-srcdir-builds="no" autogen-sh="./autogen.sh; ./configure --without-python --without-valid --without-xinclude --without-xptr --without-c14n --without-catalog --without-regexps --without-zlib --without-lzma --without-schemas --without-schematron --without-threads --without-legacy --without-http --without-iconv --with-icu"> <dependencies> @@ -221,46 +220,6 @@ md5sum="361638fa45466c5050bcde6bfe10fa46"/> </autotools> - <autotools id="libusrsctp" supports-non-srcdir-builds="no" autogen-sh="./bootstrap; ./configure --disable-warnings-as-errors"> - <branch repo="github.com" module="sctplab/usrsctp.git" checkoutdir="usrsctp" tag="078ff3252f73327e0ac11d6fd5eff62011f6646e"/> - </autotools> - - <autotools id="gst-plugins-openwebrtc" supports-parallel-builds="no" supports-non-srcdir-builds="no" autogen-sh="./autogen.sh; ./configure"> - <if condition-set="macos"> - <makeargs value="CFLAGS+=-Wno-error"/> - </if> - <dependencies> - <dep package="gst-plugins-base"/> - <dep package="libusrsctp"/> - </dependencies> - <branch repo="github.com" module="EricssonResearch/openwebrtc-gst-plugins.git" checkoutdir="gst-plugins-openwebrtc" tag="e359b67484af90f416ea35e301205d2b53c77a14"/> - </autotools> - - <autotools id="libnice" supports-non-srcdir-builds="no"> - <dependencies> - <dep package="gstreamer"/> - </dependencies> - <branch repo="nice.freedesktop.org" module="releases/libnice-0.1.10.tar.gz" checkoutdir="libnice" version="0.1.10" - hash="sha256:1dbfb663b730889ae8cab13a2913fe557d581f70b513c918bbbd0b7d3eefebc9" - md5sum="27b62d0093ce29a39df1c6fcf0bb4396" size="903083"> - </branch> - </autotools> - - <autotools id="openwebrtc" autogenargs="--enable-bridge=no --enable-owr-gst=yes --disable-tests"> - <if condition-set="macos"> - <makeargs value="CFLAGS+=-Wno-error"/> - </if> - <dependencies> - <dep package="gst-plugins-openwebrtc"/> - <dep package="libnice"/> - </dependencies> - <branch repo="github.com-tarball" module="EricssonResearch/openwebrtc/archive/13516c7f79a0c48bb411464f7613d4b426c70f5b.tar.gz" checkoutdir="openwebrtc" version="13516c7f79a0c48bb411464f7613d4b426c70f5b" - hash="sha256:c849d36d97c17a198a5d9c180f13f14c7897c9236e2384ea11029e23b09b59ac" - md5sum="13516c7f79a0c48bb411464f7613d4b426c70f5b.tar.gz" size="258936"> - <patch file="openwebrtc-no-gtk-doc.patch" strip="1"/> - </branch> - </autotools> - <autotools id="icu" autogen-sh="./source/configure" autogenargs="--disable-samples --enable-weak-threads"> diff --git a/Tools/qt/make-release.pl b/Tools/qt/make-release.pl new file mode 100755 index 000000000..facc3124f --- /dev/null +++ b/Tools/qt/make-release.pl @@ -0,0 +1,69 @@ +#!/usr/bin/env perl +# Copyright (C) 2019 Konstantin Tokarev <annulen@yandex.ru> +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +# THE POSSIBILITY OF SUCH DAMAGE. + +use Cwd; +use File::Basename; +use strict; +use warnings; + +sub usage { + my $msg = shift || ""; + die $msg . "Usage: cd snapshot/repo/path; $0 <version>"; +} + +scalar @ARGV == 1 || usage(); + +my $version = shift; + +-f "ChangeLog" && die "This script must be run in snapshots repository"; +-d ".git" || usage(); + +`LC_ALL=C LANG=C git status` =~ "nothing to commit, working tree clean" or die "Snapshots working tree is dirty"; + +my $snapshotTag = "v$version"; +my $originalTag = "qtwebkit-$version"; + +`git tag -l $snapshotTag` && print "Found $snapshotTag\n" || die "Tag $snapshotTag is not found"; +`git tag -l $originalTag` && print "Found $originalTag\n" || die "Tag $originalTag is not found"; + +my $originalTagHash = `git log -1 --format=format:"%H" $originalTag`; +chomp $originalTagHash; + +open (my $gitShow, "-|", "git show -s --format=%B $snapshotTag") or die "Failed to run git show: $!"; +while (<$gitShow>) { + if (/^Import WebKit commit ([0-9a-f]+)$/) { + print "Snaphot imported tag = $1\n"; + unless ($1 eq $originalTagHash) { + die "Imported tag '$snapshotTag' does not point to '$originalTag' ('$originalTagHash')"; + } + last; + } +} + +# Now we are ok, let's finally make tarball +my $cmd = "git archive --prefix=$originalTag/ $snapshotTag | xz -9 > $originalTag.tar.xz"; +print "$cmd\n"; +system($cmd) == 0 or die "git archive failed: $!"; + +# TODO: Upload to GitHub? diff --git a/Tools/qt/make-snapshot.pl b/Tools/qt/make-snapshot.pl index 2c2af1a9f..8b189059c 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 'Import WebKit commit $commit'" + "git commit -m 'Import QtWebKit commit $commit'" ); my $cmd = join " && ", @commands; diff --git a/Tools/qt/manifest.txt b/Tools/qt/manifest.txt index 6fe3e9546..39414cc5f 100644 --- a/Tools/qt/manifest.txt +++ b/Tools/qt/manifest.txt @@ -99,8 +99,9 @@ file Source/WebKit/win/Plugins # Version file Source/WebKit/mac/Configurations/Version.xcconfig -# Move LICENSE.LGPLv21 to the root +# Move LICENSE.LGPLv21 and README to the root file Source/WebKit/qt/LICENSE.LGPLv21 LICENSE.LGPLv21 +file Source/WebKit/qt/README README directory Source/WebInspectorUI/UserInterface/Images exclude Source/WebInspectorUI/UserInterface/Images/.* diff --git a/Tools/qt/patches/fontconfig-2.11.1-no-bitmaps.patch b/Tools/qt/patches/fontconfig-2.11.1-no-bitmaps.patch deleted file mode 100644 index 03babba2d..000000000 --- a/Tools/qt/patches/fontconfig-2.11.1-no-bitmaps.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- conf.d/Makefile.in.old 2016-06-23 19:00:01.309774583 +0300 -+++ conf.d/Makefile.in 2016-06-23 19:00:23.542159140 +0300 -@@ -341,6 +341,7 @@ - 65-fonts-persian.conf \ - 65-nonlatin.conf \ - 69-unifont.conf \ -+ 70-no-bitmaps.conf \ - 80-delicious.conf \ - 90-synthetic.conf - diff --git a/Tools/qt/patches/openwebrtc-no-gtk-doc.patch b/Tools/qt/patches/openwebrtc-no-gtk-doc.patch deleted file mode 100644 index fb665e7d2..000000000 --- a/Tools/qt/patches/openwebrtc-no-gtk-doc.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff --git a/autogen.sh b/autogen.sh -index 2c45ea9..878cf05 100755 ---- a/autogen.sh -+++ b/autogen.sh -@@ -6,27 +6,42 @@ - srcdir=`dirname $0` - (test -d $srcdir/m4) || mkdir $srcdir/m4 - --pushd $srcdir > /dev/null --gtkdocize && \ --autoreconf --verbose --force --install --make || { -- echo 'autogen.sh failed'; -- exit 1; --} -- --popd > /dev/null -- --while test "x$@" != "x" ; do --optarg=`expr "x$@" : 'x[^=]*=\(.*\)'` --case "$@" in -+for ag_option in $@ -+do -+case $ag_option in - --noconfigure) - NOCONFIGURE=defined - AUTOGEN_EXT_OPT="$AUTOGEN_EXT_OPT --noconfigure" - echo "+ configure run disabled" -- shift -+ ;; -+ --disable-gtk-doc) -+ enable_gtk_doc=no -+ echo "+ gtk-doc disabled" - ;; - esac - done - -+pushd $srcdir > /dev/null -+ -+if test x$enable_gtk_doc = xno; then -+ if test -f gtk-doc.make; then :; else -+ echo "EXTRA_DIST = missing-gtk-doc" > gtk-doc.make -+ fi -+ echo "WARNING: You have disabled gtk-doc." -+ echo " As a result, you will not be able to generate the API" -+ echo " documentation and 'make dist' will not work." -+ echo -+else -+ gtkdocize || exit $? -+fi -+ -+autoreconf --verbose --force --install --make || { -+ echo 'autogen.sh failed'; -+ exit 1; -+} -+ -+popd > /dev/null -+ - for arg do CONFIGURE_EXT_OPT="$CONFIGURE_EXT_OPT $arg"; done - if test ! -z "$CONFIGURE_EXT_OPT" - then diff --git a/Tools/qt/patches/qtbase-5.4-fix-QTBUG-77231.patch b/Tools/qt/patches/qtbase-5.4-fix-QTBUG-77231.patch new file mode 100644 index 000000000..6858e585c --- /dev/null +++ b/Tools/qt/patches/qtbase-5.4-fix-QTBUG-77231.patch @@ -0,0 +1,50 @@ +--- a/src/gui/painting/qdrawhelper.cpp 2014-12-05 19:24:36.000000000 +0300 ++++ b/src/gui/painting/qdrawhelper.cpp 2019-08-03 15:31:42.034910641 +0300 +@@ -3506,8 +3506,10 @@ + } + + /* +- if Sca.Da + Dca.Sa >= Sa.Da ++ if Sca.Da + Dca.Sa > Sa.Da + Dca' = Sa.Da + Sca.(1 - Da) + Dca.(1 - Sa) ++ else if Sca == Sa ++ Dca' = Dca.Sa + Sca.(1 - Da) + Dca.(1 - Sa) + otherwise + Dca' = Dca.Sa/(1-Sca/Sa) + Sca.(1 - Da) + Dca.(1 - Sa) + */ +@@ -3518,8 +3520,10 @@ + const int src_da = src * da; + + const int temp = src * (255 - da) + dst * (255 - sa); +- if (src_da + dst_sa >= sa_da) ++ if (src_da + dst_sa > sa_da) + return qt_div_255(sa_da + temp); ++ else if (src == sa || sa == 0) ++ return qt_div_255(temp); + else + return qt_div_255(255 * dst_sa / (255 - 255 * src / sa) + temp); + } +@@ -3589,8 +3593,10 @@ + } + + /* +- if Sca.Da + Dca.Sa <= Sa.Da ++ if Sca.Da + Dca.Sa < Sa.Da + Dca' = Sca.(1 - Da) + Dca.(1 - Sa) ++ else if Sca == 0 ++ Dca' = Dca.Sa + Sca.(1 - Da) + Dca.(1 - Sa) + otherwise + Dca' = Sa.(Sca.Da + Dca.Sa - Sa.Da)/Sca + Sca.(1 - Da) + Dca.(1 - Sa) + */ +@@ -3602,8 +3608,10 @@ + + const int temp = src * (255 - da) + dst * (255 - sa); + +- if (src == 0 || src_da + dst_sa <= sa_da) ++ if (src_da + dst_sa < sa_da) + return qt_div_255(temp); ++ else if (src == 0) ++ return qt_div_255(dst_sa + temp); + return qt_div_255(sa * (src_da + dst_sa - sa_da) / src + temp); + } + diff --git a/Tools/qt/update-wip-qtwebkit-refs b/Tools/qt/update-wip-qtwebkit-refs new file mode 100755 index 000000000..b37f31ddd --- /dev/null +++ b/Tools/qt/update-wip-qtwebkit-refs @@ -0,0 +1,47 @@ +#!/usr/bin/env perl +# Copyright (C) 2019 Konstantin Tokarev <annulen@yandex.ru> +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +# THE POSSIBILITY OF SUCH DAMAGE. + +use strict; +use warnings; + +sub usage { print "Usage: $0 <remote> <commit>\n"; exit(1); } + +my ($remote, $commit) = @ARGV; +defined $remote or usage(); +defined $commit or usage(); + +print "Remote '$remote': ", `git remote get-url $remote`, "\n"; +$? == 0 or die "git exited with code $?"; + +print `git --no-pager log --color -n1 --decorate=full $commit`; +$? == 0 or die "git exited with code $?"; + +print "\nDo you really want to switch wip/qtwebkit/5.212 to this commit? [y/N]"; +my $answer = <STDIN>; +chomp $answer; +lc $answer eq "y" or die "Got '$answer', exiting"; + +print "git push -f $remote $commit:refs/heads/wip/qtwebkit/5.212 && git push -f $remote $commit:refs/staging/wip/qtwebkit/5.212\n"; +`git push -f $remote $commit:refs/heads/wip/qtwebkit/5.212 && git push -f $remote $commit:refs/staging/wip/qtwebkit/5.212`; +$? == 0 or die "git exited with code $?"; |