Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.212 #10

Open
wants to merge 26 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a824538
Import QtWebKit commit b1c36478b46c1dad693e2f1cfc235b02542c98cd
annulen Oct 22, 2019
a1d3208
Temporary skip build with MSVC 2019
annulen Oct 23, 2019
1ee41e6
[tests] Restore CMakeLists.txt needed by cmake test
annulen Dec 11, 2019
81909ca
Import QtWebKit commit 148b29f49161dd4ebba296cf675bf0afa4b73bc4
annulen Feb 4, 2020
4f0fa41
[qmake] Enable API tests for WebKitWidgets in Coin
annulen Feb 25, 2020
cd875b3
Import QtWebKit commit 887b98440a46eb30f8a1998e930ddd9218934e1e
annulen Feb 25, 2020
8d9e85b
Import QtWebKit commit bf94215feb57ddf9ce364bc6953eec8cd1387c3d
annulen Feb 26, 2020
794ac0d
Import QtWebKit commit ae3f146611ea3f6277750978be4206cdbba76350
annulen Feb 26, 2020
be8798c
Import QtWebKit commit 6b3c75e839483be078fef7fbab341720668788e9
annulen Feb 26, 2020
4351bcf
Import QtWebKit commit 3e299f5a501465c9d986c4daaf6fb82f52d4cd20
annulen Feb 29, 2020
b1586d3
Import QtWebKit commit 0f8a0856b4e8db1bea298f74c02172a9aa5fc2f3
annulen Mar 3, 2020
14db532
Import QtWebKit commit c58d69686e6bdfb224c064a38333d6c6a981bf70
annulen Mar 4, 2020
444bd2b
Import QtWebKit commit 8a07b1ecac57cc12d6e0ef0ab56340742c213554
annulen Mar 4, 2020
cf9bba4
Import QtWebKit commit 980d6f0dc91dd18951d7bd53cea86c898fab5830
annulen Mar 17, 2020
1374224
[cmake] Make MACOS_BUILD_FRAMEWORKS option actually work
annulen Mar 17, 2020
fea3902
Import QtWebKit commit 7cbe5431c38860f20419db9df9b673e822f297c0
annulen Mar 18, 2020
3e4baaf
Import QtWebKit commit c8cf15255d01d75b888df48372af0ad57d3db799
annulen Mar 20, 2020
7b52837
Import QtWebKit commit 98f3c1fc89c86fe9ca6db003eaaad739961e52e8
annulen Mar 21, 2020
10cd6a1
Import QtWebKit commit 5da2323bd009bfd234e86c2552b7d9d4138652fe
annulen Apr 13, 2020
e16357a
Import QtWebKit commit f966d667c14ddcfe983f4a31fc80a1edbb6ada10
annulen Sep 11, 2020
412e257
Workaround for Windows Store python3.exe
annulen Sep 12, 2020
08eaf85
Import QtWebKit commit cf37bc44f798d3c5a26d17086ada92688b9bfe6d
annulen Sep 14, 2020
8967b4f
Import QtWebKit commit 6faf5d547055321f0d518fe83766499cac5d8664
annulen Sep 20, 2020
685ed79
Import QtWebKit commit 143b469188bde226d5e70cff5f01699b8a29d865
annulen Sep 21, 2020
5a99e5d
Import QtWebKit commit 5d89eef9bc689abb59ef799b445c35b1e322b3f1
annulen Sep 22, 2020
ac8ebc6
Enable QML tests
annulen Sep 22, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ QMAKEPATH += $$PWD/Tools/qmake

ROOT_WEBKIT_DIR = $$PWD
ROOT_BUILD_DIR = $$shadowed($$PWD)

MODULE_VERSION = 5.13.1
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ set(ALL_PORTS
WinCairo
Qt
)
set(PORT "NOPORT" CACHE STRING "choose which WebKit port to build (one of ${ALL_PORTS})")
set(PORT "Qt" CACHE STRING "choose which WebKit port to build (one of ${ALL_PORTS})")

