diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2020-02-04 12:21:38 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2020-02-24 13:02:14 +0300 |
commit | 81909ca7f5e098682522d98d3c22018fa9bf76c1 (patch) | |
tree | 0f107f355cdd56708718ded449692881e2f929ef /Tools | |
parent | 1ee41e6e22d4ff19029e0ae28c083a8c68f02baf (diff) |
Import QtWebKit commit 148b29f49161dd4ebba296cf675bf0afa4b73bc4
Change-Id: I1ce086a99e5f254e40ac174de1120c5545ab04e3
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/QtTestBrowser/launcherwindow.cpp | 19 | ||||
-rw-r--r-- | Tools/QtTestBrowser/launcherwindow.h | 2 | ||||
-rwxr-xr-x | Tools/Scripts/webkitdirs.pm | 5 | ||||
-rwxr-xr-x | Tools/qt/generate-dependencies-yaml | 54 | ||||
-rw-r--r-- | Tools/qt/jhbuild.modules | 25 | ||||
-rw-r--r-- | Tools/qt/patches/LLVM-fix-for-new-gcc.patch | 25 |
6 files changed, 119 insertions, 11 deletions
diff --git a/Tools/QtTestBrowser/launcherwindow.cpp b/Tools/QtTestBrowser/launcherwindow.cpp index 6e9d388e9..28ec245c9 100644 --- a/Tools/QtTestBrowser/launcherwindow.cpp +++ b/Tools/QtTestBrowser/launcherwindow.cpp @@ -186,6 +186,8 @@ void LauncherWindow::initializeView() view->viewport()->installEventFilter(this); } + toggleForcedAntialiasing(m_windowOptions.useForcedAntialiasing); + m_touchMocking = false; connect(page(), SIGNAL(loadStarted()), this, SLOT(loadStarted())); @@ -322,6 +324,10 @@ void LauncherWindow::createChrome() toggleGraphicsView->setCheckable(true); toggleGraphicsView->setChecked(isGraphicsBased()); + QAction* toggleForcedAntialiasing = toolsMenu->addAction("Toggle forced use of antialiasing", this, SLOT(toggleForcedAntialiasing(bool))); + toggleForcedAntialiasing->setCheckable(true); + toggleForcedAntialiasing->setChecked(m_windowOptions.useForcedAntialiasing); + QAction* toggleWebGL = toolsMenu->addAction("Toggle WebGL", this, SLOT(toggleWebGL(bool))); toggleWebGL->setCheckable(true); toggleWebGL->setChecked(settings->testAttribute(QWebSettings::WebGLEnabled)); @@ -1086,6 +1092,19 @@ void LauncherWindow::toggleQOpenGLWidgetViewport(bool enable) } #endif +void LauncherWindow::toggleForcedAntialiasing(bool enable) +{ + m_windowOptions.useForcedAntialiasing = enable; + + if (isGraphicsBased()) { + auto* view = static_cast<WebViewGraphicsBased*>(m_view); + view->graphicsWebView()->setRenderHint(QPainter::Antialiasing, enable); + } else { + auto* view = static_cast<QWebView*>(m_view); + view->setRenderHint(QPainter::Antialiasing, enable); + } +} + void LauncherWindow::changeViewportUpdateMode(int mode) { m_windowOptions.viewportUpdateMode = QGraphicsView::ViewportUpdateMode(mode); diff --git a/Tools/QtTestBrowser/launcherwindow.h b/Tools/QtTestBrowser/launcherwindow.h index 8a8baeeda..066687724 100644 --- a/Tools/QtTestBrowser/launcherwindow.h +++ b/Tools/QtTestBrowser/launcherwindow.h @@ -92,6 +92,7 @@ public: QUrl inspectorUrl; quint16 remoteInspectorPort { 0 }; bool startMaximized { false }; + bool useForcedAntialiasing { false }; }; class LauncherWindow final : public MainWindow { @@ -164,6 +165,7 @@ protected Q_SLOTS: void toggleQGLWidgetViewport(bool enable); void toggleQOpenGLWidgetViewport(bool enable); #endif + void toggleForcedAntialiasing(bool enable); void changeViewportUpdateMode(int mode); void animatedFlip(); diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm index afe4af015..45b6649a9 100755 --- a/Tools/Scripts/webkitdirs.pm +++ b/Tools/Scripts/webkitdirs.pm @@ -1910,6 +1910,11 @@ sub wrapperPrefixIfNeeded() return (); } +sub shouldUseJhbuild() +{ + return ((isGtk() or isQt()) and -e getJhbuildPath()); +} + sub cmakeCachePath() { return File::Spec->catdir(baseProductDir(), configuration(), "CMakeCache.txt"); diff --git a/Tools/qt/generate-dependencies-yaml b/Tools/qt/generate-dependencies-yaml new file mode 100755 index 000000000..7a16fd557 --- /dev/null +++ b/Tools/qt/generate-dependencies-yaml @@ -0,0 +1,54 @@ +#!/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 YAML::XS; +use strict; +use warnings; + +my $qt_ref = shift @ARGV or die "Usage: $0 <qt_ref>"; +my @qt_dependencies = qw(qtbase qtdeclarative qtlocation qtmultimedia qtsensors qtwebchannel); + + +sub qtModuleRef { + my ($module, $tag) = @_; + + -d $module or die "No such directory $module - this script must be run in qt5"; + my $output = `git ls-tree $tag $module`; + + # Format is "<mode> SP <type> SP <object> TAB <file>" + # For submodule <type> is "commit" + $output =~ /^(.*) commit (.*)\t(.*)/ or die "git ls-tree output is malformed for $module"; + $3 eq $module or die "Module name in git ls-tree does not match $module"; + return $2; +} + +print "# This file is generated automatically by Tools/qt/generate-dependencies-yaml\n"; +print "# Qt modules git ref: $qt_ref\n"; +print "# All changes will be lost!\n"; + +my $data; +for my $module (@qt_dependencies) { + $data->{dependencies}->{"../$module"} = { ref => qtModuleRef($module, $qt_ref), required => "true" }; +} +print Dump $data; diff --git a/Tools/qt/jhbuild.modules b/Tools/qt/jhbuild.modules index 2c8ba1384..3c8f15a33 100644 --- a/Tools/qt/jhbuild.modules +++ b/Tools/qt/jhbuild.modules @@ -54,6 +54,8 @@ href="http://mesa.freedesktop.org"/> <repository type="tarball" name="llvm.org" href="http://llvm.org"/> + <repository type="tarball" name="openssl" + href="https://ftp.openssl.org/source/"/> <autotools id="fonts" supports-non-srcdir-builds="no" skip-autogen="true"> @@ -86,19 +88,9 @@ </branch> </autotools> - <autotools id="libffi" autogen-sh="configure"> - <branch module="libffi/libffi-3.1.tar.gz" version="3.1" - repo="sourceware.org-mirror" - hash="sha256:97feeeadca5e21870fa4433bc953d1b3af3f698d5df8a428f68b73cd60aef6eb" - md5sum="f5898b29bbfd70502831a212d9249d10"/> - </autotools> - <autotools id="glib" autogen-sh="configure" autogenargs="--disable-dtrace --disable-gtk-doc-html"> - <dependencies> - <dep package="libffi"/> - </dependencies> <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"> @@ -200,6 +192,7 @@ </if> <dependencies> <dep package="gst-plugins-base"/> + <dep package="openssl"/> </dependencies> <branch module="gst-plugins-bad/gst-plugins-bad-${version}.tar.xz" version="1.8.0" repo="gstreamer" @@ -234,7 +227,9 @@ 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"/> + hash="sha256:ab45895f9dcdad1e140a3a79fd709f64b05ad7364e308c0e582c5b02e9cc3153"> + <patch file="LLVM-fix-for-new-gcc.patch" strip="1"/> + </branch> </autotools> <autotools id="mesa" autogenargs="--enable-xlib-glx --disable-dri --disable-egl --with-gallium-drivers=swrast" skip-install="true"> @@ -250,4 +245,12 @@ </dependencies> </autotools> + <autotools id="openssl" autogenargs="" autogen-sh="./Configure" supports-non-srcdir-builds="no" + autogen-template="%(srcdir)s/%(autogen-sh)s shared --prefix=%(prefix)s --libdir=lib --openssldir=%(prefix)s enable-unit-test no-ssl3-method enable-rfc3779 enable-cms linux-x86_64" + makeinstallargs="install INSTALL_PREFIX='$(DESTDIR)'"> + <branch repo="openssl" + module="old/1.0.2/openssl-1.0.2r.tar.gz" version="1.0.2r" checkoutdir="openssl-1.0.2r" + hash="sha256:ae51d08bba8a83958e894946f15303ff894d75c2b8bbd44a852b64e3fe11d0d6"/> + </autotools> + </moduleset> diff --git a/Tools/qt/patches/LLVM-fix-for-new-gcc.patch b/Tools/qt/patches/LLVM-fix-for-new-gcc.patch new file mode 100644 index 000000000..abbecc2ce --- /dev/null +++ b/Tools/qt/patches/LLVM-fix-for-new-gcc.patch @@ -0,0 +1,25 @@ +From 66e8253cd495153e6a6f51a45625348cd7f69994 Mon Sep 17 00:00:00 2001 +From: Segey Lapin <slapin@ossfans.org> +Date: Sat, 27 Jul 2019 16:59:35 +0300 +Subject: [PATCH] LLVM fix for new gcc + +--- + include/llvm/IR/ValueMap.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/llvm/IR/ValueMap.h b/include/llvm/IR/ValueMap.h +index 4d00b63..d7c8b0c 100644 +--- a/include/llvm/IR/ValueMap.h ++++ b/include/llvm/IR/ValueMap.h +@@ -99,7 +99,7 @@ public: + explicit ValueMap(const ExtraData &Data, unsigned NumInitBuckets = 64) + : Map(NumInitBuckets), Data(Data) {} + +- bool hasMD() const { return MDMap; } ++ bool hasMD() const { return static_cast<bool>(MDMap); } + MDMapT &MD() { + if (!MDMap) + MDMap.reset(new MDMapT); +-- +2.16.1 + |