electron/patches/chromium/mas_blink_no_private_api.patch

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.9 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2018-09-21 00:30:26 +00:00
From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu, 20 Sep 2018 17:48:49 -0700
Subject: mas: avoid private APIs in blink
2018-09-21 00:30:26 +00:00
Guard usages in chromium code of private Mac APIs by MAS_BUILD, so they can
be excluded for people who want to submit their apps to the Mac App store.
diff --git a/third_party/blink/renderer/core/editing/kill_ring_mac.mm b/third_party/blink/renderer/core/editing/kill_ring_mac.mm
chore: bump chromium to 115.0.5760.0 (main) (#38033) * chore: bump chromium in DEPS to 114.0.5721.0 * chore: update patches * chore: bump chromium in DEPS to 114.0.5723.0 * chore: update patches * chore: bump chromium in DEPS to 114.0.5725.0 * chore: update patches * chore: bump chromium in DEPS to 114.0.5727.0 * chore: bump chromium in DEPS to 114.0.5729.0 * chore: bump chromium in DEPS to 114.0.5731.0 * chore: update patches * 4450570: Clean up content shell https://chromium-review.googlesource.com/c/chromium/src/+/4450570 * 4262527: geolocation: Introduce mojom::GeopositionResult https://chromium-review.googlesource.com/c/chromium/src/+/4262527 * 4450327: Android/Nav: Stop taking content timeout timer from old host. https://chromium-review.googlesource.com/c/chromium/src/+/4450327 Also, see: 4451366: Reland "Prerender: Fix prerender new content timeout start timing" https://chromium-review.googlesource.com/c/chromium/src/+/4451366 * chore: bump chromium in DEPS to 114.0.5733.2 * chore: update patches * chore: bump CircleCI xcode version this will hopefully get us the necessary macOS sdk 13.3 on CI. * chore: bump chromium in DEPS to 114.0.5735.0 * chore: update patches * test: fix geolocation test * chore: bump chromium in DEPS to 115.0.5736.0 * chore: update patches * chore: bump chromium in DEPS to 115.0.5738.0 * chore: update patches * fix: remove profiles from spellcheck service * chore: update libc++ filenames * chore: bump chromium in DEPS to 115.0.5740.0 * chore: update patches * chore: bump chromium in DEPS to 115.0.5742.0 * chore: update patches * chore: bump chromium in DEPS to 115.0.5744.0 * chore: update patches * chore: bump chromium in DEPS to 115.0.5746.0 * chore: update patches * chore: update filenames.libcxx.gni * chore: bump chromium in DEPS to 115.0.5748.0 * chore: update patches * build: update libcxx filenames * chore: bump chromium in DEPS to 115.0.5750.0 * chore: bump chromium in DEPS to 115.0.5752.2 * chore: bump chromium in DEPS to 115.0.5754.0 * chore: bump chromium in DEPS to 115.0.5756.0 * chore: bump chromium in DEPS to 115.0.5758.0 * chore: update patches * chore: update patch after rebase * 4500969: Delete content/dev_ui_content_resources.grd file. https://chromium-review.googlesource.com/c/chromium/src/+/4500969 * Use base.Value.Dict in OmahaAttributesHandler related code https://chromium-review.googlesource.com/c/chromium/src/+/4506402 * chore: bump chromium in DEPS to 115.0.5760.0 * chore: update patches * chore: fixup line endings * 4336172: Include client-drawn window decorations in aspect ratio. | Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4336172 (cherry picked from commit 27c2f6c43e8e4a792b33fdf8cf3af880376406be) * spec: fix race condition in alwaysOnTop test (cherry picked from commit 2ec5213fa0998d9cf21248257e7b5a5581044ea3) * build: use xcode 14.2 not 14.3 (cherry picked from commit b7c62351a77102e854a801c363f391b177ebf672) * build: use macOS 12 to run tests The new macOS 13 VMs appear to have different screen / display behavior (cherry picked from commit 14dc1dbc24cec85111a7482b49049f6acbfbc5f1) * Remove always-true flag --harmony-sharedarraybuffer https://chromium-review.googlesource.com/c/v8/v8/+/4429630 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: VerteDinde <keeleymhammond@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2023-05-10 14:47:48 +00:00
index 700a4b58ea17597b41dddb8c552e2f2cfc9aa393..8e79ef2ae958dfbaf9cf928d4e3c76dd4d3ab99b 100644
2018-09-21 00:30:26 +00:00
--- a/third_party/blink/renderer/core/editing/kill_ring_mac.mm
+++ b/third_party/blink/renderer/core/editing/kill_ring_mac.mm
chore: bump chromium to 115.0.5760.0 (main) (#38033) * chore: bump chromium in DEPS to 114.0.5721.0 * chore: update patches * chore: bump chromium in DEPS to 114.0.5723.0 * chore: update patches * chore: bump chromium in DEPS to 114.0.5725.0 * chore: update patches * chore: bump chromium in DEPS to 114.0.5727.0 * chore: bump chromium in DEPS to 114.0.5729.0 * chore: bump chromium in DEPS to 114.0.5731.0 * chore: update patches * 4450570: Clean up content shell https://chromium-review.googlesource.com/c/chromium/src/+/4450570 * 4262527: geolocation: Introduce mojom::GeopositionResult https://chromium-review.googlesource.com/c/chromium/src/+/4262527 * 4450327: Android/Nav: Stop taking content timeout timer from old host. https://chromium-review.googlesource.com/c/chromium/src/+/4450327 Also, see: 4451366: Reland "Prerender: Fix prerender new content timeout start timing" https://chromium-review.googlesource.com/c/chromium/src/+/4451366 * chore: bump chromium in DEPS to 114.0.5733.2 * chore: update patches * chore: bump CircleCI xcode version this will hopefully get us the necessary macOS sdk 13.3 on CI. * chore: bump chromium in DEPS to 114.0.5735.0 * chore: update patches * test: fix geolocation test * chore: bump chromium in DEPS to 115.0.5736.0 * chore: update patches * chore: bump chromium in DEPS to 115.0.5738.0 * chore: update patches * fix: remove profiles from spellcheck service * chore: update libc++ filenames * chore: bump chromium in DEPS to 115.0.5740.0 * chore: update patches * chore: bump chromium in DEPS to 115.0.5742.0 * chore: update patches * chore: bump chromium in DEPS to 115.0.5744.0 * chore: update patches * chore: bump chromium in DEPS to 115.0.5746.0 * chore: update patches * chore: update filenames.libcxx.gni * chore: bump chromium in DEPS to 115.0.5748.0 * chore: update patches * build: update libcxx filenames * chore: bump chromium in DEPS to 115.0.5750.0 * chore: bump chromium in DEPS to 115.0.5752.2 * chore: bump chromium in DEPS to 115.0.5754.0 * chore: bump chromium in DEPS to 115.0.5756.0 * chore: bump chromium in DEPS to 115.0.5758.0 * chore: update patches * chore: update patch after rebase * 4500969: Delete content/dev_ui_content_resources.grd file. https://chromium-review.googlesource.com/c/chromium/src/+/4500969 * Use base.Value.Dict in OmahaAttributesHandler related code https://chromium-review.googlesource.com/c/chromium/src/+/4506402 * chore: bump chromium in DEPS to 115.0.5760.0 * chore: update patches * chore: fixup line endings * 4336172: Include client-drawn window decorations in aspect ratio. | Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4336172 (cherry picked from commit 27c2f6c43e8e4a792b33fdf8cf3af880376406be) * spec: fix race condition in alwaysOnTop test (cherry picked from commit 2ec5213fa0998d9cf21248257e7b5a5581044ea3) * build: use xcode 14.2 not 14.3 (cherry picked from commit b7c62351a77102e854a801c363f391b177ebf672) * build: use macOS 12 to run tests The new macOS 13 VMs appear to have different screen / display behavior (cherry picked from commit 14dc1dbc24cec85111a7482b49049f6acbfbc5f1) * Remove always-true flag --harmony-sharedarraybuffer https://chromium-review.googlesource.com/c/v8/v8/+/4429630 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: VerteDinde <keeleymhammond@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2023-05-10 14:47:48 +00:00
@@ -31,6 +31,7 @@
namespace blink {
+#if !IS_MAS_BUILD()
extern "C" {
// Kill ring calls. Would be better to use NSKillRing.h, but that's not
chore: bump chromium to 115.0.5760.0 (main) (#38033) * chore: bump chromium in DEPS to 114.0.5721.0 * chore: update patches * chore: bump chromium in DEPS to 114.0.5723.0 * chore: update patches * chore: bump chromium in DEPS to 114.0.5725.0 * chore: update patches * chore: bump chromium in DEPS to 114.0.5727.0 * chore: bump chromium in DEPS to 114.0.5729.0 * chore: bump chromium in DEPS to 114.0.5731.0 * chore: update patches * 4450570: Clean up content shell https://chromium-review.googlesource.com/c/chromium/src/+/4450570 * 4262527: geolocation: Introduce mojom::GeopositionResult https://chromium-review.googlesource.com/c/chromium/src/+/4262527 * 4450327: Android/Nav: Stop taking content timeout timer from old host. https://chromium-review.googlesource.com/c/chromium/src/+/4450327 Also, see: 4451366: Reland "Prerender: Fix prerender new content timeout start timing" https://chromium-review.googlesource.com/c/chromium/src/+/4451366 * chore: bump chromium in DEPS to 114.0.5733.2 * chore: update patches * chore: bump CircleCI xcode version this will hopefully get us the necessary macOS sdk 13.3 on CI. * chore: bump chromium in DEPS to 114.0.5735.0 * chore: update patches * test: fix geolocation test * chore: bump chromium in DEPS to 115.0.5736.0 * chore: update patches * chore: bump chromium in DEPS to 115.0.5738.0 * chore: update patches * fix: remove profiles from spellcheck service * chore: update libc++ filenames * chore: bump chromium in DEPS to 115.0.5740.0 * chore: update patches * chore: bump chromium in DEPS to 115.0.5742.0 * chore: update patches * chore: bump chromium in DEPS to 115.0.5744.0 * chore: update patches * chore: bump chromium in DEPS to 115.0.5746.0 * chore: update patches * chore: update filenames.libcxx.gni * chore: bump chromium in DEPS to 115.0.5748.0 * chore: update patches * build: update libcxx filenames * chore: bump chromium in DEPS to 115.0.5750.0 * chore: bump chromium in DEPS to 115.0.5752.2 * chore: bump chromium in DEPS to 115.0.5754.0 * chore: bump chromium in DEPS to 115.0.5756.0 * chore: bump chromium in DEPS to 115.0.5758.0 * chore: update patches * chore: update patch after rebase * 4500969: Delete content/dev_ui_content_resources.grd file. https://chromium-review.googlesource.com/c/chromium/src/+/4500969 * Use base.Value.Dict in OmahaAttributesHandler related code https://chromium-review.googlesource.com/c/chromium/src/+/4506402 * chore: bump chromium in DEPS to 115.0.5760.0 * chore: update patches * chore: fixup line endings * 4336172: Include client-drawn window decorations in aspect ratio. | Ref: https://chromium-review.googlesource.com/c/chromium/src/+/4336172 (cherry picked from commit 27c2f6c43e8e4a792b33fdf8cf3af880376406be) * spec: fix race condition in alwaysOnTop test (cherry picked from commit 2ec5213fa0998d9cf21248257e7b5a5581044ea3) * build: use xcode 14.2 not 14.3 (cherry picked from commit b7c62351a77102e854a801c363f391b177ebf672) * build: use macOS 12 to run tests The new macOS 13 VMs appear to have different screen / display behavior (cherry picked from commit 14dc1dbc24cec85111a7482b49049f6acbfbc5f1) * Remove always-true flag --harmony-sharedarraybuffer https://chromium-review.googlesource.com/c/v8/v8/+/4429630 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Keeley Hammond <vertedinde@electronjs.org> Co-authored-by: VerteDinde <keeleymhammond@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2023-05-10 14:47:48 +00:00
@@ -43,38 +44,53 @@
void _NSNewKillRingSequence();
void _NSSetKillRingToYankedState();
}
+#endif
static void InitializeKillRingIfNeeded() {
static bool initialized_kill_ring = false;
if (!initialized_kill_ring) {
initialized_kill_ring = true;
+#if !IS_MAS_BUILD()
_NSInitializeKillRing();
+#endif
}
}
void KillRing::Append(const String& string) {
InitializeKillRingIfNeeded();
+#if !IS_MAS_BUILD()
_NSAppendToKillRing(string);
+#endif
}
void KillRing::Prepend(const String& string) {
InitializeKillRingIfNeeded();
+#if !IS_MAS_BUILD()
_NSPrependToKillRing(string);
+#endif
}
String KillRing::Yank() {
InitializeKillRingIfNeeded();
+#if !IS_MAS_BUILD()
return _NSYankFromKillRing();
+#else
+ return "";
+#endif
}
void KillRing::StartNewSequence() {
InitializeKillRingIfNeeded();
+#if !IS_MAS_BUILD()
_NSNewKillRingSequence();
+#endif
}
void KillRing::SetToYankedState() {
InitializeKillRingIfNeeded();
+#if !IS_MAS_BUILD()
_NSSetKillRingToYankedState();
+#endif
}
} // namespace blink