Accepting request 894780 from GNOME:Factory

- Update to version 2.32.1 (forwarded request 894185 from mgorse)

OBS-URL: https://build.opensuse.org/request/show/894780
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/webkit2gtk3?expand=0&rev=118
This commit is contained in:
Dominique Leuenberger 2021-05-23 21:30:35 +00:00 committed by Git OBS Bridge
commit aeaccc481e
7 changed files with 34 additions and 163 deletions

View File

@ -1,151 +0,0 @@
From 49a19c49c6de8af74e521f36cb43e6c1ec2e391c Mon Sep 17 00:00:00 2001
From: Ross Kirsling <ross.kirsling@sony.com>
Date: Tue, 13 Apr 2021 02:04:15 +0000
Subject: [PATCH] ICU 69 deprecates ubrk_safeClone in favor of ubrk_clone
https://bugs.webkit.org/show_bug.cgi?id=224093
Reviewed by Yusuke Suzuki.
In a shining example of "disappointing library practices", ICU 69 deprecates ubrk_safeClone in favor of
a new *draft* API ubrk_clone, meaning that no function with this functionality is exposed by default.
This patch introduces a function cloneUBreakIterator to abstract over this change; however, since we need to:
1. confine the effects of disabling U_HIDE_DRAFT_API to a non-unified implementation file
2. still be able to include ubrk.h from IntlSegmenter.h to instantiate ICUDeleter<ubrk_close> (*not* `clone`!)
...the new helper function is introduced in a *headerless* implementation file, IntlWorkaround.cpp.
* JavaScriptCore.xcodeproj/project.pbxproj:
* Sources.txt:
* runtime/IntlSegmenter.cpp:
(JSC::IntlSegmenter::segment const):
* runtime/IntlSegmenter.h:
* runtime/IntlSegments.cpp:
(JSC::IntlSegments::createSegmentIterator):
* runtime/IntlWorkaround.cpp: Added.
(JSC::cloneUBreakIterator):
Canonical link: https://commits.webkit.org/236421@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
---
Source/JavaScriptCore/Sources.txt | 1 +
.../JavaScriptCore/runtime/IntlSegmenter.cpp | 2 +-
Source/JavaScriptCore/runtime/IntlSegmenter.h | 4 ++
.../JavaScriptCore/runtime/IntlSegments.cpp | 2 +-
.../JavaScriptCore/runtime/IntlWorkaround.cpp | 53 +++++++++++++++++++
7 files changed, 97 insertions(+), 8 deletions(-)
create mode 100644 Source/JavaScriptCore/runtime/IntlWorkaround.cpp
diff --git a/Source/JavaScriptCore/Sources.txt b/Source/JavaScriptCore/Sources.txt
index 28b5b83632b9..b6492dfdcb75 100644
--- a/Source/JavaScriptCore/Sources.txt
+++ b/Source/JavaScriptCore/Sources.txt
@@ -849,6 +849,7 @@ runtime/IntlSegmenterConstructor.cpp
runtime/IntlSegmenterPrototype.cpp
runtime/IntlSegments.cpp
runtime/IntlSegmentsPrototype.cpp
+runtime/IntlWorkaround.cpp @no-unify // Confine U_HIDE_DRAFT_API's effect to this file.
runtime/IteratorOperations.cpp
runtime/IteratorPrototype.cpp
runtime/JSArray.cpp
diff --git a/Source/JavaScriptCore/runtime/IntlSegmenter.cpp b/Source/JavaScriptCore/runtime/IntlSegmenter.cpp
index 2ad74f94bbe8..93c9b2032847 100644
--- a/Source/JavaScriptCore/runtime/IntlSegmenter.cpp
+++ b/Source/JavaScriptCore/runtime/IntlSegmenter.cpp
@@ -125,7 +125,7 @@ JSValue IntlSegmenter::segment(JSGlobalObject* globalObject, JSValue stringValue
auto upconvertedCharacters = Box<Vector<UChar>>::create(string.charactersWithoutNullTermination());
UErrorCode status = U_ZERO_ERROR;
- auto segmenter = std::unique_ptr<UBreakIterator, UBreakIteratorDeleter>(ubrk_safeClone(m_segmenter.get(), nullptr, nullptr, &status));
+ auto segmenter = std::unique_ptr<UBreakIterator, UBreakIteratorDeleter>(cloneUBreakIterator(m_segmenter.get(), &status));
if (U_FAILURE(status)) {
throwTypeError(globalObject, scope, "failed to initialize Segments"_s);
return { };
diff --git a/Source/JavaScriptCore/runtime/IntlSegmenter.h b/Source/JavaScriptCore/runtime/IntlSegmenter.h
index cd0f426c4897..a5239575a9f3 100644
--- a/Source/JavaScriptCore/runtime/IntlSegmenter.h
+++ b/Source/JavaScriptCore/runtime/IntlSegmenter.h
@@ -75,4 +75,8 @@ class IntlSegmenter final : public JSNonFinalObject {
Granularity m_granularity { Granularity::Grapheme };
};
+// Abstraction to call ubrk_safeClone or ubrk_clone depending on ICU version.
+// This is implemented in IntlWorkaround.cpp in order to confine draft API visibility.
+UBreakIterator* cloneUBreakIterator(const UBreakIterator*, UErrorCode*);
+
} // namespace JSC
diff --git a/Source/JavaScriptCore/runtime/IntlSegments.cpp b/Source/JavaScriptCore/runtime/IntlSegments.cpp
index b6aba32fb822..8b81791e4133 100644
--- a/Source/JavaScriptCore/runtime/IntlSegments.cpp
+++ b/Source/JavaScriptCore/runtime/IntlSegments.cpp
@@ -100,7 +100,7 @@ JSObject* IntlSegments::createSegmentIterator(JSGlobalObject* globalObject)
auto scope = DECLARE_THROW_SCOPE(vm);
UErrorCode status = U_ZERO_ERROR;
- auto segmenter = std::unique_ptr<UBreakIterator, UBreakIteratorDeleter>(ubrk_safeClone(m_segmenter.get(), nullptr, nullptr, &status));
+ auto segmenter = std::unique_ptr<UBreakIterator, UBreakIteratorDeleter>(cloneUBreakIterator(m_segmenter.get(), &status));
if (U_FAILURE(status)) {
throwTypeError(globalObject, scope, "failed to initialize SegmentIterator"_s);
return nullptr;
diff --git a/Source/JavaScriptCore/runtime/IntlWorkaround.cpp b/Source/JavaScriptCore/runtime/IntlWorkaround.cpp
new file mode 100644
index 000000000000..8d820857ec22
--- /dev/null
+++ b/Source/JavaScriptCore/runtime/IntlWorkaround.cpp
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2021 Sony Interactive Entertainment Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#include <unicode/uvernum.h>
+
+// ICU 69 introduces draft API ubrk_clone and deprecates ubrk_safeClone.
+#if U_ICU_VERSION_MAJOR_NUM >= 69
+#define HAVE_ICU_UBRK_CLONE 1
+#endif
+
+#if defined(U_HIDE_DRAFT_API)
+#undef U_HIDE_DRAFT_API
+#endif
+#include <unicode/ubrk.h>
+
+namespace JSC {
+
+UBreakIterator* cloneUBreakIterator(const UBreakIterator*, UErrorCode*);
+
+UBreakIterator* cloneUBreakIterator(const UBreakIterator* iterator, UErrorCode* status)
+{
+#if HAVE(ICU_UBRK_CLONE)
+ return ubrk_clone(iterator, status);
+#else
+ return ubrk_safeClone(iterator, nullptr, nullptr, status);
+#endif
+}
+
+} // namespace JSC

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Wed May 19 01:10:34 UTC 2021 - Michael Gorse <mgorse@suse.com>
- Update to version 2.32.1:
+ Support building against the Musl C library.
+ Support building against ICU version 69 or newer.
+ Improve handling of Media Capture devices.
+ Improve WebAudio playback.
+ Improve video orientation handling.
+ Improve seeking support for MSE playback.
+ Improve flush support in EME decryptors.
+ Fix HTTP status codes for requests done through a custom URI
handler.
+ Fix the Bubblewrap sandbox in certain 32-bit systems.
+ Fix inconsistencies between the WebKitWebView.is-muted property
state and values returned by
webkit_web_view_is_playing_audio().
+ Fix the build with ENABLE_VIDEO=OFF.
+ Fix wrong timestamps for long-lived cookies.
+ Fix UI process crash when failing to load favicons.
+ Fix several crashes and rendering issues.
+ Updated translations.
- Drop webkit2gtk3-icu69.patch: fixed upstream.
-------------------------------------------------------------------
Wed Apr 28 06:41:41 UTC 2021 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -31,7 +31,7 @@
%define _gold_linker 0
%endif
Name: webkit2gtk3
Version: 2.32.0
Version: 2.32.1
Release: 0
Summary: Library for rendering web content, GTK+ Port
License: BSD-3-Clause AND LGPL-2.0-or-later
@ -44,8 +44,6 @@ Source99: webkit2gtk3.keyring
# PATCH-FIX-OPENSUSE no-forced-sse.patch jengelh@iani.de -- cure execution of illegal instruction in i586 firefox.
Patch0: no-forced-sse.patch
# PATCH-FIX-UPSTREAM webkit2gtk3-icu69.patch webkit#224093 dimstar@opensuse.org -- ICU 69 deprecates ubrk_safeClone in favor of ubrk_clone
Patch1: webkit2gtk3-icu69.patch
BuildRequires: Mesa-libEGL-devel
BuildRequires: Mesa-libGL-devel

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9d7df4dae9ada2394257565acc2a68ace9308c4c61c3fcc00111dc1f11076bf0
size 23315936

View File

@ -1,6 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iF0EABEDAB0WIQTX/PYc+aLeqzHYG9Pz0yLQ7EWCwwUCYF28swAKCRDz0yLQ7EWC
w7ylAJ9lCKFu4UValdmiFJVKeXG9EVZ6bACg0Hjy7JgESd7mTyMoeCDgHQbVJr4=
=rWIy
-----END PGP SIGNATURE-----

3
webkitgtk-2.32.1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:136117317f70f66486f71b8edf5e46f8776403c5d8a296e914b11a36ef836917
size 23321600

View File

@ -0,0 +1,6 @@
-----BEGIN PGP SIGNATURE-----
iF0EABEDAB0WIQTX/PYc+aLeqzHYG9Pz0yLQ7EWCwwUCYJj1iAAKCRDz0yLQ7EWC
w5bjAKCboL2A0RXdy7PLMQgO3s2NeS7TeQCgxX3OMSjIGt01grbVvu3M15ShdJI=
=ZwIW
-----END PGP SIGNATURE-----