list(FIND ALL_PORTS ${PORT} RET)
if (${RET} EQUAL -1)
Expand Down Expand Up @@ -83,6 +83,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390")
set(WTF_CPU_S390 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
set(WTF_CPU_S390X 1)
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64")
set(WTF_CPU_RISCV64 1)
else ()
message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'")
endif ()
Expand Down
8 changes: 4 additions & 4 deletions Source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ if (USE_WOFF2 AND NOT WOFF2DEC_FOUND)
add_subdirectory(ThirdParty/woff2)
endif ()

if (ENABLE_WEBKIT)
add_subdirectory(WebKit)
endif ()

if (ENABLE_WEBKIT2)
add_subdirectory(WebKit2)
endif ()

if (ENABLE_WEBKIT)
add_subdirectory(WebKit)
endif ()

WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()

# -----------------------------------------------------------------------------
Expand Down
9 changes: 0 additions & 9 deletions Source/JavaScriptCore/API/tests/testapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1117,15 +1117,6 @@ static void checkConstnessInJSObjectNames()
int main(int argc, char* argv[])
{
#if OS(WINDOWS)
#if defined(_M_X64) || defined(__x86_64__)
// The VS2013 runtime has a bug where it mis-detects AVX-capable processors
// if the feature has been disabled in firmware. This causes us to crash
// in some of the math functions. For now, we disable those optimizations
// because Microsoft is not going to fix the problem in VS2013.
// FIXME: http://webkit.org/b/141449: Remove this workaround when we switch to VS2015+.
_set_FMA3_enable(0);
#endif

// Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for
// testing/debugging, as it causes the post-mortem debugger not to be invoked. We reset the
// error mode here to work around Cygwin's behavior. See <http://webkit.org/b/55222>.
Expand Down
6 changes: 4 additions & 2 deletions Source/JavaScriptCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,8 @@ set(JavaScriptCore_SCRIPTS_SOURCES_DIR "${JAVASCRIPTCORE_DIR}/Scripts")
set(JavaScriptCore_SCRIPTS_SOURCES_PATHS
${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.pl
${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.py
${JavaScriptCore_SCRIPTS_SOURCES_DIR}/builtins/builtins*.py
${JavaScriptCore_SCRIPTS_SOURCES_DIR}/wkbuiltins/builtins*.py
${JavaScriptCore_SCRIPTS_SOURCES_DIR}/wkbuiltins/wkbuiltins.py
)

# Force JavaScriptCore to run scripts from the same staging path as WebCore.
Expand Down Expand Up @@ -1174,7 +1175,7 @@ add_custom_command(
# JSCBuiltins

set(BUILTINS_GENERATOR_SCRIPTS
${JavaScriptCore_SCRIPTS_DIR}/builtins.py
${JavaScriptCore_SCRIPTS_DIR}/wkbuiltins.py
${JavaScriptCore_SCRIPTS_DIR}/builtins_generator.py
${JavaScriptCore_SCRIPTS_DIR}/builtins_model.py
${JavaScriptCore_SCRIPTS_DIR}/builtins_templates.py
Expand Down Expand Up @@ -1286,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)
Expand Down
18 changes: 12 additions & 6 deletions Source/JavaScriptCore/Scripts/generate-js-builtins.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,22 @@
import logging
import optparse
import os
import sys

logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.ERROR)
log = logging.getLogger('global')

from lazywriter import LazyFileWriter

import builtins
from builtins import *
from wkbuiltins import *


def do_open(file, mode):
if sys.version_info.major == 2:
return open(file, mode)
else:
return open(file, mode, encoding="UTF-8")

def generate_bindings_for_builtins_files(builtins_files=[],
output_path=None,
concatenate_output=False,
Expand All @@ -53,7 +59,7 @@ def generate_bindings_for_builtins_files(builtins_files=[],
model = BuiltinsCollection(framework_name=framework_name)

for filepath in builtins_files:
with open(filepath, "r") as file:
with do_open(filepath, "r") as file:
file_text = file.read()
file_name = os.path.basename(filepath)

Expand Down Expand Up @@ -118,7 +124,7 @@ def generate_bindings_for_builtins_files(builtins_files=[],
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:
Expand All @@ -132,7 +138,7 @@ def generate_bindings_for_builtins_files(builtins_files=[],
for filepath in os.listdir(arg_options.input_directory):
input_filepaths.append(os.path.join(arg_options.input_directory, filepath))

input_filepaths = filter(lambda name: fnmatch.fnmatch(name, '*.js'), input_filepaths)
input_filepaths = sorted([name for name in input_filepaths if fnmatch.fnmatch(name, '*.js')])

options = {
'output_path': arg_options.output_directory,
Expand All @@ -144,7 +150,7 @@ def generate_bindings_for_builtins_files(builtins_files=[],

log.debug("Generating code for builtins.")
log.debug("Parsed options:")
for option, value in options.items():
for option, value in list(options.items()):
log.debug(" %s: %s" % (option, value))
log.debug("")
log.debug("Input files:")
Expand Down
22 changes: 14 additions & 8 deletions Source/JavaScriptCore/Scripts/jsmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
is_3 = sys.version_info >= (3, 0)
if is_3:
import io
python_text_type = str
else:
import StringIO
try:
import cStringIO
except ImportError:
cStringIO = None
python_text_type = basestring


__all__ = ['jsmin', 'JavascriptMinify']
Expand Down Expand Up @@ -79,14 +81,18 @@ def minify(self, instream=None, outstream=None):
def write(char):
# all of this is to support literal regular expressions.
# sigh
if char in 'return':
if str(char) in 'return':
self.return_buf += char
self.is_return = self.return_buf == 'return'
self.outs.write(char)
if self.is_return:
self.return_buf = ''

read = self.ins.read
def read(n):
char = self.ins.read(n)
if not isinstance(char, python_text_type):
raise ValueError("ERROR: The script jsmin.py can only handle text input, but it received input of type %s" % type(char))
return char

space_strings = "abcdefghijklmnopqrstuvwxyz"\
"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$\\"
Expand Down Expand Up @@ -118,8 +124,8 @@ def write(char):
write(previous)
elif not previous:
return
elif previous >= '!':
if previous in "'\"":
elif str(previous) >= "!":
if str(previous) in "'\"":
in_quote = previous
write(previous)
previous_non_space = previous
Expand Down Expand Up @@ -166,7 +172,7 @@ def write(char):
if numslashes % 2 == 0:
in_quote = ''
write(''.join(quote_buf))
elif next1 in '\r\n':
elif str(next1) in '\r\n':
if previous_non_space in newlineend_strings \
or previous_non_space > '~':
while 1:
Expand All @@ -179,7 +185,7 @@ def write(char):
or next2 > '~' or next2 == '/':
do_newline = True
break
elif next1 < '!' and not in_re:
elif str(next1) < '!' and not in_re:
if (previous_non_space in space_strings \
or previous_non_space > '~') \
and (next2 in space_strings or next2 > '~'):
Expand Down Expand Up @@ -217,14 +223,14 @@ def write(char):
do_newline = False

write(next1)
if not in_re and next1 in "'\"`":
if not in_re and str(next1) in "'\"`":
in_quote = next1
quote_buf = []

previous = next1
next1 = next2

if previous >= '!':
if str(previous) >= '!':
previous_non_space = previous

if previous == '\\':
Expand Down
57 changes: 34 additions & 23 deletions Source/JavaScriptCore/Scripts/make-js-file-arrays.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from __future__ import print_function
import io
import os
from optparse import OptionParser
from StringIO import StringIO
from jsmin import JavascriptMinify
import sys
from jsmin import jsmin
is_3 = sys.version_info >= (3, 0)


def stringifyCodepoint(code):
Expand All @@ -36,7 +38,7 @@ def stringifyCodepoint(code):


def chunk(list, chunkSize):
for i in xrange(0, len(list), chunkSize):
for i in range(0, len(list), chunkSize):
yield list[i:i + chunkSize]


Expand All @@ -46,11 +48,11 @@ def main():
parser.add_option('-n', '--namespace', help='Namespace to use')
(options, arguments) = parser.parse_args()
if not options.namespace:
print 'Error: must provide a namespace'
print('Error: must provide a namespace')
parser.print_usage()
exit(-1)
if len(arguments) < 3:
print 'Error: must provide at least 3 arguments'
print('Error: must provide at least 3 arguments')
parser.print_usage()
exit(-1)

Expand All @@ -60,38 +62,47 @@ def main():
inputPaths = arguments[2:]

headerFile = open(headerPath, 'w')
print >> headerFile, 'namespace {0:s} {{'.format(namespace)
print('namespace {0:s} {{'.format(namespace), file=headerFile)

sourceFile = open(sourcePath, 'w')
print >> sourceFile, '#include "{0:s}"'.format(os.path.basename(headerPath))
print >> sourceFile, 'namespace {0:s} {{'.format(namespace)

jsm = JavascriptMinify()
print('#include "{0:s}"'.format(os.path.basename(headerPath)), file=sourceFile)
print('namespace {0:s} {{'.format(namespace), file=sourceFile)

for inputFileName in inputPaths:
inputStream = io.FileIO(inputFileName)
outputStream = StringIO()

if is_3:
inputStream = io.open(inputFileName, encoding='utf-8')
else:
inputStream = io.FileIO(inputFileName)

data = inputStream.read()

if not options.no_minify:
jsm.minify(inputStream, outputStream)
characters = outputStream.getvalue()
characters = jsmin(data)
else:
characters = inputStream.read()
characters = data

if is_3:
codepoints = bytearray(characters, encoding='utf-8')
else:
codepoints = list(map(ord, characters))

# Use the size of codepoints instead of the characters
# because UTF-8 characters may need more than one byte.
size = len(codepoints)

size = len(characters)
variableName = os.path.splitext(os.path.basename(inputFileName))[0]

print >> headerFile, 'extern const char {0:s}JavaScript[{1:d}];'.format(variableName, size)
print >> sourceFile, 'const char {0:s}JavaScript[{1:d}] = {{'.format(variableName, size)
print('extern const char {0:s}JavaScript[{1:d}];'.format(variableName, size), file=headerFile)
print('const char {0:s}JavaScript[{1:d}] = {{'.format(variableName, size), file=sourceFile)

codepoints = map(ord, characters)
for codepointChunk in chunk(codepoints, 16):
print >> sourceFile, ' {0:s},'.format(','.join(map(stringifyCodepoint, codepointChunk)))
print(' {0:s},'.format(','.join(map(stringifyCodepoint, codepointChunk))), file=sourceFile)

print >> sourceFile, '};'
print('};', file=sourceFile)

print >> headerFile, '}} // namespace {0:s}'.format(namespace)
print >> sourceFile, '}} // namespace {0:s}'.format(namespace)
print('}} // namespace {0:s}'.format(namespace), file=headerFile)
print('}} // namespace {0:s}'.format(namespace), file=sourceFile)

if __name__ == '__main__':
main()
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Required for Python to search this directory for module files

from builtins import *
from .wkbuiltins import *
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ def __str__(self):

return interface

def __lt__(self, other):
return self.function_name < other.function_name


class BuiltinsCollection:
def __init__(self, framework_name):
Expand Down Expand Up @@ -178,7 +181,7 @@ def copyrights(self):

result = []

for owner, years in owner_to_years.items():
for owner, years in list(owner_to_years.items()):
sorted_years = list(years)
sorted_years.sort()
result.append("%s %s" % (', '.join(sorted_years), owner))
Expand Down Expand Up @@ -271,4 +274,4 @@ def _parse_functions(self, text):
functionBounds.append((start, end))

functionStrings = [text[start:end].strip() for (start, end) in functionBounds]
return map(BuiltinFunction.fromString, functionStrings)
return list(map(BuiltinFunction.fromString, functionStrings))
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file is used to simulate the builtins/ directory when generate-js-builtins.py
# This file is used to simulate the wkbuiltins/ directory when generate-js-builtins.py
# is run from JavaScriptCore framework's private headers directory, which is flattened.

from builtins_model import *
Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/disassembler/udis86/ud_opcode.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,10 @@ def printWalk(tbl, indent=""):
entries = tbl.entries()
for k, e in entries:
if isinstance(e, UdOpcodeTable):
self.log("%s |-<%02x> %s" % (indent, k, e))
self.log("%s |-<%02x> %s" % (indent, int(k), e))
printWalk(e, indent + " |")
elif isinstance(e, UdInsnDef):
self.log("%s |-<%02x> %s" % (indent, k, e))
self.log("%s |-<%02x> %s" % (indent, int(k), e))
printWalk(self.root)


Expand Down
Loading