diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2020-09-11 20:03:56 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2020-09-12 16:39:38 +0300 |
commit | e16357a52fece93e48d5657cfa8b137e8932c0bb (patch) | |
tree | 86ad7abc21e490d723388877581d9252783e19b8 /Source | |
parent | 10cd6a106e1c461c774ca166a67b8c835c755ef7 (diff) |
Import QtWebKit commit f966d667c14ddcfe983f4a31fc80a1edbb6ada10
Change-Id: I4c6773b5dc78399f46ab9fee5c0ff876bd90ba0d
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source')
-rw-r--r-- | Source/JavaScriptCore/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Source/JavaScriptCore/Scripts/generate-js-builtins.py | 2 | ||||
-rw-r--r-- | Source/JavaScriptCore/generate-bytecode-files | 2 | ||||
-rw-r--r-- | Source/JavaScriptCore/parser/Parser.cpp | 4 | ||||
-rw-r--r-- | Source/WTF/wtf/Platform.h | 8 | ||||
-rw-r--r-- | Source/WTF/wtf/dtoa/utils.h | 2 | ||||
-rw-r--r-- | Source/WebCore/css/makegrammar.pl | 21 | ||||
-rw-r--r-- | Source/WebCore/platform/MIMETypeRegistry.cpp | 3 | ||||
-rw-r--r-- | Source/WebCore/platform/network/qt/ResourceRequest.h | 2 | ||||
-rw-r--r-- | Source/cmake/OptionsQt.cmake | 5 |
10 files changed, 24 insertions, 26 deletions
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt index afd76ca1a..3d184090d 100644 --- a/Source/JavaScriptCore/CMakeLists.txt +++ b/Source/JavaScriptCore/CMakeLists.txt @@ -1287,6 +1287,7 @@ elseif (WTF_CPU_S390) elseif (WTF_CPU_S390X) elseif (WTF_CPU_MIPS) elseif (WTF_CPU_SH4) +elseif (WTF_CPU_RISCV64) elseif (WTF_CPU_X86) elseif (WTF_CPU_X86_64) if (MSVC AND ENABLE_JIT) diff --git a/Source/JavaScriptCore/Scripts/generate-js-builtins.py b/Source/JavaScriptCore/Scripts/generate-js-builtins.py index 7a203ff08..66b896326 100644 --- a/Source/JavaScriptCore/Scripts/generate-js-builtins.py +++ b/Source/JavaScriptCore/Scripts/generate-js-builtins.py @@ -124,7 +124,7 @@ if __name__ == '__main__': cli_parser.add_option("-t", "--test", action="store_true", help="Enable test mode.") arg_options, arg_values = cli_parser.parse_args() - if len(arg_values) is 0 and not arg_options.input_directory: + if len(arg_values) == 0 and not arg_options.input_directory: raise ParseException("At least one input file or directory expected.") if not arg_options.output_directory: diff --git a/Source/JavaScriptCore/generate-bytecode-files b/Source/JavaScriptCore/generate-bytecode-files index c5dab429c..af3431275 100644 --- a/Source/JavaScriptCore/generate-bytecode-files +++ b/Source/JavaScriptCore/generate-bytecode-files @@ -163,7 +163,7 @@ if __name__ == "__main__": initBytecodesFile = openOrExit(initASMFileName, "w") try: - bytecodeSections = json.load(bytecodeFile, encoding = "utf-8") + bytecodeSections = json.load(bytecodeFile) except: print("Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info())) diff --git a/Source/JavaScriptCore/parser/Parser.cpp b/Source/JavaScriptCore/parser/Parser.cpp index f4751616f..15582572d 100644 --- a/Source/JavaScriptCore/parser/Parser.cpp +++ b/Source/JavaScriptCore/parser/Parser.cpp @@ -1089,6 +1089,10 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseForStatement( JSTokenLocation location(tokenLocation()); int startLine = tokenLine(); next(); + + DepthManager statementDepth(&m_statementDepth); + m_statementDepth++; + handleProductionOrFail(OPENPAREN, "(", "start", "for-loop header"); int nonLHSCount = m_parserState.nonLHSCount; int declarations = 0; diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index 5717f3ea1..7aefa1bab 100644 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -176,6 +176,11 @@ #define WTF_CPU_X86_SSE2 1 #endif +/* CPU(RISCV64) - RISCV64 */ +#if defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64 +#define WTF_CPU_RISCV64 1 +#endif + /* CPU(ARM64) - Apple */ #if (defined(__arm64__) && defined(__APPLE__)) || defined(__aarch64__) #define WTF_CPU_ARM64 1 @@ -707,7 +712,8 @@ || CPU(S390X) \ || CPU(MIPS64) \ || CPU(PPC64) \ - || CPU(PPC64LE) + || CPU(PPC64LE) \ + || CPU(RISCV64) #define USE_JSVALUE64 1 #else #define USE_JSVALUE32_64 1 diff --git a/Source/WTF/wtf/dtoa/utils.h b/Source/WTF/wtf/dtoa/utils.h index 889642cee..176d5909f 100644 --- a/Source/WTF/wtf/dtoa/utils.h +++ b/Source/WTF/wtf/dtoa/utils.h @@ -49,7 +49,7 @@ defined(__ARMEL__) || \ defined(_MIPS_ARCH_MIPS32R2) #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 -#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA) +#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA) || CPU(RISCV64) #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 #elif defined(_M_IX86) || defined(__i386__) #if defined(_WIN32) diff --git a/Source/WebCore/css/makegrammar.pl b/Source/WebCore/css/makegrammar.pl index 5d63b0810..9435701c7 100644 --- a/Source/WebCore/css/makegrammar.pl +++ b/Source/WebCore/css/makegrammar.pl @@ -73,25 +73,6 @@ if ($suffix eq ".y.in") { } my $fileBase = File::Spec->join($outputDir, $filename); -my @bisonCommand = ($bison, "-d", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp"); +my @bisonCommand = ($bison, "--defines=$fileBase.h", "-p", $symbolsPrefix, $grammarFilePath, "-o", "$fileBase.cpp"); push @bisonCommand, "--no-lines" if $^O eq "MSWin32"; # Work around bug in bison >= 3.0 on Windows where it puts backslashes into #line directives. system(@bisonCommand) == 0 or die; - -open HEADER, ">$fileBase.h" or die; -print HEADER << "EOF"; -#ifndef CSSGRAMMAR_H -#define CSSGRAMMAR_H -EOF - -open HPP, "<$fileBase.cpp.h" or open HPP, "<$fileBase.hpp" or die; -while (<HPP>) { - print HEADER; -} -close HPP; - -print HEADER "#endif\n"; -close HEADER; - -unlink("$fileBase.cpp.h"); -unlink("$fileBase.hpp"); - diff --git a/Source/WebCore/platform/MIMETypeRegistry.cpp b/Source/WebCore/platform/MIMETypeRegistry.cpp index f824e605b..8087dc984 100644 --- a/Source/WebCore/platform/MIMETypeRegistry.cpp +++ b/Source/WebCore/platform/MIMETypeRegistry.cpp @@ -254,6 +254,9 @@ static void initializeSupportedImageMIMETypes() // Do not treat SVG as images directly because WebKit can handle them. supportedImageMIMETypes->remove("image/svg+xml"); supportedImageResourceMIMETypes->remove("image/svg+xml"); + // Do not treat PDF as images + supportedImageMIMETypes->remove("application/pdf"); + supportedImageResourceMIMETypes->remove("application/pdf"); #endif // PLATFORM(QT) #endif // USE(CG) } diff --git a/Source/WebCore/platform/network/qt/ResourceRequest.h b/Source/WebCore/platform/network/qt/ResourceRequest.h index 1154d56a0..87e21ec3f 100644 --- a/Source/WebCore/platform/network/qt/ResourceRequest.h +++ b/Source/WebCore/platform/network/qt/ResourceRequest.h @@ -32,7 +32,7 @@ // HTTP/2 is implemented since Qt 5.8, but various QtNetwork bugs make it unusable in browser with Qt < 5.10.1 // We also don't enable HTTP/2 for unencrypted connections because of possible compatibility issues; it can be // enabled manually by user application via custom QNAM subclass -#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 1) +#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 1) && !defined(QT_NO_SSL) #define USE_HTTP2 1 #endif diff --git a/Source/cmake/OptionsQt.cmake b/Source/cmake/OptionsQt.cmake index 39fb23b2a..5e5eb6c22 100644 --- a/Source/cmake/OptionsQt.cmake +++ b/Source/cmake/OptionsQt.cmake @@ -13,6 +13,9 @@ set(PROJECT_VERSION_STRING "${PROJECT_VERSION}") set(QT_CONAN_DIR "" CACHE PATH "Directory containing conanbuildinfo.cmake and conanfile.txt") if (QT_CONAN_DIR) + if (NOT QT_CONAN_FILE) + set(QT_CONAN_FILE "${QT_CONAN_DIR}/conanfile.txt") + endif () message(STATUS "Using conan directory: ${QT_CONAN_DIR}") find_program(CONAN_COMMAND NAMES conan PATHS $ENV{PIP3_PATH}) if (NOT CONAN_COMMAND) @@ -31,7 +34,7 @@ if (QT_CONAN_DIR) message(STATUS \"Importing dependencies from conan to \${_conan_imports_dest}\") execute_process( - COMMAND \"${CONAN_COMMAND}\" imports --import-folder \${_conan_imports_dest} \"${QT_CONAN_DIR}/conanfile.txt\" + COMMAND \"${CONAN_COMMAND}\" imports --import-folder \${_conan_imports_dest} \"${QT_CONAN_FILE}\" WORKING_DIRECTORY \"${QT_CONAN_DIR}\" RESULT_VARIABLE _conan_imports_result ) |