forked from pool/nodejs-electron
- New upstream release 30.2.0 * Node 20.15.0 * Enabled the Windows Control Overlay API on Linux. * Expose systemPreferences to utilityProcess. * Fixed a focus issue when calling BrowserWindow.setTopBrowserView. * Fixed an issue where fetch-dependent interfaces could be missing in Web Workers with nodeIntegrationInWorker enabled. * Fixed an issue where control could fail to return properly after saving a dialog using showOpenDialogSync on Linux. * Fixes an issue where the user-specified default path did not work in some circumstances when using Linux dialogs. * Fixes potentially incorrect exit code in UtilityProcess. * (Leap 15.5) Fix heap buffer overflow in libaom (CVE-2024-5493 bsc#1225690) * Security fixes for V8: CVE-2024-6100, CVE-2024-6101 (bsc#1226504) * Fix use after free in Swiftshader (CVE-2024-6291 bsc#1226933) - Update to 30.1.2 XXXFIXMEXXX * ABI break: NODE_MODULE_VERSION is now 123 * Chromium 124.0.6367.243 * Node 20.14.0 * V8 12.4 * Added WebContentsView and BaseWindow, replacing the now-deprecated BrowserView APIs. * cross-origin iframes now use Permission Policy to access features * Removed: The --disable-color-correct-rendering switch * The inputFieldType property in the context-menu params has been removed * Removed: process.getIOCounters() * see https://www.electronjs.org/blog/electron-30-0 and https://github.com/electron/electron/releases/tag/v30.0.0 for more - Fedora: use bundled simdutf as the system version is too old - Drop no longer needed patches * chromium-122-avoid-SFINAE-TypeConverter.patch * chromium-122-BookmarkNode-missing-operator.patch * chromium-98-EnumTable-crash.patch * chromium-gcc11.patch * CVE-2024-30260-undici-clear-proxy-authorization.patch * CVE-2024-30261-undici-fetch-integrity.patch * ElectronDesktopWindowTreeHostLinux-OnWindowTiledStateChanged-crash.patch * grid_sizing_tree-Wchanges-meaning.patch * hit_test_request-missing-optional.patch * InternalAllocator-too-many-initializers.patch * material_color_utilities-tones-missing-round.patch * nested-nested-nested-nested-nested-nested-regex-patterns.patch * perfetto-numeric_storage-double_t.patch * plus_address_types-missing-optional.patch * race_network_request_write_buffer_manager-missing-optional.patch * resolution_monitor-missing-bitset.patch * script_promise_resolver-explicit-specialization.patch * search_engine_choice_service-missing-optional.patch * text_break_iterator-icu74-breakAllLineBreakClassTable-should-be-consistent.patch * v8-instance-type-inl-constexpr-used-before-its-definition.patch - Drop no longer needed -Wno-error=narrowing from CXXFLAGS - Add patches to fix build * chromium-124-shims.patch * enable_stack_trace_line_numbers-symbol_level.patch * angle-FramebufferVk-powf.patch * licenses.py-FileNotFoundError.patch * span_reader-missing-optional.patch * bitset-missing-uint8_t-memcpy.patch * temporal_scalability_id_extractor-missing-bitset.patch * gpu_adapter_info-missing-optional.patch * first_party_sets_handler_database_helper-missing-optional.patch * async_iterable-forwarding.patch * preview_cancel_reason-missing-string.patch * script_streamer-atomic-include.patch - Add -Wno-packed-not-aligned -Wno-address to CXXFLAGS to suppress build logspam - Add libaom_av1_encoder-aom37-AV1E_SET_MAX_CONSEC_FRAME_DROP_CBR.patch to build with old libaom - Add backported DesktopNativeWidgetAura-HandleActivationChanged-crash.patch - Revert upstream changes which introduce a use-after-free bug causing crashes (bsc#1224178 deb#1067886) * bad-font-gc0000.patch * bad-font-gc000.patch * bad-font-gc00.patch * bad-font-gc0.patch * bad-font-gc11.patch * bad-font-gc1.patch * bad-font-gc2.patch * bad-font-gc3.patch OBS-URL: https://build.opensuse.org/request/show/1187058 OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs-electron?expand=0&rev=159
160 lines
6.4 KiB
Diff
160 lines
6.4 KiB
Diff
Revert the following commit:
|
|
|
|
commit 59daae50fc3c47f7a8dbcc828446fdaa9f8c12c4
|
|
Author: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
Date: Tue Feb 20 18:35:11 2024 +0000
|
|
|
|
[gc] Make OpenTypeVerticalData gc'd.
|
|
|
|
There should be no user-visible behaviour change.
|
|
|
|
Bug: 41490008
|
|
Change-Id: Id93c85a7beb710944e07cff614cff2409c818436
|
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5302893
|
|
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
|
Reviewed-by: Dominik Röttsches <drott@chromium.org>
|
|
Cr-Commit-Position: refs/heads/main@{#1262805}
|
|
|
|
--- a/third_party/blink/renderer/platform/fonts/font_platform_data.cc
|
|
+++ b/third_party/blink/renderer/platform/fonts/font_platform_data.cc
|
|
@@ -308,6 +308,11 @@ SkFont FontPlatformData::CreateSkFont(co
|
|
}
|
|
#endif // !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_IOS)
|
|
|
|
+scoped_refptr<OpenTypeVerticalData> FontPlatformData::CreateVerticalData()
|
|
+ const {
|
|
+ return OpenTypeVerticalData::CreateUnscaled(typeface_);
|
|
+}
|
|
+
|
|
IdentifiableToken FontPlatformData::ComputeTypefaceDigest() const {
|
|
DCHECK(typeface_);
|
|
int table_count = typeface_->countTables();
|
|
--- a/third_party/blink/renderer/platform/fonts/font_platform_data.h
|
|
+++ b/third_party/blink/renderer/platform/fonts/font_platform_data.h
|
|
@@ -59,6 +59,7 @@ typedef const struct __CTFont* CTFontRef
|
|
namespace blink {
|
|
|
|
class HarfBuzzFace;
|
|
+class OpenTypeVerticalData;
|
|
|
|
class PLATFORM_EXPORT FontPlatformData
|
|
: public GarbageCollected<FontPlatformData> {
|
|
@@ -137,6 +138,8 @@ class PLATFORM_EXPORT FontPlatformData
|
|
|
|
SkFont CreateSkFont(const FontDescription* = nullptr) const;
|
|
|
|
+ scoped_refptr<OpenTypeVerticalData> CreateVerticalData() const;
|
|
+
|
|
// Computes a digest from the typeface. The digest only depends on the
|
|
// underlying font itself, and does not vary by the style (size, weight,
|
|
// italics, etc). This is aimed at discovering the fingerprinting information
|
|
--- a/third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h
|
|
+++ b/third_party/blink/renderer/platform/fonts/opentype/open_type_vertical_data.h
|
|
@@ -27,10 +27,10 @@
|
|
|
|
#include "base/memory/scoped_refptr.h"
|
|
#include "third_party/blink/renderer/platform/fonts/glyph.h"
|
|
-#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
|
#include "third_party/blink/renderer/platform/platform_export.h"
|
|
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
|
|
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
|
|
+#include "third_party/blink/renderer/platform/wtf/ref_counted.h"
|
|
#include "third_party/blink/renderer/platform/wtf/vector.h"
|
|
#include "third_party/skia/include/core/SkRefCnt.h"
|
|
#include "third_party/skia/include/core/SkTypeface.h"
|
|
@@ -40,11 +40,14 @@ class SkFont;
|
|
namespace blink {
|
|
|
|
class PLATFORM_EXPORT OpenTypeVerticalData
|
|
- : public GarbageCollected<OpenTypeVerticalData> {
|
|
- public:
|
|
- explicit OpenTypeVerticalData(sk_sp<SkTypeface>);
|
|
+ : public RefCounted<OpenTypeVerticalData> {
|
|
+ USING_FAST_MALLOC(OpenTypeVerticalData);
|
|
|
|
- void Trace(Visitor*) const {}
|
|
+ public:
|
|
+ static scoped_refptr<OpenTypeVerticalData> CreateUnscaled(
|
|
+ sk_sp<SkTypeface> typeface) {
|
|
+ return base::AdoptRef(new OpenTypeVerticalData(typeface));
|
|
+ }
|
|
|
|
void SetScaleAndFallbackMetrics(float size_per_unit,
|
|
float ascent,
|
|
@@ -60,6 +63,8 @@ class PLATFORM_EXPORT OpenTypeVerticalDa
|
|
float* out_xy_array) const;
|
|
|
|
private:
|
|
+ explicit OpenTypeVerticalData(sk_sp<SkTypeface>);
|
|
+
|
|
void LoadMetrics(sk_sp<SkTypeface>);
|
|
bool HasVORG() const { return !vert_origin_y_.empty(); }
|
|
|
|
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
|
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_face.cc
|
|
@@ -167,7 +167,8 @@ static hb_bool_t HarfBuzzGetGlyphVertica
|
|
void* user_data) {
|
|
HarfBuzzFontData* hb_font_data =
|
|
reinterpret_cast<HarfBuzzFontData*>(font_data);
|
|
- OpenTypeVerticalData* vertical_data = hb_font_data->VerticalData();
|
|
+ scoped_refptr<OpenTypeVerticalData> vertical_data =
|
|
+ hb_font_data->VerticalData();
|
|
if (!vertical_data)
|
|
return false;
|
|
|
|
@@ -186,7 +187,8 @@ static hb_position_t HarfBuzzGetGlyphVer
|
|
void* user_data) {
|
|
HarfBuzzFontData* hb_font_data =
|
|
reinterpret_cast<HarfBuzzFontData*>(font_data);
|
|
- OpenTypeVerticalData* vertical_data = hb_font_data->VerticalData();
|
|
+ scoped_refptr<OpenTypeVerticalData> vertical_data =
|
|
+ hb_font_data->VerticalData();
|
|
if (!vertical_data) {
|
|
return SkiaScalarToHarfBuzzPosition(hb_font_data->height_fallback_);
|
|
}
|
|
--- a/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
|
+++ b/third_party/blink/renderer/platform/fonts/shaping/harfbuzz_font_data.h
|
|
@@ -32,10 +32,7 @@ struct HarfBuzzFontData final : public G
|
|
HarfBuzzFontData(const HarfBuzzFontData&) = delete;
|
|
HarfBuzzFontData& operator=(const HarfBuzzFontData&) = delete;
|
|
|
|
- void Trace(Visitor* visitor) const {
|
|
- visitor->Trace(vertical_data_);
|
|
- visitor->Trace(range_set_);
|
|
- }
|
|
+ void Trace(Visitor* visitor) const { visitor->Trace(range_set_); }
|
|
|
|
// The vertical origin and vertical advance functions in HarfBuzzFace require
|
|
// the ascent and height metrics as fallback in case no specific vertical
|
|
@@ -70,18 +67,18 @@ struct HarfBuzzFontData final : public G
|
|
}
|
|
}
|
|
|
|
- OpenTypeVerticalData* VerticalData() {
|
|
+ scoped_refptr<OpenTypeVerticalData> VerticalData() {
|
|
if (!vertical_data_) {
|
|
DCHECK_NE(ascent_fallback_, kInvalidFallbackMetricsValue);
|
|
DCHECK_NE(height_fallback_, kInvalidFallbackMetricsValue);
|
|
DCHECK_NE(size_per_unit_, kInvalidFallbackMetricsValue);
|
|
|
|
vertical_data_ =
|
|
- MakeGarbageCollected<OpenTypeVerticalData>(font_.refTypeface());
|
|
+ OpenTypeVerticalData::CreateUnscaled(font_.refTypeface());
|
|
}
|
|
vertical_data_->SetScaleAndFallbackMetrics(size_per_unit_, ascent_fallback_,
|
|
height_fallback_);
|
|
- return vertical_data_.Get();
|
|
+ return vertical_data_;
|
|
}
|
|
|
|
const hb::unique_ptr<hb_font_t> unscaled_font_;
|
|
@@ -100,7 +97,7 @@ struct HarfBuzzFontData final : public G
|
|
SpaceGlyphInOpenTypeTables space_in_gsub_ =
|
|
SpaceGlyphInOpenTypeTables::kUnknown;
|
|
|
|
- Member<OpenTypeVerticalData> vertical_data_;
|
|
+ scoped_refptr<OpenTypeVerticalData> vertical_data_;
|
|
Member<const UnicodeRangeSet> range_set_;
|
|
};
|
|
|