diff --git a/webkit2gtk3-fix-wayland-crash.patch b/webkit2gtk3-fix-wayland-crash.patch deleted file mode 100644 index ca57427..0000000 --- a/webkit2gtk3-fix-wayland-crash.patch +++ /dev/null @@ -1,76 +0,0 @@ -Index: webkitgtk-2.18.6/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp -=================================================================== ---- webkitgtk-2.18.6.orig/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp 2017-09-02 11:15:50.000000000 +0200 -+++ webkitgtk-2.18.6/Source/WebKit/UIProcess/gtk/WaylandCompositor.cpp 2018-03-02 17:38:44.892586127 +0100 -@@ -40,7 +40,9 @@ - #if USE(OPENGL_ES_2) - #include - #include -+#include - #else -+#include - #include - #endif - -@@ -374,11 +376,12 @@ - - bool WaylandCompositor::initializeEGL() - { -+ const char* extensions = eglQueryString(PlatformDisplay::sharedDisplay().eglDisplay(), EGL_EXTENSIONS); -+ - if (PlatformDisplay::sharedDisplay().eglCheckVersion(1, 5)) { - eglCreateImage = reinterpret_cast(eglGetProcAddress("eglCreateImage")); - eglDestroyImage = reinterpret_cast(eglGetProcAddress("eglDestroyImage")); - } else { -- const char* extensions = eglQueryString(PlatformDisplay::sharedDisplay().eglDisplay(), EGL_EXTENSIONS); - if (GLContext::isExtensionSupported(extensions, "EGL_KHR_image_base")) { - eglCreateImage = reinterpret_cast(eglGetProcAddress("eglCreateImageKHR")); - eglDestroyImage = reinterpret_cast(eglGetProcAddress("eglDestroyImageKHR")); -@@ -389,22 +392,13 @@ - return false; - } - -- glImageTargetTexture2D = reinterpret_cast(eglGetProcAddress("glEGLImageTargetTexture2DOES")); -- if (!glImageTargetTexture2D) { -- WTFLogAlways("WaylandCompositor requires glEGLImageTargetTexture2D."); -- return false; -- } -- -- eglQueryWaylandBuffer = reinterpret_cast(eglGetProcAddress("eglQueryWaylandBufferWL")); -- if (!eglQueryWaylandBuffer) { -- WTFLogAlways("WaylandCompositor requires eglQueryWaylandBuffer."); -- return false; -- } -- -+ if (GLContext::isExtensionSupported(extensions, "EGL_WL_bind_wayland_display")) { - eglBindWaylandDisplay = reinterpret_cast(eglGetProcAddress("eglBindWaylandDisplayWL")); - eglUnbindWaylandDisplay = reinterpret_cast(eglGetProcAddress("eglUnbindWaylandDisplayWL")); -- if (!eglBindWaylandDisplay || !eglUnbindWaylandDisplay) { -- WTFLogAlways("WaylandCompositor requires eglBindWaylandDisplayWL and eglUnbindWaylandDisplayWL."); -+ eglQueryWaylandBuffer = reinterpret_cast(eglGetProcAddress("eglQueryWaylandBufferWL")); -+ } -+ if (!eglBindWaylandDisplay || !eglUnbindWaylandDisplay || !eglQueryWaylandBuffer) { -+ WTFLogAlways("WaylandCompositor requires eglBindWaylandDisplayWL, eglUnbindWaylandDisplayWL and eglQueryWaylandBuffer."); - return false; - } - -@@ -415,6 +409,19 @@ - if (!m_eglContext->makeContextCurrent()) - return false; - -+#if USE(OPENGL_ES_2) -+ std::unique_ptr glExtensions = std::make_unique(nullptr, false); -+#else -+ std::unique_ptr glExtensions = std::make_unique(nullptr, GLContext::current()->version() >= 320); -+#endif -+ if (glExtensions->supports("GL_OES_EGL_image") || glExtensions->supports("GL_OES_EGL_image_external")) -+ glImageTargetTexture2D = reinterpret_cast(eglGetProcAddress("glEGLImageTargetTexture2DOES")); -+ -+ if (!glImageTargetTexture2D) { -+ WTFLogAlways("WaylandCompositor requires glEGLImageTargetTexture2D."); -+ return false; -+ } -+ - return true; - } - diff --git a/webkit2gtk3-no-return-in-nonvoid.patch b/webkit2gtk3-no-return-in-nonvoid.patch deleted file mode 100644 index afafb37..0000000 --- a/webkit2gtk3-no-return-in-nonvoid.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: webkitgtk-2.17.92/Source/WebCore/crypto/CryptoKey.cpp -=================================================================== ---- webkitgtk-2.17.92.orig/Source/WebCore/crypto/CryptoKey.cpp -+++ webkitgtk-2.17.92/Source/WebCore/crypto/CryptoKey.cpp -@@ -67,6 +67,8 @@ auto CryptoKey::algorithm() const -> Alg - case KeyAlgorithmClass::Raw: - return downcast(*algorithm).dictionary(); - } -+ -+ RELEASE_ASSERT_NOT_REACHED(); - } - - auto CryptoKey::usages() const -> Vector diff --git a/webkit2gtk3-python3.patch b/webkit2gtk3-python3.patch new file mode 100644 index 0000000..c294152 --- /dev/null +++ b/webkit2gtk3-python3.patch @@ -0,0 +1,1878 @@ +diff -ur webkitgtk-2.19.91.orig/Source/cmake/WebKitCommon.cmake webkitgtk-2.19.91/Source/cmake/WebKitCommon.cmake +--- webkitgtk-2.19.91.orig/Source/cmake/WebKitCommon.cmake 2018-02-19 01:45:33.000000000 -0600 ++++ webkitgtk-2.19.91/Source/cmake/WebKitCommon.cmake 2018-03-02 16:23:17.684067947 -0600 +@@ -21,9 +21,6 @@ + find_package(PerlModules COMPONENTS JSON::PP REQUIRED) + + find_package(PythonInterp 2.7.0 REQUIRED) +- if (PYTHON_VERSION_MAJOR GREATER 2) +- message(FATAL_ERROR "Python 2 is required, but Python ${PYTHON_VERSION_MAJOR} was found.") +- endif () + + # We cannot check for RUBY_FOUND because it is set only when the full package is installed and + # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py webkitgtk-2.19.91/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py 2018-02-19 01:45:14.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/disassembler/udis86/ud_opcode.py 2018-03-02 16:25:53.748926795 -0600 +@@ -550,10 +550,10 @@ + 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) + + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/generate-bytecode-files webkitgtk-2.19.91/Source/JavaScriptCore/generate-bytecode-files +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/generate-bytecode-files 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/generate-bytecode-files 2018-03-02 16:23:17.688067969 -0600 +@@ -94,6 +94,12 @@ + print("I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)) + exit(1) + ++def dowrite(file, str): ++ if sys.version_info.major == 2: ++ file.write(str) ++ else: ++ file.write(bytes(str, "utf-8")) ++ + def hashFile(file): + sha1 = hashlib.sha1() + file.seek(0) +@@ -112,31 +118,31 @@ + + + def writeInstructionAccessor(bytecodeHFile, typeName, name): +- bytecodeHFile.write(" {0}& {1}() {{ return *reinterpret_cast<{0}*>(&m_{1}); }}\n".format(typeName, name)) +- bytecodeHFile.write(" const {0}& {1}() const {{ return *reinterpret_cast(&m_{1}); }}\n".format(typeName, name)) ++ dowrite(bytecodeHFile, " {0}& {1}() {{ return *reinterpret_cast<{0}*>(&m_{1}); }}\n".format(typeName, name)) ++ dowrite(bytecodeHFile, " const {0}& {1}() const {{ return *reinterpret_cast(&m_{1}); }}\n".format(typeName, name)) + + + def writeInstructionMember(bytecodeHFile, typeName, name): +- bytecodeHFile.write(" std::aligned_storage::type m_{1};\n".format(typeName, name)) ++ dowrite(bytecodeHFile, " std::aligned_storage::type m_{1};\n".format(typeName, name)) + + + def writeStruct(bytecodeHFile, bytecode): +- bytecodeHFile.write("struct {0} {{\n".format(toCpp(bytecode["name"]))) +- bytecodeHFile.write("public:\n") ++ dowrite(bytecodeHFile, "struct {0} {{\n".format(toCpp(bytecode["name"]))) ++ dowrite(bytecodeHFile, "public:\n") + + writeInstructionAccessor(bytecodeHFile, "Opcode", "opcode") + for offset in bytecode["offsets"]: +- for name, typeName in offset.iteritems(): ++ for name, typeName in offset.items(): + writeInstructionAccessor(bytecodeHFile, typeName, name) + +- bytecodeHFile.write("\nprivate:\n") +- bytecodeHFile.write(" friend class LLIntOffsetsExtractor;\n\n") ++ dowrite(bytecodeHFile, "\nprivate:\n") ++ dowrite(bytecodeHFile, " friend class LLIntOffsetsExtractor;\n\n") + + writeInstructionMember(bytecodeHFile, "Opcode", "opcode") + for offset in bytecode["offsets"]: +- for name, typeName in offset.iteritems(): ++ for name, typeName in offset.items(): + writeInstructionMember(bytecodeHFile, typeName, name) +- bytecodeHFile.write("};\n\n") ++ dowrite(bytecodeHFile, "};\n\n") + + + if __name__ == "__main__": +@@ -220,25 +226,25 @@ + print("Unexpected error parsing {0}: {1}".format(bytecodeJSONFile, sys.exc_info())) + + if bytecodeHFilename: +- bytecodeHFile.write(hFileHashString) +- bytecodeHFile.write(cCopyrightMsg % bytecodeJSONFile) +- bytecodeHFile.write("#pragma once\n\n") ++ dowrite(bytecodeHFile, hFileHashString) ++ dowrite(bytecodeHFile, cCopyrightMsg % bytecodeJSONFile) ++ dowrite(bytecodeHFile, "#pragma once\n\n") + + if bytecodeStructsHFilename: +- bytecodeStructsHFile.write(hFileHashString) +- bytecodeStructsHFile.write(cCopyrightMsg % bytecodeJSONFile) +- bytecodeStructsHFile.write("#pragma once\n\n") +- bytecodeStructsHFile.write("#include \"Instruction.h\"\n") +- bytecodeStructsHFile.write("\n") ++ dowrite(bytecodeStructsHFile, hFileHashString) ++ dowrite(bytecodeStructsHFile, cCopyrightMsg % bytecodeJSONFile) ++ dowrite(bytecodeStructsHFile, "#pragma once\n\n") ++ dowrite(bytecodeStructsHFile, "#include \"Instruction.h\"\n") ++ dowrite(bytecodeStructsHFile, "\n") + + if initASMFileName: +- initBytecodesFile.write(asmFileHashString) +- initBytecodesFile.write(asmCopyrightMsg % bytecodeJSONFile) ++ dowrite(initBytecodesFile, asmFileHashString) ++ dowrite(initBytecodesFile, asmCopyrightMsg % bytecodeJSONFile) + initASMBytecodeNum = 0 + + for section in bytecodeSections: + if bytecodeHFilename and section['emitInHFile']: +- bytecodeHFile.write("#define FOR_EACH_{0}_ID(macro) \\\n".format(section["macroNameComponent"])) ++ dowrite(bytecodeHFile, "#define FOR_EACH_{0}_ID(macro) \\\n".format(section["macroNameComponent"])) + firstMacro = True + defaultLength = 1 + if "defaultLength" in section: +@@ -247,7 +253,7 @@ + bytecodeNum = 0 + for bytecode in section["bytecodes"]: + if not firstMacro: +- bytecodeHFile.write(" \\\n") ++ dowrite(bytecodeHFile, " \\\n") + + length = defaultLength + if "length" in bytecode: +@@ -256,39 +262,39 @@ + # Add one for the opcode + length = len(bytecode["offsets"]) + 1 + +- bytecodeHFile.write(" macro({0}, {1})".format(bytecode["name"], length)) ++ dowrite(bytecodeHFile, " macro({0}, {1})".format(bytecode["name"], length)) + firstMacro = False + bytecodeNum = bytecodeNum + 1 + +- bytecodeHFile.write("\n\n") +- bytecodeHFile.write("#define NUMBER_OF_{0}_IDS {1}\n\n".format(section["macroNameComponent"], bytecodeNum)) ++ dowrite(bytecodeHFile, "\n\n") ++ dowrite(bytecodeHFile, "#define NUMBER_OF_{0}_IDS {1}\n\n".format(section["macroNameComponent"], bytecodeNum)) + + + if bytecodeStructsHFilename and section['emitInStructsFile']: +- bytecodeStructsHFile.write("namespace JSC {\n\n") ++ dowrite(bytecodeStructsHFile, "namespace JSC {\n\n") + + for bytecode in section["bytecodes"]: + if not "offsets" in bytecode: + continue + writeStruct(bytecodeStructsHFile, bytecode) + +- bytecodeStructsHFile.write("} // namespace JSC \n") ++ dowrite(bytecodeStructsHFile, "} // namespace JSC \n") + + if bytecodeHFilename and section['emitOpcodeIDStringValuesInHFile']: + bytecodeNum = 0 + for bytecode in section["bytecodes"]: +- bytecodeHFile.write("#define {0}_value_string \"{1}\"\n".format(bytecode["name"], bytecodeNum)) ++ dowrite(bytecodeHFile, "#define {0}_value_string \"{1}\"\n".format(bytecode["name"], bytecodeNum)) + firstMacro = False + bytecodeNum = bytecodeNum + 1 + +- bytecodeHFile.write("\n") ++ dowrite(bytecodeHFile, "\n") + + if initASMFileName and section['emitInASMFile']: + prefix = "" + if "asmPrefix" in section: + prefix = section["asmPrefix"] + for bytecode in section["bytecodes"]: +- initBytecodesFile.write("setEntryAddress({0}, _{1}{2})\n".format(initASMBytecodeNum, prefix, bytecode["name"])) ++ dowrite(initBytecodesFile, "setEntryAddress({0}, _{1}{2})\n".format(initASMBytecodeNum, prefix, bytecode["name"])) + initASMBytecodeNum = initASMBytecodeNum + 1 + + if bytecodeHFilename: +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator.py 2018-03-03 10:29:27.006362019 -0600 +@@ -28,8 +28,8 @@ + import os.path + import re + +-from generator import ucfirst, Generator +-from models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks ++from .generator import ucfirst, Generator ++from .models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks + + log = logging.getLogger('global') + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py 2018-02-19 04:47:53.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_alternate_backend_dispatcher_header.py 2018-03-03 10:29:27.042362171 -0600 +@@ -30,8 +30,8 @@ + import re + from string import Template + +-from cpp_generator import CppGenerator +-from cpp_generator_templates import CppGeneratorTemplates as CppTemplates ++from .cpp_generator import CppGenerator ++from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates + + log = logging.getLogger('global') + +@@ -52,7 +52,7 @@ + sections = [] + sections.append(self.generate_license()) + sections.append(Template(CppTemplates.AlternateDispatchersHeaderPrelude).substitute(None, **template_args)) +- sections.append('\n'.join(filter(None, map(self._generate_handler_declarations_for_domain, domains)))) ++ sections.append('\n'.join([_f for _f in map(self._generate_handler_declarations_for_domain, domains) if _f])) + sections.append(Template(CppTemplates.AlternateDispatchersHeaderPostlude).substitute(None, **template_args)) + return '\n\n'.join(sections) + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py 2018-02-19 04:47:53.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_header.py 2018-03-03 10:29:27.110362457 -0600 +@@ -30,10 +30,10 @@ + import string + from string import Template + +-from cpp_generator import CppGenerator +-from cpp_generator_templates import CppGeneratorTemplates as CppTemplates +-from generator import Generator, ucfirst +-from models import EnumType ++from .cpp_generator import CppGenerator ++from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates ++from .generator import Generator, ucfirst ++from .models import EnumType + + log = logging.getLogger('global') + +@@ -46,7 +46,7 @@ + return "%sBackendDispatchers.h" % self.protocol_name() + + def domains_to_generate(self): +- return filter(lambda domain: len(self.commands_for_domain(domain)) > 0, Generator.domains_to_generate(self)) ++ return [domain for domain in Generator.domains_to_generate(self) if len(self.commands_for_domain(domain)) > 0] + + def generate_output(self): + typedefs = [('String', 'ErrorString')] +@@ -62,8 +62,8 @@ + sections.append(Template(CppTemplates.HeaderPrelude).substitute(None, **header_args)) + if self.model().framework.setting('alternate_dispatchers', False): + sections.append(self._generate_alternate_handler_forward_declarations_for_domains(domains)) +- sections.extend(map(self._generate_handler_declarations_for_domain, domains)) +- sections.extend(map(self._generate_dispatcher_declarations_for_domain, domains)) ++ sections.extend(list(map(self._generate_handler_declarations_for_domain, domains))) ++ sections.extend(list(map(self._generate_dispatcher_declarations_for_domain, domains))) + sections.append(Template(CppTemplates.HeaderPostlude).substitute(None, **header_args)) + return "\n\n".join(sections) + +@@ -198,7 +198,7 @@ + commands = self.commands_for_domain(domain) + if len(commands) > 0: + declarations.append('private:') +- declarations.extend(map(self._generate_dispatcher_declaration_for_command, commands)) ++ declarations.extend(list(map(self._generate_dispatcher_declaration_for_command, commands))) + + declaration_args = { + 'domainName': domain.domain_name, +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py 2018-02-19 04:47:53.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_backend_dispatcher_implementation.py 2018-03-03 10:29:27.210362879 -0600 +@@ -29,10 +29,10 @@ + import string + from string import Template + +-from cpp_generator import CppGenerator +-from cpp_generator_templates import CppGeneratorTemplates as CppTemplates +-from generator import Generator, ucfirst +-from models import ObjectType, ArrayType ++from .cpp_generator import CppGenerator ++from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates ++from .generator import Generator, ucfirst ++from .models import ObjectType, ArrayType + + log = logging.getLogger('global') + +@@ -45,7 +45,7 @@ + return "%sBackendDispatchers.cpp" % self.protocol_name() + + def domains_to_generate(self): +- return filter(lambda domain: len(self.commands_for_domain(domain)) > 0, Generator.domains_to_generate(self)) ++ return [domain for domain in Generator.domains_to_generate(self) if len(self.commands_for_domain(domain)) > 0] + + def generate_output(self): + secondary_includes = self._generate_secondary_header_includes() +@@ -65,7 +65,7 @@ + sections.append(self.generate_license()) + sections.append(Template(CppTemplates.ImplementationPrelude).substitute(None, **header_args)) + sections.append("\n".join(map(self._generate_handler_class_destructor_for_domain, self.domains_to_generate()))) +- sections.extend(map(self._generate_dispatcher_implementations_for_domain, self.domains_to_generate())) ++ sections.extend(list(map(self._generate_dispatcher_implementations_for_domain, self.domains_to_generate()))) + sections.append(Template(CppTemplates.ImplementationPostlude).substitute(None, **header_args)) + return "\n\n".join(sections) + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py 2018-02-19 04:47:53.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_header.py 2018-03-03 10:29:27.250363047 -0600 +@@ -30,10 +30,10 @@ + import string + from string import Template + +-from cpp_generator import CppGenerator +-from cpp_generator_templates import CppGeneratorTemplates as CppTemplates +-from generator import Generator, ucfirst +-from models import EnumType ++from .cpp_generator import CppGenerator ++from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates ++from .generator import Generator, ucfirst ++from .models import EnumType + + log = logging.getLogger('global') + +@@ -46,7 +46,7 @@ + return "%sFrontendDispatchers.h" % self.protocol_name() + + def domains_to_generate(self): +- return filter(lambda domain: len(self.events_for_domain(domain)) > 0, Generator.domains_to_generate(self)) ++ return [domain for domain in Generator.domains_to_generate(self) if len(self.events_for_domain(domain)) > 0] + + def generate_output(self): + header_args = { +@@ -57,7 +57,7 @@ + sections = [] + sections.append(self.generate_license()) + sections.append(Template(CppTemplates.HeaderPrelude).substitute(None, **header_args)) +- sections.extend(map(self._generate_dispatcher_declarations_for_domain, self.domains_to_generate())) ++ sections.extend(list(map(self._generate_dispatcher_declarations_for_domain, self.domains_to_generate()))) + sections.append(Template(CppTemplates.HeaderPostlude).substitute(None, **header_args)) + return "\n\n".join(sections) + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py 2018-02-19 04:47:53.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_frontend_dispatcher_implementation.py 2018-03-03 10:29:27.286363199 -0600 +@@ -29,10 +29,10 @@ + import string + from string import Template + +-from cpp_generator import CppGenerator +-from cpp_generator_templates import CppGeneratorTemplates as CppTemplates +-from generator import Generator, ucfirst +-from models import ObjectType, ArrayType ++from .cpp_generator import CppGenerator ++from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates ++from .generator import Generator, ucfirst ++from .models import ObjectType, ArrayType + + log = logging.getLogger('global') + +@@ -45,7 +45,7 @@ + return "%sFrontendDispatchers.cpp" % self.protocol_name() + + def domains_to_generate(self): +- return filter(lambda domain: len(self.events_for_domain(domain)) > 0, Generator.domains_to_generate(self)) ++ return [domain for domain in Generator.domains_to_generate(self) if len(self.events_for_domain(domain)) > 0] + + def generate_output(self): + header_args = { +@@ -56,7 +56,7 @@ + sections = [] + sections.append(self.generate_license()) + sections.append(Template(CppTemplates.ImplementationPrelude).substitute(None, **header_args)) +- sections.extend(map(self._generate_dispatcher_implementations_for_domain, self.domains_to_generate())) ++ sections.extend(list(map(self._generate_dispatcher_implementations_for_domain, self.domains_to_generate()))) + sections.append(Template(CppTemplates.ImplementationPostlude).substitute(None, **header_args)) + return "\n\n".join(sections) + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py 2018-02-19 04:47:53.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_header.py 2018-03-03 10:29:27.418363755 -0600 +@@ -31,10 +31,10 @@ + from operator import methodcaller + from string import Template + +-from cpp_generator import CppGenerator +-from cpp_generator_templates import CppGeneratorTemplates as CppTemplates +-from generator import Generator, ucfirst +-from models import EnumType, ObjectType, PrimitiveType, AliasedType, ArrayType, Frameworks ++from .cpp_generator import CppGenerator ++from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates ++from .generator import Generator, ucfirst ++from .models import EnumType, ObjectType, PrimitiveType, AliasedType, ArrayType, Frameworks + + log = logging.getLogger('global') + +@@ -62,8 +62,8 @@ + sections.append(self._generate_forward_declarations(domains)) + sections.append(self._generate_typedefs(domains)) + sections.extend(self._generate_enum_constant_value_conversion_methods()) +- builder_sections = map(self._generate_builders_for_domain, domains) +- sections.extend(filter(lambda section: len(section) > 0, builder_sections)) ++ builder_sections = list(map(self._generate_builders_for_domain, domains)) ++ sections.extend([section for section in builder_sections if len(section) > 0]) + sections.append(self._generate_forward_declarations_for_binding_traits()) + sections.extend(self._generate_declarations_for_enum_conversion_methods()) + sections.append('} // namespace Protocol') +@@ -87,8 +87,8 @@ + + for domain in domains: + declaration_types = [decl.type for decl in self.type_declarations_for_domain(domain)] +- object_types = filter(lambda _type: isinstance(_type, ObjectType), declaration_types) +- enum_types = filter(lambda _type: isinstance(_type, EnumType), declaration_types) ++ object_types = [_type for _type in declaration_types if isinstance(_type, ObjectType)] ++ enum_types = [_type for _type in declaration_types if isinstance(_type, EnumType)] + sorted(object_types, key=methodcaller('raw_name')) + sorted(enum_types, key=methodcaller('raw_name')) + +@@ -113,8 +113,8 @@ + """ % '\n\n'.join(sections) + + def _generate_typedefs(self, domains): +- sections = map(self._generate_typedefs_for_domain, domains) +- sections = filter(lambda text: len(text) > 0, sections) ++ sections = list(map(self._generate_typedefs_for_domain, domains)) ++ sections = [text for text in sections if len(text) > 0] + + if len(sections) == 0: + return '' +@@ -125,8 +125,8 @@ + + def _generate_typedefs_for_domain(self, domain): + type_declarations = self.type_declarations_for_domain(domain) +- primitive_declarations = filter(lambda decl: isinstance(decl.type, AliasedType), type_declarations) +- array_declarations = filter(lambda decl: isinstance(decl.type, ArrayType), type_declarations) ++ primitive_declarations = [decl for decl in type_declarations if isinstance(decl.type, AliasedType)] ++ array_declarations = [decl for decl in type_declarations if isinstance(decl.type, ArrayType)] + if len(primitive_declarations) == 0 and len(array_declarations) == 0: + return '' + +@@ -186,7 +186,7 @@ + elif isinstance(type_declaration.type, ObjectType): + sections.append(self._generate_class_for_object_declaration(type_declaration, domain)) + +- sections = filter(lambda section: len(section) > 0, sections) ++ sections = [section for section in sections if len(section) > 0] + if len(sections) == 0: + return '' + +@@ -200,9 +200,9 @@ + if len(type_declaration.type_members) == 0: + return '' + +- enum_members = filter(lambda member: isinstance(member.type, EnumType) and member.type.is_anonymous, type_declaration.type_members) +- required_members = filter(lambda member: not member.is_optional, type_declaration.type_members) +- optional_members = filter(lambda member: member.is_optional, type_declaration.type_members) ++ enum_members = [member for member in type_declaration.type_members if isinstance(member.type, EnumType) and member.type.is_anonymous] ++ required_members = [member for member in type_declaration.type_members if not member.is_optional] ++ optional_members = [member for member in type_declaration.type_members if member.is_optional] + object_name = type_declaration.type_name + + lines = [] +@@ -261,7 +261,7 @@ + else: + return ' ' + line + +- indented_lines = map(apply_indentation, self._generate_struct_for_enum_type(enum_member.member_name, enum_member.type)) ++ indented_lines = list(map(apply_indentation, self._generate_struct_for_enum_type(enum_member.member_name, enum_member.type))) + return '\n'.join(indented_lines) + + def _generate_struct_for_enum_type(self, enum_name, enum_type): +@@ -275,7 +275,7 @@ + + def _generate_builder_state_enum(self, type_declaration): + lines = [] +- required_members = filter(lambda member: not member.is_optional, type_declaration.type_members) ++ required_members = [member for member in type_declaration.type_members if not member.is_optional] + enum_values = [] + + lines.append(' enum {') +@@ -343,7 +343,7 @@ + + for domain in self.domains_to_generate(): + type_declarations = self.type_declarations_for_domain(domain) +- declarations_to_generate = filter(lambda decl: self.type_needs_shape_assertions(decl.type), type_declarations) ++ declarations_to_generate = [decl for decl in type_declarations if self.type_needs_shape_assertions(decl.type)] + + for type_declaration in declarations_to_generate: + for type_member in type_declaration.type_members: +@@ -394,8 +394,8 @@ + for domain in self.domains_to_generate(): + type_declarations = self.type_declarations_for_domain(domain) + declaration_types = [decl.type for decl in type_declarations] +- object_types = filter(lambda _type: isinstance(_type, ObjectType), declaration_types) +- enum_types = filter(lambda _type: isinstance(_type, EnumType), declaration_types) ++ object_types = [_type for _type in declaration_types if isinstance(_type, ObjectType)] ++ enum_types = [_type for _type in declaration_types if isinstance(_type, EnumType)] + if len(object_types) + len(enum_types) == 0: + continue + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py 2018-02-19 04:47:53.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_cpp_protocol_types_implementation.py 2018-03-03 10:29:27.494364075 -0600 +@@ -30,10 +30,10 @@ + from string import Template + from operator import methodcaller + +-from cpp_generator import CppGenerator +-from cpp_generator_templates import CppGeneratorTemplates as CppTemplates +-from generator import Generator, ucfirst +-from models import AliasedType, ArrayType, EnumType, ObjectType ++from .cpp_generator import CppGenerator ++from .cpp_generator_templates import CppGeneratorTemplates as CppTemplates ++from .generator import Generator, ucfirst ++from .models import AliasedType, ArrayType, EnumType, ObjectType + + log = logging.getLogger('global') + +@@ -65,8 +65,8 @@ + sections.append('namespace Protocol {') + sections.extend(self._generate_enum_mapping_and_conversion_methods(domains)) + sections.append(self._generate_open_field_names()) +- builder_sections = map(self._generate_builders_for_domain, domains) +- sections.extend(filter(lambda section: len(section) > 0, builder_sections)) ++ builder_sections = list(map(self._generate_builders_for_domain, domains)) ++ sections.extend([section for section in builder_sections if len(section) > 0]) + sections.append('} // namespace Protocol') + sections.append(Template(CppTemplates.ImplementationPostlude).substitute(None, **header_args)) + +@@ -128,8 +128,8 @@ + + type_declarations = self.type_declarations_for_domain(domain) + declaration_types = [decl.type for decl in type_declarations] +- object_types = filter(lambda _type: isinstance(_type, ObjectType), declaration_types) +- enum_types = filter(lambda _type: isinstance(_type, EnumType), declaration_types) ++ object_types = [_type for _type in declaration_types if isinstance(_type, ObjectType)] ++ enum_types = [_type for _type in declaration_types if isinstance(_type, EnumType)] + if len(object_types) + len(enum_types) == 0: + return '' + +@@ -156,8 +156,8 @@ + sections = [] + sections.append('namespace %s {' % self.helpers_namespace()) + sections.extend(self._generate_enum_mapping()) +- enum_parser_sections = map(self._generate_enum_conversion_methods_for_domain, domains) +- sections.extend(filter(lambda section: len(section) > 0, enum_parser_sections)) ++ enum_parser_sections = list(map(self._generate_enum_conversion_methods_for_domain, domains)) ++ sections.extend([section for section in enum_parser_sections if len(section) > 0]) + if len(sections) == 1: + return [] # No declarations to emit, just the namespace. + +@@ -168,7 +168,7 @@ + lines = [] + for domain in self.domains_to_generate(): + type_declarations = self.type_declarations_for_domain(domain) +- for type_declaration in filter(lambda decl: Generator.type_has_open_fields(decl.type), type_declarations): ++ for type_declaration in [decl for decl in type_declarations if Generator.type_has_open_fields(decl.type)]: + open_members = Generator.open_fields(type_declaration) + for type_member in sorted(open_members, key=lambda member: member.member_name): + field_name = '::'.join(['Inspector', 'Protocol', domain.domain_name, ucfirst(type_declaration.type_name), ucfirst(type_member.member_name)]) +@@ -179,7 +179,7 @@ + def _generate_builders_for_domain(self, domain): + sections = [] + type_declarations = self.type_declarations_for_domain(domain) +- declarations_to_generate = filter(lambda decl: self.type_needs_shape_assertions(decl.type), type_declarations) ++ declarations_to_generate = [decl for decl in type_declarations if self.type_needs_shape_assertions(decl.type)] + + for type_declaration in declarations_to_generate: + for type_member in type_declaration.type_members: +@@ -200,8 +200,8 @@ + return Template(CppTemplates.ProtocolObjectRuntimeCast).substitute(None, **args) + + def _generate_assertion_for_object_declaration(self, object_declaration): +- required_members = filter(lambda member: not member.is_optional, object_declaration.type_members) +- optional_members = filter(lambda member: member.is_optional, object_declaration.type_members) ++ required_members = [member for member in object_declaration.type_members if not member.is_optional] ++ optional_members = [member for member in object_declaration.type_members if member.is_optional] + should_count_properties = not Generator.type_has_open_fields(object_declaration.type) + lines = [] + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_js_backend_commands.py 2018-03-03 10:29:27.534364244 -0600 +@@ -30,9 +30,9 @@ + import string + from string import Template + +-from generator import Generator, ucfirst +-from generator_templates import GeneratorTemplates as Templates +-from models import EnumType ++from .generator import Generator, ucfirst ++from .generator_templates import GeneratorTemplates as Templates ++from .models import EnumType + + log = logging.getLogger('global') + +@@ -46,16 +46,16 @@ + + def should_generate_domain(self, domain): + type_declarations = self.type_declarations_for_domain(domain) +- domain_enum_types = filter(lambda declaration: isinstance(declaration.type, EnumType), type_declarations) ++ domain_enum_types = [declaration for declaration in type_declarations if isinstance(declaration.type, EnumType)] + return len(self.commands_for_domain(domain)) > 0 or len(self.events_for_domain(domain)) > 0 or len(domain_enum_types) > 0 + + def domains_to_generate(self): +- return filter(self.should_generate_domain, Generator.domains_to_generate(self)) ++ return list(filter(self.should_generate_domain, Generator.domains_to_generate(self))) + + def generate_output(self): + sections = [] + sections.append(self.generate_license()) +- sections.extend(map(self.generate_domain, self.domains_to_generate())) ++ sections.extend(list(map(self.generate_domain, self.domains_to_generate()))) + return "\n\n".join(sections) + + def generate_domain(self, domain): +@@ -70,7 +70,7 @@ + commands = self.commands_for_domain(domain) + events = self.events_for_domain(domain) + +- has_async_commands = any(map(lambda command: command.is_async, commands)) ++ has_async_commands = any([command.is_async for command in commands]) + if len(events) > 0 or has_async_commands: + lines.append('InspectorBackend.register%(domain)sDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "%(domain)s");' % args) + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py 2018-02-19 04:47:53.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_header.py 2018-03-03 10:29:27.574364412 -0600 +@@ -30,11 +30,11 @@ + import re + from string import Template + +-from cpp_generator import CppGenerator +-from generator import Generator +-from models import Frameworks +-from objc_generator import ObjCGenerator +-from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates ++from .cpp_generator import CppGenerator ++from .generator import Generator ++from .models import Frameworks ++from .objc_generator import ObjCGenerator ++from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates + + log = logging.getLogger('global') + +@@ -47,7 +47,7 @@ + return '%sBackendDispatchers.h' % self.protocol_name() + + def domains_to_generate(self): +- return filter(self.should_generate_commands_for_domain, Generator.domains_to_generate(self)) ++ return list(filter(self.should_generate_commands_for_domain, Generator.domains_to_generate(self))) + + def generate_output(self): + headers = [ +@@ -64,7 +64,7 @@ + sections = [] + sections.append(self.generate_license()) + sections.append(Template(ObjCTemplates.BackendDispatcherHeaderPrelude).substitute(None, **header_args)) +- sections.extend(map(self._generate_objc_handler_declarations_for_domain, domains)) ++ sections.extend(list(map(self._generate_objc_handler_declarations_for_domain, domains))) + sections.append(Template(ObjCTemplates.BackendDispatcherHeaderPostlude).substitute(None, **header_args)) + return '\n\n'.join(sections) + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_backend_dispatcher_implementation.py 2018-03-03 10:29:27.650364732 -0600 +@@ -30,11 +30,11 @@ + import re + from string import Template + +-from cpp_generator import CppGenerator +-from generator import Generator +-from models import PrimitiveType, EnumType, AliasedType, Frameworks +-from objc_generator import ObjCTypeCategory, ObjCGenerator, join_type_and_name +-from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates ++from .cpp_generator import CppGenerator ++from .generator import Generator ++from .models import PrimitiveType, EnumType, AliasedType, Frameworks ++from .objc_generator import ObjCTypeCategory, ObjCGenerator, join_type_and_name ++from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates + + log = logging.getLogger('global') + +@@ -47,7 +47,7 @@ + return '%sBackendDispatchers.mm' % self.protocol_name() + + def domains_to_generate(self): +- return filter(self.should_generate_commands_for_domain, Generator.domains_to_generate(self)) ++ return list(filter(self.should_generate_commands_for_domain, Generator.domains_to_generate(self))) + + def generate_output(self): + secondary_headers = [ +@@ -65,7 +65,7 @@ + sections = [] + sections.append(self.generate_license()) + sections.append(Template(ObjCTemplates.BackendDispatcherImplementationPrelude).substitute(None, **header_args)) +- sections.extend(map(self._generate_handler_implementation_for_domain, domains)) ++ sections.extend(list(map(self._generate_handler_implementation_for_domain, domains))) + sections.append(Template(ObjCTemplates.BackendDispatcherImplementationPostlude).substitute(None, **header_args)) + return '\n\n'.join(sections) + +@@ -114,7 +114,7 @@ + if command.return_parameters: + lines.append(' Ref resultObject = JSON::Object::create();') + +- required_pointer_parameters = filter(lambda parameter: not parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type), command.return_parameters) ++ required_pointer_parameters = [parameter for parameter in command.return_parameters if not parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type)] + for parameter in required_pointer_parameters: + var_name = ObjCGenerator.identifier_to_objc_identifier(parameter.parameter_name) + lines.append(' THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(%s, @"%s");' % (var_name, var_name)) +@@ -122,7 +122,7 @@ + if objc_array_class and objc_array_class.startswith(self.objc_prefix()): + lines.append(' THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(%s, [%s class]);' % (var_name, objc_array_class)) + +- optional_pointer_parameters = filter(lambda parameter: parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type), command.return_parameters) ++ optional_pointer_parameters = [parameter for parameter in command.return_parameters if parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type)] + for parameter in optional_pointer_parameters: + var_name = ObjCGenerator.identifier_to_objc_identifier(parameter.parameter_name) + lines.append(' THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(%s, @"%s");' % (var_name, var_name)) +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_header.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_header.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_header.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_header.py 2018-03-03 10:29:27.674364834 -0600 +@@ -29,9 +29,9 @@ + import string + from string import Template + +-from generator import Generator +-from objc_generator import ObjCGenerator +-from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates ++from .generator import Generator ++from .objc_generator import ObjCGenerator ++from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates + + log = logging.getLogger('global') + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_implementation.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_implementation.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_implementation.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_configuration_implementation.py 2018-03-03 10:29:27.714365002 -0600 +@@ -29,9 +29,9 @@ + import string + from string import Template + +-from generator import Generator +-from objc_generator import ObjCGenerator +-from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates ++from .generator import Generator ++from .objc_generator import ObjCGenerator ++from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates + + log = logging.getLogger('global') + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py 2018-03-03 10:29:27.766365221 -0600 +@@ -29,10 +29,10 @@ + import string + from string import Template + +-from cpp_generator import CppGenerator +-from generator import Generator, ucfirst +-from objc_generator import ObjCGenerator +-from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates ++from .cpp_generator import CppGenerator ++from .generator import Generator, ucfirst ++from .objc_generator import ObjCGenerator ++from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates + + log = logging.getLogger('global') + +@@ -45,7 +45,7 @@ + return '%sEventDispatchers.mm' % self.protocol_name() + + def domains_to_generate(self): +- return filter(self.should_generate_events_for_domain, Generator.domains_to_generate(self)) ++ return list(filter(self.should_generate_events_for_domain, Generator.domains_to_generate(self))) + + def generate_output(self): + secondary_headers = [ +@@ -62,7 +62,7 @@ + sections = [] + sections.append(self.generate_license()) + sections.append(Template(ObjCTemplates.ImplementationPrelude).substitute(None, **header_args)) +- sections.extend(map(self._generate_event_dispatcher_implementations, domains)) ++ sections.extend(list(map(self._generate_event_dispatcher_implementations, domains))) + sections.append(Template(ObjCTemplates.ImplementationPostlude).substitute(None, **header_args)) + return '\n\n'.join(sections) + +@@ -100,7 +100,7 @@ + lines.append(' const FrontendRouter& router = _controller->frontendRouter();') + lines.append('') + +- required_pointer_parameters = filter(lambda parameter: not parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type), event.event_parameters) ++ required_pointer_parameters = [parameter for parameter in event.event_parameters if not parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type)] + for parameter in required_pointer_parameters: + var_name = ObjCGenerator.identifier_to_objc_identifier(parameter.parameter_name) + lines.append(' THROW_EXCEPTION_FOR_REQUIRED_PARAMETER(%s, @"%s");' % (var_name, var_name)) +@@ -108,7 +108,7 @@ + if objc_array_class and objc_array_class.startswith(self.objc_prefix()): + lines.append(' THROW_EXCEPTION_FOR_BAD_TYPE_IN_ARRAY(%s, [%s class]);' % (var_name, objc_array_class)) + +- optional_pointer_parameters = filter(lambda parameter: parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type), event.event_parameters) ++ optional_pointer_parameters = [parameter for parameter in event.event_parameters if parameter.is_optional and ObjCGenerator.is_type_objc_pointer_type(parameter.type)] + for parameter in optional_pointer_parameters: + var_name = ObjCGenerator.identifier_to_objc_identifier(parameter.parameter_name) + lines.append(' THROW_EXCEPTION_FOR_BAD_OPTIONAL_PARAMETER(%s, @"%s");' % (var_name, var_name)) +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py 2018-03-03 10:29:27.850365575 -0600 +@@ -29,10 +29,10 @@ + import string + from string import Template + +-from generator import Generator, ucfirst +-from models import ObjectType, EnumType, Platforms +-from objc_generator import ObjCGenerator, join_type_and_name +-from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates ++from .generator import Generator, ucfirst ++from .models import ObjectType, EnumType, Platforms ++from .objc_generator import ObjCGenerator, join_type_and_name ++from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates + + log = logging.getLogger('global') + +@@ -60,9 +60,9 @@ + } + + domains = self.domains_to_generate() +- type_domains = filter(self.should_generate_types_for_domain, domains) +- command_domains = filter(self.should_generate_commands_for_domain, domains) +- event_domains = filter(self.should_generate_events_for_domain, domains) ++ type_domains = list(filter(self.should_generate_types_for_domain, domains)) ++ command_domains = list(filter(self.should_generate_commands_for_domain, domains)) ++ event_domains = list(filter(self.should_generate_events_for_domain, domains)) + + # FIXME: Web Inspector: Reduce unnecessary enums/types generated in ObjC Protocol Interfaces + # Currently we generate enums/types for all types in the type_domains. For the built-in +@@ -72,14 +72,14 @@ + sections = [] + sections.append(self.generate_license()) + sections.append(Template(ObjCTemplates.HeaderPrelude).substitute(None, **header_args)) +- sections.append('\n'.join(filter(None, map(self._generate_forward_declarations, type_domains)))) ++ sections.append('\n'.join([_f for _f in map(self._generate_forward_declarations, type_domains) if _f])) + sections.append(self._generate_enum_for_platforms()) +- sections.append('\n'.join(filter(None, map(self._generate_enums, type_domains)))) +- sections.append('\n'.join(filter(None, map(self._generate_types, type_domains)))) ++ sections.append('\n'.join([_f for _f in map(self._generate_enums, type_domains) if _f])) ++ sections.append('\n'.join([_f for _f in map(self._generate_types, type_domains) if _f])) + + if self.get_generator_setting('generate_backend', False): +- sections.append('\n\n'.join(filter(None, map(self._generate_command_protocols, command_domains)))) +- sections.append('\n\n'.join(filter(None, map(self._generate_event_interfaces, event_domains)))) ++ sections.append('\n\n'.join([_f for _f in map(self._generate_command_protocols, command_domains) if _f])) ++ sections.append('\n\n'.join([_f for _f in map(self._generate_event_interfaces, event_domains) if _f])) + + sections.append(Template(ObjCTemplates.HeaderPostlude).substitute(None)) + return '\n\n'.join(sections) +@@ -171,8 +171,8 @@ + lines.append('- (instancetype)initWithPayload:(NSDictionary *)payload;') + lines.append('- (instancetype)initWithProtocolObject:(RWIProtocolJSONObject *)jsonObject;') + +- required_members = filter(lambda member: not member.is_optional, declaration.type_members) +- optional_members = filter(lambda member: member.is_optional, declaration.type_members) ++ required_members = [member for member in declaration.type_members if not member.is_optional] ++ optional_members = [member for member in declaration.type_members if member.is_optional] + if required_members: + lines.append(self._generate_init_method_for_required_members(domain, declaration, required_members)) + for member in required_members: +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_internal_header.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_internal_header.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_internal_header.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_internal_header.py 2018-03-03 10:29:27.870365659 -0600 +@@ -29,9 +29,9 @@ + import string + from string import Template + +-from generator import Generator, ucfirst +-from objc_generator import ObjCGenerator +-from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates ++from .generator import Generator, ucfirst ++from .objc_generator import ObjCGenerator ++from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates + + log = logging.getLogger('global') + +@@ -55,12 +55,12 @@ + 'includes': '\n'.join(['#import ' + header for header in sorted(headers)]), + } + +- event_domains = filter(self.should_generate_events_for_domain, self.domains_to_generate()) ++ event_domains = list(filter(self.should_generate_events_for_domain, self.domains_to_generate())) + + sections = [] + sections.append(self.generate_license()) + sections.append(Template(ObjCTemplates.GenericHeaderPrelude).substitute(None, **header_args)) +- sections.append('\n\n'.join(filter(None, map(self._generate_event_dispatcher_private_interfaces, event_domains)))) ++ sections.append('\n\n'.join([_f for _f in map(self._generate_event_dispatcher_private_interfaces, event_domains) if _f])) + sections.append(Template(ObjCTemplates.GenericHeaderPostlude).substitute(None, **header_args)) + return '\n\n'.join(sections) + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py 2018-03-03 10:29:27.930365912 -0600 +@@ -29,10 +29,10 @@ + import string + from string import Template + +-from generator import Generator +-from models import EnumType, Frameworks, Platforms +-from objc_generator import ObjCGenerator +-from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates ++from .generator import Generator ++from .models import EnumType, Frameworks, Platforms ++from .objc_generator import ObjCGenerator ++from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates + + log = logging.getLogger('global') + +@@ -51,7 +51,7 @@ + return '%sTypeConversions.h' % self.protocol_name() + + def domains_to_generate(self): +- return filter(self.should_generate_types_for_domain, Generator.domains_to_generate(self)) ++ return list(filter(self.should_generate_types_for_domain, Generator.domains_to_generate(self))) + + def generate_output(self): + headers = [ +@@ -70,7 +70,7 @@ + sections.append(Template(ObjCTemplates.TypeConversionsHeaderPrelude).substitute(None, **header_args)) + sections.append(Template(ObjCTemplates.TypeConversionsHeaderStandard).substitute(None)) + sections.append(self._generate_enum_conversion_for_platforms()) +- sections.extend(map(self._generate_enum_conversion_functions, domains)) ++ sections.extend(list(map(self._generate_enum_conversion_functions, domains))) + sections.append(Template(ObjCTemplates.TypeConversionsHeaderPostlude).substitute(None, **header_args)) + return '\n\n'.join(sections) + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_implementation.py 2018-03-03 10:29:27.974366097 -0600 +@@ -28,10 +28,10 @@ + import string + from string import Template + +-from generator import Generator +-from models import EnumType, ObjectType, ArrayType, AliasedType, PrimitiveType, Frameworks +-from objc_generator import ObjCGenerator +-from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates ++from .generator import Generator ++from .models import EnumType, ObjectType, ArrayType, AliasedType, PrimitiveType, Frameworks ++from .objc_generator import ObjCGenerator ++from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates + + log = logging.getLogger('global') + +@@ -50,7 +50,7 @@ + return '%sTypeConversions.mm' % self.protocol_name() + + def domains_to_generate(self): +- return filter(self.should_generate_types_for_domain, Generator.domains_to_generate(self)) ++ return list(filter(self.should_generate_types_for_domain, Generator.domains_to_generate(self))) + + def generate_output(self): + secondary_headers = [ +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_types_implementation.py 2018-03-03 10:29:28.046366401 -0600 +@@ -29,10 +29,10 @@ + import string + from string import Template + +-from generator import Generator, ucfirst +-from models import ObjectType, EnumType, Frameworks +-from objc_generator import ObjCTypeCategory, ObjCGenerator +-from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates ++from .generator import Generator, ucfirst ++from .models import ObjectType, EnumType, Frameworks ++from .objc_generator import ObjCTypeCategory, ObjCGenerator ++from .objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates + + log = logging.getLogger('global') + +@@ -51,7 +51,7 @@ + return '%sTypes.mm' % self.protocol_name() + + def domains_to_generate(self): +- return filter(self.should_generate_types_for_domain, Generator.domains_to_generate(self)) ++ return list(filter(self.should_generate_types_for_domain, Generator.domains_to_generate(self))) + + def generate_output(self): + secondary_headers = [ +@@ -75,7 +75,7 @@ + sections = [] + sections.append(self.generate_license()) + sections.append(Template(ObjCTemplates.ImplementationPrelude).substitute(None, **header_args)) +- sections.extend(map(self.generate_type_implementations, domains)) ++ sections.extend(list(map(self.generate_type_implementations, domains))) + sections.append(Template(ObjCTemplates.ImplementationPostlude).substitute(None, **header_args)) + return '\n\n'.join(sections) + +@@ -95,7 +95,7 @@ + lines.append('') + lines.append(self._generate_init_method_for_payload(domain, declaration)) + lines.append(self._generate_init_method_for_protocol_object(domain, declaration)) +- required_members = filter(lambda member: not member.is_optional, declaration.type_members) ++ required_members = [member for member in declaration.type_members if not member.is_optional] + if required_members: + lines.append('') + lines.append(self._generate_init_method_for_required_members(domain, declaration, required_members)) +@@ -167,7 +167,7 @@ + lines.append(' return nil;') + lines.append('') + +- required_pointer_members = filter(lambda member: ObjCGenerator.is_type_objc_pointer_type(member.type), required_members) ++ required_pointer_members = [member for member in required_members if ObjCGenerator.is_type_objc_pointer_type(member.type)] + if required_pointer_members: + for member in required_pointer_members: + var_name = ObjCGenerator.identifier_to_objc_identifier(member.member_name) +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generator.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generator.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/generator.py 2018-02-19 04:47:53.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/generator.py 2018-03-03 10:29:28.178366957 -0600 +@@ -29,8 +29,8 @@ + import re + from string import Template + +-from generator_templates import GeneratorTemplates as Templates +-from models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks, Platforms ++from .generator_templates import GeneratorTemplates as Templates ++from .models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks, Platforms + + log = logging.getLogger('global') + +@@ -140,7 +140,7 @@ + + # These methods are overridden by subclasses. + def non_supplemental_domains(self): +- return filter(lambda domain: not domain.is_supplemental, self.model().domains) ++ return [domain for domain in self.model().domains if not domain.is_supplemental] + + def domains_to_generate(self): + return self.non_supplemental_domains() +@@ -176,7 +176,7 @@ + fields = set(_TYPES_WITH_OPEN_FIELDS.get(type_declaration.type.qualified_name(), [])) + if not fields: + return type_declaration.type_members +- return filter(lambda member: member.member_name in fields, type_declaration.type_members) ++ return [member for member in type_declaration.type_members if member.member_name in fields] + + def type_needs_shape_assertions(self, _type): + if not hasattr(self, "_types_needing_shape_assertions"): +@@ -189,7 +189,7 @@ + # set of types will not be automatically regenerated on subsequent calls to + # Generator.types_needing_shape_assertions(). + def calculate_types_requiring_shape_assertions(self, domains): +- domain_names = map(lambda domain: domain.domain_name, domains) ++ domain_names = [domain.domain_name for domain in domains] + log.debug("> Calculating types that need shape assertions (eligible domains: %s)" % ", ".join(domain_names)) + + # Mutates the passed-in set; this simplifies checks to prevent infinite recursion. +@@ -245,7 +245,7 @@ + for _type in all_types: + if not isinstance(_type, EnumType): + continue +- map(self._assign_encoding_for_enum_value, _type.enum_values()) ++ list(map(self._assign_encoding_for_enum_value, _type.enum_values())) + + def _assign_encoding_for_enum_value(self, enum_value): + if enum_value in self._enum_value_encodings: +@@ -279,7 +279,7 @@ + return _ALWAYS_SPECIALCASED_ENUM_VALUE_LOOKUP_TABLE[match.group(1).upper()] + + # Split on hyphen, introduce camelcase, and force uppercasing of acronyms. +- subwords = map(ucfirst, _ENUM_IDENTIFIER_RENAME_MAP.get(enum_value, enum_value).split('-')) ++ subwords = list(map(ucfirst, _ENUM_IDENTIFIER_RENAME_MAP.get(enum_value, enum_value).split('-'))) + return re.sub(re.compile(regex, re.IGNORECASE), replaceCallback, "".join(subwords)) + + @staticmethod +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/__init__.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/__init__.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/__init__.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/__init__.py 2018-03-03 10:27:16.885813621 -0600 +@@ -1,25 +1,25 @@ + # Required for Python to search this directory for module files + +-from models import * +-from generator import * +-from cpp_generator import * +-from objc_generator import * ++from .models import * ++from .generator import * ++from .cpp_generator import * ++from .objc_generator import * + +-from generate_cpp_alternate_backend_dispatcher_header import * +-from generate_cpp_backend_dispatcher_header import * +-from generate_cpp_backend_dispatcher_implementation import * +-from generate_cpp_frontend_dispatcher_header import * +-from generate_cpp_frontend_dispatcher_implementation import * +-from generate_cpp_protocol_types_header import * +-from generate_cpp_protocol_types_implementation import * +-from generate_js_backend_commands import * +-from generate_objc_backend_dispatcher_header import * +-from generate_objc_backend_dispatcher_implementation import * +-from generate_objc_configuration_header import * +-from generate_objc_configuration_implementation import * +-from generate_objc_frontend_dispatcher_implementation import * +-from generate_objc_header import * +-from generate_objc_internal_header import * +-from generate_objc_protocol_types_implementation import * +-from generate_objc_protocol_type_conversions_header import * +-from generate_objc_protocol_type_conversions_implementation import * ++from .generate_cpp_alternate_backend_dispatcher_header import * ++from .generate_cpp_backend_dispatcher_header import * ++from .generate_cpp_backend_dispatcher_implementation import * ++from .generate_cpp_frontend_dispatcher_header import * ++from .generate_cpp_frontend_dispatcher_implementation import * ++from .generate_cpp_protocol_types_header import * ++from .generate_cpp_protocol_types_implementation import * ++from .generate_js_backend_commands import * ++from .generate_objc_backend_dispatcher_header import * ++from .generate_objc_backend_dispatcher_implementation import * ++from .generate_objc_configuration_header import * ++from .generate_objc_configuration_implementation import * ++from .generate_objc_frontend_dispatcher_implementation import * ++from .generate_objc_header import * ++from .generate_objc_internal_header import * ++from .generate_objc_protocol_types_implementation import * ++from .generate_objc_protocol_type_conversions_header import * ++from .generate_objc_protocol_type_conversions_implementation import * +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/models.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/models.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/models.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/models.py 2018-03-03 10:29:28.370367765 -0600 +@@ -35,7 +35,7 @@ + + + def find_duplicates(l): +- return [key for key, count in collections.Counter(l).items() if count > 1] ++ return [key for key, count in list(collections.Counter(l).items()) if count > 1] + + + _FRAMEWORK_CONFIG_MAP = { +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py 2018-02-19 01:45:15.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/inspector/scripts/codegen/objc_generator.py 2018-03-03 10:29:28.534368456 -0600 +@@ -24,8 +24,8 @@ + # THE POSSIBILITY OF SUCH DAMAGE. + + import logging +-from generator import Generator, ucfirst +-from models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks ++from .generator import Generator, ucfirst ++from .models import PrimitiveType, ObjectType, ArrayType, EnumType, AliasedType, Frameworks + + log = logging.getLogger('global') + +@@ -50,7 +50,7 @@ + 'id': 'identifier', # Page.Frame.id, Runtime.ExecutionContextDescription.id, Debugger.BreakpointAction.id + } + +-_OBJC_IDENTIFIER_REVERSE_RENAME_MAP = dict((v, k) for k, v in _OBJC_IDENTIFIER_RENAME_MAP.iteritems()) ++_OBJC_IDENTIFIER_REVERSE_RENAME_MAP = dict((v, k) for k, v in _OBJC_IDENTIFIER_RENAME_MAP.items()) + + + class ObjCTypeCategory: +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py 2018-02-19 01:45:14.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/builtins/builtins_generate_combined_header.py 2018-03-03 10:31:53.878980553 -0600 +@@ -158,7 +158,7 @@ + + lines = [] + lines.append("#define %(macroPrefix)s_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(macro) \\" % args) +- functions = filter(lambda function: function.is_global_private, self.model().all_functions()) ++ functions = [function for function in self.model().all_functions() if function.is_global_private] + functions.sort(key=lambda x: x.function_name) + for function in functions: + function_args = { +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_header.py webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_header.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_header.py 2018-02-19 01:45:14.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_header.py 2018-03-03 10:31:53.878980553 -0600 +@@ -36,7 +36,7 @@ + class BuiltinsInternalsWrapperHeaderGenerator(BuiltinsGenerator): + def __init__(self, model): + BuiltinsGenerator.__init__(self, model) +- self.internals = filter(lambda object: 'internal' in object.annotations, model.objects) ++ self.internals = [object for object in model.objects if 'internal' in object.annotations] + + def output_filename(self): + return "%sJSBuiltinInternals.h" % self.model().framework.setting('namespace') +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_implementation.py webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_implementation.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_implementation.py 2018-02-19 01:45:14.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_implementation.py 2018-03-03 10:31:53.878980553 -0600 +@@ -36,7 +36,7 @@ + class BuiltinsInternalsWrapperImplementationGenerator(BuiltinsGenerator): + def __init__(self, model): + BuiltinsGenerator.__init__(self, model) +- self.internals = filter(lambda object: 'internal' in object.annotations, model.objects) ++ self.internals = [object for object in model.objects if 'internal' in object.annotations] + + def output_filename(self): + return "%sJSBuiltinInternals.cpp" % self.model().framework.setting('namespace') +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/builtins/builtins_model.py webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/builtins/builtins_model.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/builtins/builtins_model.py 2018-02-19 01:45:14.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/builtins/builtins_model.py 2018-03-03 10:31:53.878980553 -0600 +@@ -26,6 +26,7 @@ + import logging + import re + import os ++import sys + + from builtins_templates import BuiltinsGeneratorTemplates as Templates + +@@ -155,6 +156,8 @@ + + return interface + ++ def __lt__(a,b): ++ return a.function_name < b.function_name + + class BuiltinsCollection: + def __init__(self, framework_name): +@@ -210,7 +213,7 @@ + + 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)) +@@ -303,4 +306,4 @@ + 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)) +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/cssmin.py webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/cssmin.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/cssmin.py 2018-02-19 01:45:14.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/cssmin.py 2018-03-06 10:13:10.065229770 -0600 +@@ -46,4 +46,7 @@ + if sys.version_info[0] == 3 and sys.stdin.encoding != 'UTF-8': + import io + sys.stdin = io.TextIOWrapper(sys.stdin.buffer, encoding='UTF-8') ++ if sys.version_info[0] == 3 and sys.stdout.encoding != 'UTF-8': ++ import io ++ sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='UTF-8') + sys.stdout.write(cssminify(sys.stdin.read())) +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/generate-js-builtins.py webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/generate-js-builtins.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/generate-js-builtins.py 2018-02-19 01:45:14.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/generate-js-builtins.py 2018-03-03 10:31:03.854769938 -0600 +@@ -31,20 +31,33 @@ + 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 + +-from builtins import * +- ++from builtins_model import * ++from builtins_generate_combined_header import * ++from builtins_generate_combined_implementation import * ++from builtins_generate_separate_header import * ++from builtins_generate_separate_implementation import * ++from builtins_generate_wrapper_header import * ++from builtins_generate_wrapper_implementation import * ++from builtins_generate_internals_wrapper_header import * ++from builtins_generate_internals_wrapper_implementation import * + + def concatenated_output_filename(builtins_files, framework_name, generate_only_wrapper_files): + if generate_only_wrapper_files: + return framework_name + 'JSBuiltins.h-result' + return os.path.basename(builtins_files[0]) + '-result' + ++def doopen(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, +@@ -59,7 +72,7 @@ + model = BuiltinsCollection(framework_name=framework_name) + + for filepath in builtins_files: +- with open(filepath, "r") as file: ++ with doopen(filepath, "r") as file: + file_text = file.read() + file_name = os.path.basename(filepath) + +@@ -146,7 +159,7 @@ + for filepath in os.listdir(arg_options.input_directory): + input_filepaths.append(os.path.join(arg_options.input_directory, filepath)) + +- input_filepaths = sorted(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, +@@ -159,7 +172,7 @@ + + 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:") +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/generateYarrUnicodePropertyTables.py webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/generateYarrUnicodePropertyTables.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/generateYarrUnicodePropertyTables.py 2018-02-19 01:45:14.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/generateYarrUnicodePropertyTables.py 2018-03-05 10:40:12.417625895 -0600 +@@ -90,7 +90,10 @@ + + def openOrExit(path, mode): + try: +- return open(path, mode) ++ if sys.version_info.major == 2 or mode == "wb" or mode == "rb": ++ return open(path, mode) ++ else: ++ return open(path, mode, encoding = "UTF-8") + except IOError as e: + print("I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)) + exit(1) +@@ -214,6 +217,12 @@ + return "" + return self.aliasToScript[name] + ++def dowrite(file, str): ++ if sys.version_info.major == 2: ++ file.write(str) ++ else: ++ file.write(bytes(str, "utf-8")) ++ + + class PropertyData: + allPropertyData = [] +@@ -322,7 +331,7 @@ + insertLocation = None + lowCodePoint = None + highCodePoint = None +- for idx in xrange(len(matches)): ++ for idx in range(len(matches)): + match = matches[idx] + if codePoint == match + 1: + lowCodePoint = match +@@ -351,22 +360,22 @@ + lowCodePoint = codePoint + highCodePoint = codePoint + +- for idx in xrange(len(ranges)): +- range = ranges[idx] +- if lowCodePoint >= range[0] and highCodePoint <= range[1]: ++ for idx in range(len(ranges)): ++ cur_range = ranges[idx] ++ if lowCodePoint >= cur_range[0] and highCodePoint <= cur_range[1]: + return +- if lowCodePoint <= (range[1] + 1) and highCodePoint >= (range[0] - 1): ++ if lowCodePoint <= (cur_range[1] + 1) and highCodePoint >= (cur_range[0] - 1): + while idx < len(ranges) and highCodePoint >= (ranges[idx][0] - 1): +- range = ranges[idx] +- lowCodePoint = min(lowCodePoint, range[0]) +- highCodePoint = max(highCodePoint, range[1]) ++ cur_range = ranges[idx] ++ lowCodePoint = min(lowCodePoint, cur_range[0]) ++ highCodePoint = max(highCodePoint, cur_range[1]) + del ranges[idx] +- self.codePointCount = self.codePointCount - (range[1] - range[0]) - 1 ++ self.codePointCount = self.codePointCount - (cur_range[1] - cur_range[0]) - 1 + + ranges.insert(idx, (lowCodePoint, highCodePoint)) + self.codePointCount = self.codePointCount + (highCodePoint - lowCodePoint) + 1 + return +- elif highCodePoint < range[0]: ++ elif highCodePoint < cur_range[0]: + if lowCodePoint != highCodePoint: + ranges.insert(idx, (lowCodePoint, highCodePoint)) + self.codePointCount = self.codePointCount + (highCodePoint - lowCodePoint) + 1 +@@ -384,7 +393,7 @@ + + def addRangeUnorderedForMatchesAndRanges(self, lowCodePoint, highCodePoint, matches, ranges): + if len(matches) and highCodePoint >= matches[0] and lowCodePoint <= matches[-1]: +- for idx in xrange(len(matches)): ++ for idx in range(len(matches)): + match = matches[idx] + if lowCodePoint <= match and highCodePoint >= match: + while idx < len(matches) and highCodePoint >= matches[idx]: +@@ -414,22 +423,22 @@ + elif highCodePoint < match: + break + +- for idx in xrange(len(ranges)): +- range = ranges[idx] +- if lowCodePoint >= range[0] and highCodePoint <= range[1]: ++ for idx in range(len(ranges)): ++ cur_range = ranges[idx] ++ if lowCodePoint >= cur_range[0] and highCodePoint <= cur_range[1]: + return +- if lowCodePoint <= (range[1] + 1) and highCodePoint >= (range[0] - 1): ++ if lowCodePoint <= (cur_range[1] + 1) and highCodePoint >= (cur_range[0] - 1): + while idx < len(ranges) and highCodePoint >= (ranges[idx][0] - 1): +- range = ranges[idx] +- lowCodePoint = min(lowCodePoint, range[0]) +- highCodePoint = max(highCodePoint, range[1]) ++ cur_range = ranges[idx] ++ lowCodePoint = min(lowCodePoint, cur_range[0]) ++ highCodePoint = max(highCodePoint, cur_range[1]) + del ranges[idx] +- self.codePointCount = self.codePointCount - (range[1] - range[0]) - 1 ++ self.codePointCount = self.codePointCount - (cur_range[1] - cur_range[0]) - 1 + + ranges.insert(idx, (lowCodePoint, highCodePoint)) + self.codePointCount = self.codePointCount + (highCodePoint - lowCodePoint) + 1 + return +- elif highCodePoint < range[0]: ++ elif highCodePoint < cur_range[0]: + ranges.insert(idx, (lowCodePoint, highCodePoint)) + self.codePointCount = self.codePointCount + (highCodePoint - lowCodePoint) + 1 + return +@@ -459,13 +468,13 @@ + self.addRangeUnorderedForMatchesAndRanges(firstUnicodeCodePoint, highCodePoint, self.unicodeMatches, self.unicodeRanges) + + def removeMatchFromRanges(self, codePoint, ranges): +- for idx in xrange(len(ranges)): +- range = ranges[idx] +- if range[0] <= codePoint and codePoint <= range[1]: ++ for idx in range(len(ranges)): ++ cur_range = ranges[idx] ++ if cur_range[0] <= codePoint and codePoint <= cur_range[1]: + ranges.pop(idx) +- if range[0] < codePoint and codePoint < range[1]: +- lowRange = (range[0], codePoint - 1) +- highRange = (codePoint + 1, range[1]) ++ if cur_range[0] < codePoint and codePoint < cur_range[1]: ++ lowRange = (cur_range[0], codePoint - 1) ++ highRange = (codePoint + 1, cur_range[1]) + # Since list.insert inserts before the index given, handle the high range first + if highRange[0] == highRange[1]: + self.addMatchUnordered(highRange[0]) +@@ -476,14 +485,14 @@ + else: + ranges.insert(idx, lowRange) + else: +- if range[0] == codePoint: +- range = (codePoint + 1, range[1]) ++ if cur_range[0] == codePoint: ++ cur_range = (codePoint + 1, cur_range[1]) + else: +- range = (range[0], codePoint - 1) +- if range[0] == range[1]: +- self.addMatchUnordered(range[0]) ++ cur_range = (cur_range[0], codePoint - 1) ++ if cur_range[0] == cur_range[1]: ++ self.addMatchUnordered(cur_range[0]) + else: +- ranges.insert(idx, range) ++ ranges.insert(idx, cur_range) + self.codePointCount = self.codePointCount - 1 + return + +@@ -505,59 +514,59 @@ + valuesThisLine = 0 + firstValue = True + +- file.write("{") ++ dowrite(file, "{") + for elem in dataList: + if firstValue: + firstValue = False + else: +- file.write(", ") ++ dowrite(file, ", ") + valuesThisLine = valuesThisLine + 1 + if valuesThisLine > valuesPerLine: +- file.write("\n ") ++ dowrite(file, "\n ") + valuesThisLine = 1 + formatter(file, elem) +- file.write("}") ++ dowrite(file, "}") + + def dump(self, file, commaAfter): +- file.write("static std::unique_ptr {}()\n{{\n".format(self.getCreateFuncName())) +- file.write(" // Name = {}, number of codePoints: {}\n".format(self.name, self.codePointCount)) +- file.write(" auto characterClass = std::make_unique(\n") +- file.write(" std::initializer_list(") +- self.dumpMatchData(file, 8, self.matches, lambda file, match: (file.write("{0:0=#4x}".format(match)))) +- file.write("),\n") +- file.write(" std::initializer_list(") +- self.dumpMatchData(file, 4, self.ranges, lambda file, range: (file.write("{{{0:0=#4x}, {1:0=#4x}}}".format(range[0], range[1])))) +- file.write("),\n") +- file.write(" std::initializer_list(") +- self.dumpMatchData(file, 8, self.unicodeMatches, lambda file, match: (file.write("{0:0=#6x}".format(match)))) +- file.write("),\n") +- file.write(" std::initializer_list(") +- self.dumpMatchData(file, 4, self.unicodeRanges, lambda file, range: (file.write("{{{0:0=#6x}, {1:0=#6x}}}".format(range[0], range[1])))) +- file.write("));\n") ++ dowrite(file, "static std::unique_ptr {}()\n{{\n".format(self.getCreateFuncName())) ++ dowrite(file, " // Name = {}, number of codePoints: {}\n".format(self.name, self.codePointCount)) ++ dowrite(file, " auto characterClass = std::make_unique(\n") ++ dowrite(file, " std::initializer_list(") ++ self.dumpMatchData(file, 8, self.matches, lambda file, match: (dowrite(file, "{0:0=#4x}".format(match)))) ++ dowrite(file, "),\n") ++ dowrite(file, " std::initializer_list(") ++ self.dumpMatchData(file, 4, self.ranges, lambda file, range: (dowrite(file, "{{{0:0=#4x}, {1:0=#4x}}}".format(range[0], range[1])))) ++ dowrite(file, "),\n") ++ dowrite(file, " std::initializer_list(") ++ self.dumpMatchData(file, 8, self.unicodeMatches, lambda file, match: (dowrite(file, "{0:0=#6x}".format(match)))) ++ dowrite(file, "),\n") ++ dowrite(file, " std::initializer_list(") ++ self.dumpMatchData(file, 4, self.unicodeRanges, lambda file, range: (dowrite(file, "{{{0:0=#6x}, {1:0=#6x}}}".format(range[0], range[1])))) ++ dowrite(file, "));\n") + +- file.write(" characterClass->m_hasNonBMPCharacters = {};\n".format(("false", "true")[self.hasNonBMPCharacters])) +- file.write(" return characterClass;\n}\n\n") ++ dowrite(file, " characterClass->m_hasNonBMPCharacters = {};\n".format(("false", "true")[self.hasNonBMPCharacters])) ++ dowrite(file, " return characterClass;\n}\n\n") + + @classmethod + def dumpAll(cls, file): + for propertyData in cls.allPropertyData: + propertyData.dump(file, propertyData != cls.allPropertyData[-1]) + +- file.write("typedef std::unique_ptr (*CreateCharacterClass)();\n") +- file.write("static CreateCharacterClass createFunctions[{}] = {{\n ".format(len(cls.allPropertyData))) ++ dowrite(file, "typedef std::unique_ptr (*CreateCharacterClass)();\n") ++ dowrite(file, "static CreateCharacterClass createFunctions[{}] = {{\n ".format(len(cls.allPropertyData))) + functionsOnThisLine = 0 + for propertyData in cls.allPropertyData: +- file.write(" {},".format(propertyData.getCreateFuncName())) ++ dowrite(file, " {},".format(propertyData.getCreateFuncName())) + functionsOnThisLine = functionsOnThisLine + 1 + if functionsOnThisLine == 4: +- file.write("\n ") ++ dowrite(file, "\n ") + functionsOnThisLine = 0 + +- file.write("};\n\n") ++ dowrite(file, "};\n\n") + + @classmethod + def createAndDumpHashTable(self, file, propertyDict, tablePrefix): +- propertyKeys = propertyDict.keys() ++ propertyKeys = list(propertyDict.keys()) + numberOfKeys = len(propertyKeys) + hashSize = ceilingToPowerOf2(numberOfKeys * 2) + hashMask = hashSize - 1 +@@ -587,7 +596,7 @@ + hashTable[hash] = (len(valueTable), None) + valueTable.append((key, keyValue[1])) + +- file.write("static const struct HashIndex {}TableIndex[{}] = {{\n".format(tablePrefix, len(hashTable))) ++ dowrite(file, "static const struct HashIndex {}TableIndex[{}] = {{\n".format(tablePrefix, len(hashTable))) + + for tableIndex in hashTable: + value = -1 +@@ -597,17 +606,17 @@ + if tableIndex[1] is not None: + next = tableIndex[1] + +- file.write(" {{ {}, {} }},\n".format(value, next)) ++ dowrite(file, " {{ {}, {} }},\n".format(value, next)) + +- file.write("};\n\n") ++ dowrite(file, "};\n\n") + +- file.write("static const struct HashValue {}TableValue[{}] = {{\n".format(tablePrefix, len(valueTable))) ++ dowrite(file, "static const struct HashValue {}TableValue[{}] = {{\n".format(tablePrefix, len(valueTable))) + for value in valueTable: +- file.write(" {{ \"{}\", {} }},\n".format(value[0], value[1])) +- file.write("};\n\n") ++ dowrite(file, " {{ \"{}\", {} }},\n".format(value[0], value[1])) ++ dowrite(file, "};\n\n") + +- file.write("static const struct HashTable {}HashTable = \n".format(tablePrefix)) +- file.write(" {{ {}, {}, {}TableValue, {}TableIndex }};\n\n".format(len(valueTable), hashMask, tablePrefix, tablePrefix)) ++ dowrite(file, "static const struct HashTable {}HashTable = \n".format(tablePrefix)) ++ dowrite(file, " {{ {}, {}, {}TableValue, {}TableIndex }};\n\n".format(len(valueTable), hashMask, tablePrefix, tablePrefix)) + + + class Scripts: +@@ -742,21 +751,21 @@ + lowCodePoint = int(codePoints[:dotDot], 16) + highCodePoint = int(codePoints[dotDot + 2:], 16) + currentPropertyData.addRange(lowCodePoint, highCodePoint) +- for codePoint in xrange(lowCodePoint, highCodePoint + 1): ++ for codePoint in range(lowCodePoint, highCodePoint + 1): + commonScriptExtenstionPropertyData.removeMatch(codePoint) + inheritedScriptExtensionPropertyData.removeMatch(codePoint) + + # For the scripts that don't have any additional extension codePoints, copy the script + # data to the script extension with the same name +- for scriptName, propertyData in self.scriptsByName.iteritems(): ++ for scriptName, propertyData in self.scriptsByName.items(): + if scriptName not in self.scriptExtensionsByName: + self.scriptExtensionsByName[scriptName] = propertyData + + def dump(self, file): +- file.write("// Scripts:\n") ++ dowrite(file, "// Scripts:\n") + PropertyData.createAndDumpHashTable(file, self.scriptsByName, "script") + +- file.write("// Script_Extensions:\n") ++ dowrite(file, "// Script_Extensions:\n") + PropertyData.createAndDumpHashTable(file, self.scriptExtensionsByName, "scriptExtension") + + +@@ -877,7 +886,7 @@ + propertyDatas[1].addRange(self.lastAddedCodePoint + 1, MaxUnicode) + + def dump(self, file): +- file.write("// General_Category:\n") ++ dowrite(file, "// General_Category:\n") + PropertyData.createAndDumpHashTable(file, self.propertyDataByCategory, "generalCategory") + + +@@ -920,7 +929,7 @@ + currentPropertyData.addRange(int(codePoints[:dotDot], 16), int(codePoints[dotDot + 2:], 16)) + + def dump(self, file): +- file.write("// binary properties:\n") ++ dowrite(file, "// binary properties:\n") + PropertyData.createAndDumpHashTable(file, self.propertyDataByProperty, "binaryProperty") + + if __name__ == "__main__": +@@ -950,7 +959,7 @@ + + propertyDataHFile = openOrExit(unicodeProertyDataHPath, "wb") + +- propertyDataHFile.write(header) ++ dowrite(propertyDataHFile, header) + + aliases.parsePropertyAliasesFile(propertyAliasesFile) + aliases.parsePropertyValueAliasesFile(propertyValueAliasesFile) +@@ -974,6 +983,6 @@ + binaryProperty.dump(propertyDataHFile) + scripts.dump(propertyDataHFile) + +- propertyDataHFile.write(footer) ++ dowrite(propertyDataHFile, footer) + + exit(0) +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/hasher.py webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/hasher.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/hasher.py 2018-02-19 01:45:14.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/hasher.py 2018-03-03 10:24:55.761218389 -0600 +@@ -36,7 +36,7 @@ + hash = stringHashingStartValue + + strLength = len(str) +- characterPairs = strLength / 2 ++ characterPairs = int(strLength / 2) + remainder = strLength & 1 + + # Main loop +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/jsmin.py webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/jsmin.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/jsmin.py 2018-02-19 01:45:14.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/jsmin.py 2018-03-03 11:31:35.142780467 -0600 +@@ -79,10 +79,13 @@ + 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 sys.version_info.major == 2: ++ self.outs.write(char) ++ else: ++ self.outs.write(str(char)) + if self.is_return: + self.return_buf = '' + +@@ -118,8 +121,8 @@ + 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 +@@ -166,7 +169,7 @@ + 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: +@@ -179,7 +182,7 @@ + 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 > '~'): +@@ -217,14 +220,14 @@ + 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 == '\\': +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/make-js-file-arrays.py webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/make-js-file-arrays.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/Scripts/make-js-file-arrays.py 2018-02-19 01:45:14.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/Scripts/make-js-file-arrays.py 2018-03-03 14:39:11.326990464 -0600 +@@ -25,7 +25,11 @@ + import io + import os + from optparse import OptionParser +-from StringIO import StringIO ++import sys ++if sys.version_info.major == 2: ++ from StringIO import StringIO ++else: ++ from io import StringIO + from jsmin import JavascriptMinify + + +@@ -37,7 +41,7 @@ + + + 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] + + +@@ -85,7 +89,7 @@ + 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) ++ codepoints = list(map(ord, characters)) + for codepointChunk in chunk(codepoints, 16): + print(' {0:s},'.format(','.join(map(stringifyCodepoint, codepointChunk))), file=sourceFile) + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/wasm/generateWasm.py webkitgtk-2.19.91/Source/JavaScriptCore/wasm/generateWasm.py +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/wasm/generateWasm.py 2018-02-19 01:45:17.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/wasm/generateWasm.py 2018-03-02 16:27:21.193406681 -0600 +@@ -71,7 +71,7 @@ + # We need to do this because python is dumb and won't let me use self in the lambda, which is ridiculous. + if ret == None: + ret = lambda op: {"name": op, "opcode": self.opcodes[op]} +- for op in self.opcodes.iterkeys(): ++ for op in self.opcodes.keys(): + if filter(self.opcodes[op]): + yield ret(op) + +diff -ur webkitgtk-2.19.91.orig/Source/JavaScriptCore/yarr/generateYarrCanonicalizeUnicode webkitgtk-2.19.91/Source/JavaScriptCore/yarr/generateYarrCanonicalizeUnicode +--- webkitgtk-2.19.91.orig/Source/JavaScriptCore/yarr/generateYarrCanonicalizeUnicode 2018-02-19 01:45:17.000000000 -0600 ++++ webkitgtk-2.19.91/Source/JavaScriptCore/yarr/generateYarrCanonicalizeUnicode 2018-03-03 10:35:11.555812290 -0600 +@@ -31,7 +31,6 @@ + import os + import re + import sys +-from sets import Set + + header = """/* + * Copyright (C) 2016 Apple Inc. All rights reserved. +@@ -78,11 +77,21 @@ + dirname = os.path.dirname(path) + if not os.path.isdir(dirname): + os.makedirs(dirname) +- return open(path, mode) ++ if sys.version_info.major == 2 or mode == "wb" or mode == "rb": ++ return open(path, mode) ++ else: ++ return open(path, mode, encoding = "UTF-8") + except IOError as e: +- print "I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror) ++ print("I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)) + exit(1) + ++def dowrite(file, str): ++ if sys.version_info.major == 2: ++ file.write(str) ++ else: ++ file.write(bytes(str, "utf-8")) ++ ++ + class Canonicalize: + def __init__(self): + self.canonicalGroups = {}; +@@ -93,7 +102,7 @@ + self.canonicalGroups[mapping].append(code) + + def readCaseFolding(self, file): +- codesSeen = Set() ++ codesSeen = set() + for line in file: + line = line.split('#', 1)[0] + line = line.rstrip() +@@ -157,26 +166,26 @@ + set = characterSets[i] + for ch in set: + characters = characters + "0x{character:04x}, ".format(character=ch) +- file.write("const UChar32 unicodeCharacterSet{index:d}[] = {{ {characters}0 }};\n".format(index=i, characters=characters)) ++ dowrite(file, "const UChar32 unicodeCharacterSet{index:d}[] = {{ {characters}0 }};\n".format(index=i, characters=characters)) + +- file.write("\n") +- file.write("static const size_t UNICODE_CANONICALIZATION_SETS = {setCount:d};\n".format(setCount=len(characterSets))) +- file.write("const UChar32* const unicodeCharacterSetInfo[UNICODE_CANONICALIZATION_SETS] = {\n") ++ dowrite(file, "\n") ++ dowrite(file, "static const size_t UNICODE_CANONICALIZATION_SETS = {setCount:d};\n".format(setCount=len(characterSets))) ++ dowrite(file, "const UChar32* const unicodeCharacterSetInfo[UNICODE_CANONICALIZATION_SETS] = {\n") + + for i in range(len(characterSets)): +- file.write(" unicodeCharacterSet{setNumber:d},\n".format(setNumber=i)) ++ dowrite(file, " unicodeCharacterSet{setNumber:d},\n".format(setNumber=i)) + +- file.write("};\n") +- file.write("\n") +- file.write("const size_t UNICODE_CANONICALIZATION_RANGES = {rangeCount:d};\n".format(rangeCount=len(rangeInfo))) +- file.write("const CanonicalizationRange unicodeRangeInfo[UNICODE_CANONICALIZATION_RANGES] = {\n") ++ dowrite(file, "};\n") ++ dowrite(file, "\n") ++ dowrite(file, "const size_t UNICODE_CANONICALIZATION_RANGES = {rangeCount:d};\n".format(rangeCount=len(rangeInfo))) ++ dowrite(file, "const CanonicalizationRange unicodeRangeInfo[UNICODE_CANONICALIZATION_RANGES] = {\n") + + for info in rangeInfo: + typeAndValue = info["type"].split(":") +- file.write(" {{ 0x{begin:04x}, 0x{end:04x}, 0x{value:04x}, {type} }},\n".format(begin=info["begin"], end=info["end"], value=int(typeAndValue[1]), type=typeAndValue[0])) ++ dowrite(file, " {{ 0x{begin:04x}, 0x{end:04x}, 0x{value:04x}, {type} }},\n".format(begin=info["begin"], end=info["end"], value=int(typeAndValue[1]), type=typeAndValue[0])) + +- file.write("};\n") +- file.write("\n") ++ dowrite(file, "};\n") ++ dowrite(file, "\n") + + + if __name__ == "__main__": +@@ -194,9 +203,9 @@ + canonicalize = Canonicalize() + canonicalize.readCaseFolding(caseFoldingTxtFile) + +- canonicalizeHFile.write(header); ++ dowrite(canonicalizeHFile, header) + canonicalize.createTables(canonicalizeHFile) +- canonicalizeHFile.write(footer); ++ dowrite(canonicalizeHFile, footer) + + caseFoldingTxtFile.close() + canonicalizeHFile.close() +diff -ur webkitgtk-2.19.91.orig/Source/WebCore/platform/network/create-http-header-name-table webkitgtk-2.19.91/Source/WebCore/platform/network/create-http-header-name-table +--- webkitgtk-2.19.91.orig/Source/WebCore/platform/network/create-http-header-name-table 2018-02-19 01:45:32.000000000 -0600 ++++ webkitgtk-2.19.91/Source/WebCore/platform/network/create-http-header-name-table 2018-03-03 11:28:42.253809307 -0600 +@@ -41,7 +41,7 @@ + http_header_name_to_id = { } + http_header_names = [] + +-for line in input_file.xreadlines(): ++for line in input_file: + http_header_name = line.strip() + if not http_header_name or http_header_name[:2] == '//': + continue +diff -ur webkitgtk-2.19.91.orig/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl webkitgtk-2.19.91/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl +--- webkitgtk-2.19.91.orig/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl 2018-02-19 01:45:32.000000000 -0600 ++++ webkitgtk-2.19.91/Source/WebInspectorUI/Scripts/copy-user-interface-resources.pl 2018-03-05 16:17:47.582174114 -0600 +@@ -163,6 +163,8 @@ + my $threejsLicense = readLicenseFile(File::Spec->catfile($threejsPath, 'LICENSE')); + make_path($protocolDir, $targetResourcePath); + ++$python = $ENV{"PYTHON"} if defined($ENV{"PYTHON"}); ++ + # Copy over dynamically loaded files from other frameworks, even if we aren't combining resources. + copy(File::Spec->catfile($ENV{'JAVASCRIPTCORE_PRIVATE_HEADERS_DIR'}, 'InspectorBackendCommands.js'), File::Spec->catfile($protocolDir, 'InspectorBackendCommands.js')) or die "Copy of InspectorBackendCommands.js failed: $!"; + diff --git a/webkit2gtk3.changes b/webkit2gtk3.changes index 4e2502e..58989dd 100644 --- a/webkit2gtk3.changes +++ b/webkit2gtk3.changes @@ -1,3 +1,154 @@ +------------------------------------------------------------------- +Tue Mar 6 21:49:48 UTC 2018 - mgorse@suse.com + +- Add webkit2gtk3-python3.patch: port to python 3 (bsc#1079812, + webkit#156674). +- Add conditional to optionally require python3, rather than + python2 + python-xml, and adjust %build to use python3. + +------------------------------------------------------------------- +Tue Mar 6 10:36:32 UTC 2018 - bjorn.lie@gmail.com + +- Update to version 2.19.92: + + Ensure DNS prefetching cannot be re-enabled if disabled by + settings. + + Fix seek sometimes not working. + + Fix rendering of emojis that were using the wrong scale factor + in some cases. + + Fix rendering of combining enclosed keycap. + + Fix rendering scale of some layers in HiDPI. + + Fix a crash in Wayland when closing the web view. + + Fix crashes upower crashes when running inside a chroot or on + systems with broken dbus/upower. + + Fix memory leaks in GStreamer media backend when using + GStreamer 1.14. + + Fix the build with Enchant 2.x. + + Fix several crashes and rendering issues. + + Updated translations. +- Replace pkgconfig(enchant) with enchant-devel BuildRequires: + Allow webkit2gtk3 to build with whatever enchant is available in + target distro. + +------------------------------------------------------------------- +Mon Mar 5 16:40:57 UTC 2018 - dimstar@opensuse.org + +- Modernize spec-file by calling spec-cleaner + +------------------------------------------------------------------- +Mon Mar 5 02:19:51 UTC 2018 - bjorn.lie@gmail.com + +- Update to version 2.19.91: + + Add ENABLE_ADDRESS_SANITIZER to make it easier to build with + asan support. + + Fix a crash a under Wayland when using mesa software + rasterization. + + Make fullscreen video work again. + + Fix handling of missing GStreamer elements. + + Fix rendering when webm video is played twice. + + Fix kinetic scrolling sometimes jumping around. + + Fix build with ICU configured without collation support. + + Fix several crashes and rendering issues. + + Updated translations. +- Do a minor spec cleanup. + +------------------------------------------------------------------- +Mon Mar 5 02:19:50 UTC 2018 - dimstar@opensuse.org + +- Update to version 2.19.90: + + WebSockets use system proxy settings now (requires libsoup + 2.61.90). + + Show the context menu on long-press gesture. + + Add support for Shift + mouse scroll to scroll horizontally. + + Fix zoom gesture to actually zoom instead of changing the page + scale. + + Implement support for Graphics ARIA roles. + + Make sleep inhibitors work under Flatpak. + + Add get element CSS value command to WebDriver. + + Fix a crash aftter a swipe gesture. + + Fix several crashes and rendering issues. +- Drop webkit2gtk3-fix-wayland-crash.patch: fixed upstream. + +------------------------------------------------------------------- +Mon Mar 5 02:19:06 UTC 2018 - bjorn.lie@gmail.com + +- Update to version 2.19.6: + + Fix crashes due to duplicated symbols in libjavascriptcoregtk + and libwebkit2gtk. + + Fix parsing of timeout values in WebDriver. + + Implement get timeouts command in WebDriver. + + Fix deadlock in GStreamer video sink during shutdown when + accelerated compositing is disabled. + + Fix several crashes and rendering issues. + +------------------------------------------------------------------- +Mon Mar 5 02:19:05 UTC 2018 - zaitor@opensuse.org + +- Update to version 2.19.5: + + This is a follow up release to export + webkit_dom_dom_window_webkit_message_handlers_post_message() + symbol that was hidden in 2.19.4 by mistake. +- Changes from version 2.19.4: + + Add web process API to detect when form is submitted via + JavaScript. + + Add new API to replace + webkit_form_submission_request_get_text_fields() that is now + deprecated. + + Add WebKitWebView::web-process-terminated signal and deprecate + web-process-crashed. + + Fix rendering issues when editing text areas. + + Use FastMalloc based GstAllocator for GStreamer. + + Fix several crashes and rendering issues. + + Updated translations. + +------------------------------------------------------------------- +Mon Mar 5 02:19:04 UTC 2018 - dimstar@opensuse.org + +- Apply -DUSE_SYSTEM_MALLOC=ON unconditionally in all builds + (bmalloc seems to be exhausting memory on run time). + +------------------------------------------------------------------- +Mon Mar 5 02:19:03 UTC 2018 - dimstar@opensuse.org + +- Update to version 2.19.3: + + Fix web process crash at startup in bmalloc. + + Fix several memory leaks in GStreamer media backend. + + WebKitWebDriver process no longer links to + libjavascriptcoregtk. + - Fix several crashes and rendering issues. +- Changes from version 2.19.2: + + Add new API to add, retrieve and delete cookies via + WebKitCookieManager. + + Add functions to WebSettings to convert font sizes between + points and pixels. + + Ensure cookie operations take effect when they happen before a + web process has been spawned. + + Automatically adjust font size when GtkSettings:gtk-xft-dpi + changes. + + Fix several crashes and rendering issues. + +------------------------------------------------------------------- +Mon Mar 5 02:19:02 UTC 2018 - dimstar@opensuse.org + +- Allow OBS service to verify the tarball signature: + + Add webkit2gtk3.keyring: Carlos Garcia Campos' public key. + +------------------------------------------------------------------- +Mon Mar 5 02:19:01 UTC 2018 - dimstar@opensuse.org + +- Update to version 2.19.1: + + Add initial resource load statistics support. + + Add API to expose availability of certain editing commands in + WebKitEditorState. + + Add API to query whether a WebKitNavigationAction is a redirect + or not. + + Improve complex text rendering. + + Add support for the "system" CSS font family. + + Implement low power mode. + + Fix several crashes and rendering issues. +- Drop webkit2gtk3-no-return-in-nonvoid.patch: fixed upstream. +- Add pkgconfig(libbrotlidec) and pkgconfig(upower-glib) + BuildRequires: new dependencies. + ------------------------------------------------------------------- Fri Mar 2 16:38:52 UTC 2018 - fcrozat@suse.com @@ -17,7 +168,7 @@ Thu Mar 1 14:32:34 UTC 2018 - dimstar@opensuse.org Tue Jan 30 17:12:00 CET 2018 - ro@suse.de - even on recent codestreams there is no binutils gold on s390 - only on s390x + only on s390x. ------------------------------------------------------------------- Wed Jan 24 15:46:03 UTC 2018 - bjorn.lie@gmail.com diff --git a/webkit2gtk3.keyring b/webkit2gtk3.keyring new file mode 100644 index 0000000..1e4dce4 --- /dev/null +++ b/webkit2gtk3.keyring @@ -0,0 +1,48 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGiBEy4Qy4RBACevATwAKdArGO2UjVGsP3nb3BWLfB9KR5hbpuL5yejUoR6xeN4 +vsw1/fy9fiGlsLGqlmnd6bDZ6c7mNyc0ERXXGk2QOQEMeDyL6VsoZEbo5t8bZa6B +Pxc23C9L4d0bdNF7y0CoO7xsg1zClq23MXWAgi4Wm+ZDonw+b2UBcCt/uwCg9AST +/g8XgNKZ4WxpRI4bM/1BvxUD/2xeJkUjgmdwV14dOdHmsW7BYJHUKxAt9KBSJ5Yo +ZDCmh6HTtUjd9dKwkuRTxtc3G4s+J5D5WCeNKQ/kNAYAoclzXYc2crTrXZ+RqWap +G+ngUZxgnyNAaveyUjV19qDRJKVuzBXeQWH/UU5eEpuRfx7ReyFX7sAhDOmnVrvg +IoegA/0SNS+wsGjYxpWOO1QMsqGidgIp5yLanfA7qsfxz8t+gGtXOSqomUJsYyYX +a0c2kXl3ZPe/cyK6j9o+l4YrczkNAxeXVJd4uA4sSrqmKI1F7cICV3EqJ5uyKWll +eW/sfhKNcPiadBZr9LNS1775jWM3pNxszZrjCnTfspn0gyGTbLQpQ2FybG9zIEdh +cmNpYSBDYW1wb3MgPGNnYXJjaWFAaWdhbGlhLmNvbT6IRgQQEQIABgUCUqWOngAK +CRDCnpneZqWnpXfSAJ44+rD04SmToMupJ8AfaJUQoOM1YACgvrckWsD2rKahHgUh +4zfDuJ6I5jaIYgQTEQIAIgUCTLhDLgIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgEC +F4AACgkQ89Mi0OxFgsO7aQCgyouexI5L4PxyZlCgucZj2UGUI1kAn2Lh4CPgaCa7 +kno1aArSFzzdVRnhiQIcBBABAgAGBQJThzgeAAoJEL4yGa8+1BNBZwQP/04eRTdp +AiQag4ORWPazjUjbn7jG+qMpFkXKAkfN70iv1OTM9G3DtsxE72IvZSiqnnASZiBh +qv1zwojzsAJ+JRs2Kd55QCGLp6IW4y0YqKQzjdQZ8ILCpqpTplzx1oHsD5NULdn3 +TlQ/CAf34j0e+QipS5yce2KtlYMA7yt+qqkpFslCnQAPmBDyRVIKn+bHJKJu3r+a +K1F8rdyu1qoXl0OSEuXhkGc2e95bDMIS8Dk7KSOhMZ8jwEUxAk186fAWMBQpRZVb +kN+bfBOFtGOe7DxTua+Q4unA/uevO+4ZLJRwkXFUTdlGFDRyUJ6Q6B3q/b/MLnsw +W7zfrXsuo6LeWd+vti6Y8OiPHJ4ck2oY/Wp+FcoNToqDtidHyKo2fPr9LwZIH76J +ewvIvbDm+SIRWiucckyddnyYSZudP44dg8wgF39FvuJolvJWDy/A5Sa2Z+kh53Sr +t8aa8RPd+GkMpADreofe66Q2Z80CdeYzDFUKjE4fzRt7pI3MC0iMkuiE7w1t7Zko +NvJkvV0TCczahkYuV42jWQNu4lBRiRuUBBiCk5dAmyzmIeyshutBw3HUJlq3Jebj +yzXLsRDRIS3HUGlupvhXwgVqi8X+VnpER0K/Uze4Oi8d2bOdF97YxTgNHsAe27Jh +8Kp5cJny2TByghNv/msEN0Rg8iuqthr26gxViQIcBBABCgAGBQJW4vUYAAoJEJZQ +ic5rlfiCJ+YP+wbpEdHxjkaiicgwg+nGCxwRnr3KIyqZkwHaKYns+xwoQMDsx1Rb +ApkQYotvZrOZJpegBu9rEYsrGmEONkCQ8ppeMovhZBL2KKgKinQ94vC5P34cadFx +li+biW0XYKOfdUQSZ4tkT91dtWTK/A0IjwQVtjqSzYJjIwWRQ3YX3Vd8Gqam7W9Y +qlfa1ytnyPKz4D0YDSLd3GyVJ33kipp6p9IwR0mUvPzx7lQaAFceFv0QM+sBFbqa +HX7rIID6ogixOewv01QRafT5XWhmRGkBSKuzQbouMUnJt10ghfmbB3+fpMfp0CZe +loTiPkMVq8P66ZazHaRpHkhajMjjdDEZgDlTbY90BnRxRzLj4Wx9ZWobDQdicilU +4Ho0pUI3+g1tWONOgcaXBEUf0ydJas1Nyx4PuctMOYyvuBgp3sDzeQUeROFXuwvv +BymPy2+y5hkjVHnOL7fTYJrYLii5tsJkGkfOhp1PgcugY9ooIbVKClCxdcPSJUIF +/233VBwnNlHNaUym/bexEMwLuPLyulJiG23YWMCfIur1XDsBh33wAc0mwQ+lW7z7 +Da2CEfMlqCO4AIybNOLTq5ubpabg/eTw6/XINJ6yzKZ7iCzMTOg9ZFQ4tErQMF8c +ONqxNmTj1kiYurqsg24Eo3QvzJygmd6Vc+38lQX8hy3i7qw/aSwth9rLuQENBEy4 +Qy4QBADZF1vw6zV7ZKGg8Ipfi0ASbDRVzHdr4wdoiNbFGKXykwi3PRuolrSTd+97 +0u0MNX30ZmfOTk/cidymaBd0RyVnwmPgnoRxZpKhMnFrlxRYtukUHyYDeFwM376u +x1TXNWwGsxZ3RmENWyoAs8GK3vIYhaqC22qxS1SfjMn1eueonwADBQQAnLZte7R5 +TK0j5L1K/JJc82JOkdjlF6ORS+hxHqlITmRevmo5zcvBMfCjH98y5yGVHciQ/Pp+ +AC+hI7n0r2B+HO7/M+fzub4mJpgsrdGLebwFOOMuJQCzU/vm2O+ni9RfhKGxj6j5 +ibVzW/XgdxDF7ffwmiqAWJrzUGtIBKRw372ISQQYEQIACQUCTLhDLgIbDAAKCRDz +0yLQ7EWCw/ohAJ9TForRmpOoZQn8nC82lvjLnl8yJwCfePN1wgFlZu2kkHP4d0fJ +2LN6whM= +=ZYVq +-----END PGP PUBLIC KEY BLOCK----- diff --git a/webkit2gtk3.spec b/webkit2gtk3.spec index 8db5607..0a4c5c1 100644 --- a/webkit2gtk3.spec +++ b/webkit2gtk3.spec @@ -25,10 +25,9 @@ %define _jscver 4 %define _pkgconfig_suffix gtk-3.0 %define _name webkitgtk - # gold linker not available on old s390/s390x %define _gold_linker 1 -%if 0%{suse_version} < 1320 +%if 0%{?suse_version} < 1320 %ifarch s390 s390x %define _gold_linker 0 %endif @@ -37,22 +36,22 @@ %define _gold_linker 0 %endif %endif - +%bcond_without python3 Name: webkit2gtk3 -Version: 2.18.6 +Version: 2.19.92 Release: 0 Summary: Library for rendering web content, GTK+ Port -License: LGPL-2.0+ AND BSD-3-Clause +License: LGPL-2.0-or-later AND BSD-3-Clause Group: Development/Libraries/C and C++ Url: https://webkitgtk.org/ -Source: http://webkitgtk.org/releases/%{_name}-%{version}.tar.xz -Source1: baselibs.conf +Source0: http://webkitgtk.org/releases/%{_name}-%{version}.tar.xz +Source1: http://webkitgtk.org/releases/%{_name}-%{version}.tar.xz.asc +Source98: baselibs.conf +Source99: webkit2gtk3.keyring # PATCH-FIX-OPENSUSE webkitgtk-typelib-sharelib-link.patch dimstar@opensuse.org -- Fixup the .gir file to contain the full library name for libjavascriptcore. Patch0: webkitgtk-typelib-sharelib-link.patch -# PATCH-FIX-UPSTREAM webkit2gtk3-no-return-in-nonvoid.patch webkit£318374 dimstar@opensuse.org -- Fix "control reaches end of non-void function" -Patch1: webkit2gtk3-no-return-in-nonvoid.patch -# PATCH-FIX-UPSTREAM webkit2gtk3-fix-wayland-crash.patch webkit#182490 bsc#1079512 fcrozat@suse.com -- Fix crash with wayland -Patch2: webkit2gtk3-fix-wayland-crash.patch +# PATCH-FIX-UPSTREAM webkit2gtk3-python3.patch bsc#1079812 mgorse@suse.com -- port to Python 3. +Patch1: webkit2gtk3-python3.patch BuildRequires: Mesa-libEGL-devel BuildRequires: Mesa-libGL-devel BuildRequires: Mesa-libGLESv1_CM-devel @@ -60,6 +59,8 @@ BuildRequires: Mesa-libGLESv2-devel BuildRequires: Mesa-libGLESv3-devel BuildRequires: bison >= 2.3 BuildRequires: cmake +BuildRequires: enchant-devel +BuildRequires: gcc-c++ >= 4.9 BuildRequires: gobject-introspection-devel BuildRequires: gperf >= 3.0.1 BuildRequires: hyphen-devel @@ -67,13 +68,10 @@ BuildRequires: libicu-devel BuildRequires: libjpeg-devel BuildRequires: perl >= 5.10.0 BuildRequires: pkgconfig -BuildRequires: python >= 2.6.0 -BuildRequires: python2-xml BuildRequires: ruby >= 1.8.7 BuildRequires: pkgconfig(atk) BuildRequires: pkgconfig(atspi-2) >= 2.5.3 BuildRequires: pkgconfig(cairo) >= 1.10.2 -BuildRequires: pkgconfig(enchant) BuildRequires: pkgconfig(fontconfig) >= 2.8.0 BuildRequires: pkgconfig(freetype2) >= 2.4.2 BuildRequires: pkgconfig(geoclue-2.0) >= 2.1.5 @@ -85,20 +83,28 @@ BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) BuildRequires: pkgconfig(gtk+-3.0) >= 3.12.0 BuildRequires: pkgconfig(gudev-1.0) BuildRequires: pkgconfig(harfbuzz) >= 0.9.2 +# Currently passing -DUSE_WOFF2=false to cmake +# BuildRequires: pkgconfig(libbrotlidec) >= 1.0.1 BuildRequires: pkgconfig(libnotify) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libsecret-1) -BuildRequires: pkgconfig(libsoup-2.4) >= 2.42.0 +BuildRequires: pkgconfig(libsoup-2.4) >= 2.61.90 BuildRequires: pkgconfig(libwebp) BuildRequires: pkgconfig(libxml-2.0) >= 2.8.0 BuildRequires: pkgconfig(libxslt) >= 1.1.7 BuildRequires: pkgconfig(sqlite3) +BuildRequires: pkgconfig(upower-glib) BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(zlib) +%if %{with python3} +BuildRequires: python3 +%else +BuildRequires: python >= 2.6.0 +BuildRequires: python2-xml +%endif %if %{_gold_linker} BuildRequires: binutils-gold %endif -BuildRequires: gcc-c++ >= 4.9 %if 0%{?is_opensuse} # We require gtk2 for the Gtk2 plugin wrapper BuildRequires: pkgconfig(gtk+-2.0) >= 2.24.10 @@ -251,10 +257,29 @@ invoking a Perl or Python script. %prep %setup -q -n webkitgtk-%{version} %patch0 -p1 +%if %{with python3} %patch1 -p1 -%patch2 -p1 +%endif %build +# Here we must muzzle our dog so it doesn't eat all the memory +max_link_jobs="%{?jobs:%{jobs}}" +max_compile_jobs="%{?jobs:%{jobs}}" +echo "Available memory:" +cat /proc/meminfo +echo "System limits:" +ulimit -a +if test -n "$max_link_jobs" -a "$max_link_jobs" -gt 1 ; then + mem_per_process=1300000 + max_mem=$(awk '/MemTotal/ { print $2 }' /proc/meminfo) + max_jobs="$(($max_mem / $mem_per_process))" + test "$max_link_jobs" -gt "$max_jobs" && max_link_jobs="$max_jobs" && echo "Warning: Reducing number of link jobs to $max_jobs because of memory limits" + test "$max_link_jobs" -le 0 && max_link_jobs=1 && echo "Warning: Not linking in parallel at all becuse of memory limits" +fi + +%if %{with python3} +export PYTHON=%{_bindir}/python3 +%endif # Use linker flags to reduce memory consumption %if %{_gold_linker} %global optflags %(echo %{optflags} -Wl,--no-keep-memory | sed 's/-g /-g1 /') @@ -265,33 +290,33 @@ invoking a Perl or Python script. -DCMAKE_BUILD_TYPE=Release \ -DLIBEXEC_INSTALL_DIR=%{_libexecdir}/libwebkit2gtk%{_wk2sover} \ -DPORT=GTK \ + -DUSE_WOFF2=false \ +%if %{with python3} + -DPYTHON_EXECUTABLE=%{_bindir}/python3 \ +%endif %if !0%{?is_opensuse} -DENABLE_PLUGIN_PROCESS_GTK2=OFF \ %endif %ifarch armv6hl ppc ppc64 ppc64le s390 s390x -DENABLE_JIT=OFF \ - -DUSE_SYSTEM_MALLOC=ON \ %endif + -DUSE_SYSTEM_MALLOC=ON \ -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now -pthread" \ -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now -pthread" \ -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now -pthread" -make %{?_smp_mflags} +make -j $max_link_jobs %install %cmake_install %find_lang WebKit2GTK-4.0 %post -n libwebkit2gtk%{_wk2sover} -p /sbin/ldconfig - %postun -n libwebkit2gtk%{_wk2sover} -p /sbin/ldconfig - %post -n libjavascriptcoregtk%{_sover} -p /sbin/ldconfig - %postun -n libjavascriptcoregtk%{_sover} -p /sbin/ldconfig %files -n libwebkit2gtk%{_wk2sover} -%defattr(-,root,root) %if 0%{?is_opensuse} # Exclude Gtk2 plugin support from this package. That goes into plugin-process-gtk2. %exclude %{_libexecdir}/libwebkit2gtk%{_wk2sover}/WebKitPluginProcess2 @@ -304,35 +329,28 @@ make %{?_smp_mflags} %if 0%{?is_opensuse} %files plugin-process-gtk2 -%defattr(-,root,root) %{_libexecdir}/libwebkit2gtk%{_wk2sover}/WebKitPluginProcess2 %endif %files -n webkit2gtk-4_0-injected-bundles -%defattr(-,root,root) %dir %{_libdir}/webkit2gtk-4.0 %dir %{_libdir}/webkit2gtk-4.0/injected-bundle %{_libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so %files -n libjavascriptcoregtk%{_sover} -%defattr(-, root, root) -%doc Source/JavaScriptCore/COPYING.LIB +%license Source/JavaScriptCore/COPYING.LIB %{_libdir}/libjavascriptcoregtk-4.0.so.* %files -n typelib-1_0-WebKit2-%{_sonameverpkg} -%defattr(-,root,root) %{_libdir}/girepository-1.0/WebKit2-%{_sonamever}.typelib %files -n typelib-1_0-WebKit2WebExtension-%{_sonameverpkg} -%defattr(-,root,root) %{_libdir}/girepository-1.0/WebKit2WebExtension-%{_sonamever}.typelib %files -n typelib-1_0-JavaScriptCore-%{_sonameverpkg} -%defattr(-,root,root) %{_libdir}/girepository-1.0/JavaScriptCore-%{_sonamever}.typelib %files devel -%defattr(-,root,root) %{_datadir}/gir-1.0/*.gir %{_includedir}/webkitgtk-4.0/ %{_libdir}/libwebkit2gtk-4.0.so @@ -342,10 +360,8 @@ make %{?_smp_mflags} %{_libdir}/pkgconfig/webkit2gtk-web-extension-4.0.pc %files -n webkit-jsc-%{_jscver} -%defattr(-,root,root) %{_libexecdir}/libwebkit2gtk%{_wk2sover}/jsc %files -n %{_pkgname_no_slpp}-lang -f WebKit2GTK-4.0.lang -%defattr(-,root,root) %changelog diff --git a/webkitgtk-2.18.6.tar.xz b/webkitgtk-2.18.6.tar.xz deleted file mode 100644 index 7e83634..0000000 --- a/webkitgtk-2.18.6.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:93912cc2f40f12e452be1ca4babdbdaac0ec4f828d441257a6b06c2963bbac3c -size 14829316 diff --git a/webkitgtk-2.19.92.tar.xz b/webkitgtk-2.19.92.tar.xz new file mode 100644 index 0000000..4a073c0 --- /dev/null +++ b/webkitgtk-2.19.92.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:22b79a525376d09e7a6acc8becffabbac1759906592375767216b9b2c0d871e8 +size 16618352 diff --git a/webkitgtk-2.19.92.tar.xz.asc b/webkitgtk-2.19.92.tar.xz.asc new file mode 100644 index 0000000..061dbc0 --- /dev/null +++ b/webkitgtk-2.19.92.tar.xz.asc @@ -0,0 +1,6 @@ +-----BEGIN PGP SIGNATURE----- + +iF0EABEDAB0WIQTX/PYc+aLeqzHYG9Pz0yLQ7EWCwwUCWp5ecAAKCRDz0yLQ7EWC +w4DbAJ9ecbhVfuMn/uk5+3mpvg5njA+ZUQCgjXv18r/cKtIFVlqwD6yfmfGbep8= +=ni5y +-----END PGP SIGNATURE-----