electron/patches/chromium/enable_reset_aspect_ratio.patch

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

39 lines
1.8 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu, 4 Oct 2018 14:57:02 -0700
Subject: feat: enable setting aspect ratio to 0
Make SetAspectRatio accept 0 as valid input, which would reset to null.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
chore: bump chromium to 133.0.6878.0 (main) (#44831) * chore: bump chromium in DEPS to 133.0.6858.0 * chore: bump chromium in DEPS to 133.0.6860.0 * chore: update patches v8/revert_fastapi_remove_dynamic_overload_resolution.patch had some additions due to https://chromium-review.googlesource.com/c/v8/v8/+/6023139 * 6044060: Reland "Moves shared GN templates into //build/config/apple." https://chromium-review.googlesource.com/c/chromium/src/+/6044060 * Revert "6023139: [fastapi] Add support for attribute setters" https://chromium-review.googlesource.com/c/v8/v8/+/6023139 * Update printing.patch The removed include is present in the original source file now, just slightly before where it was being added. 6015430: Reduce platform-like buildflags in sandbox code Refs: https://chromium-review.googlesource.com/c/chromium/src/+/6015430 * 6039836: Migrate Command::IsMediaKey to be a member of ui::Accelerator https://chromium-review.googlesource.com/c/chromium/src/+/6039836 * 6038659: [CodeHealth] Clean up the feature ZstdContentEncoding https://chromium-review.googlesource.com/c/chromium/src/+/6038659 * chore: bump chromium in DEPS to 133.0.6862.0 * chore: update patches * 72747: crypto: switch to C++ https://boringssl-review.googlesource.com/c/boringssl/+/72747 * fixup! 72747: crypto: switch to C++ https://boringssl-review.googlesource.com/c/boringssl/+/72747 * chore: gen libc++ filenames * 6042601: [shared storage] Implement with_lock option for methods from response headers https://chromium-review.googlesource.com/c/chromium/src/+/6042601 * chore: bump chromium in DEPS to 133.0.6864.0 * chore: bump chromium in DEPS to 133.0.6866.0 * chore: bump chromium in DEPS to 133.0.6868.0 * chore: bump chromium in DEPS to 133.0.6870.0 * chore: bump chromium in DEPS to 133.0.6872.0 * chore: bump chromium in DEPS to 133.0.6874.0 * chore: bump chromium in DEPS to 133.0.6876.0 * 6039992: Fix false activation logic for context menu. | https://chromium-review.googlesource.com/c/chromium/src/+/6039992 * chore: update patches * chore: update patches * chore: bump chromium in DEPS to 133.0.6878.0 * chore: update patches * [Build] Organize //components/dbus into a single component Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6055280 * Merge //components/dbus/* into a single //components/dbus, which matches how most components are organized. This avoids having many small shared libraries which incurs unnecessary overhead. * Limit visibility of //components/dbus/* to //components/dbus * fixup! Update _LIBCPP_ABI_VERSION to always have a default value while keeping unstable false due to changes in llvm https://github.com/llvm/llvm-project/pull/112094 * 6040416: Let s know which widget the input came on. | https://chromium-review.googlesource.com/c/chromium/src/+/6040416 * 6056267: [MPArch guest view] Fix authentication for MPArch guests | https://chromium-review.googlesource.com/c/chromium/src/+/6056267 * make_span() is deprecated: https://issues.chromium.org/issues/341907909 * fixup: https://issues.chromium.org/issues/341907909 * chore: delete extra bracket from removing make_span commit * fixup: 6059305: Make WTF::UTF8ConversionMode a scoped enum | https://chromium-review.googlesource.com/c/chromium/src/+/6059305 * 6051058: CookieInclusionStatus: Remove ctors which bypass invariants | https://chromium-review.googlesource.com/c/chromium/src/+/6051058 * 6038981: Remove most remaining CHECK(false)s | https://chromium-review.googlesource.com/c/chromium/src/+/6038981 * build: use third_party/simdutf in Node.js * chore: node ./script/gen-libc++-filenames.js * chore: fix strict-cast conversion error in subspan() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6044946 * chore: fix strict-cast conversion error in base::as_bytes() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6044946 * chore: fix strict-cast conversion error in span.split_at() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6044946 * chore: use shorthand target name * chore: better docs in build_add_public_config_simdutf_config.patch --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: alice <alice@makenotion.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-12-10 13:16:07 -06:00
index 8a37f2e19d2c8c2c4cbd7f4475c16e41671fe7b4..21df259c3e596cecda15cff2c7a290e75a50d2b3 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
chore: bump chromium to 133.0.6878.0 (main) (#44831) * chore: bump chromium in DEPS to 133.0.6858.0 * chore: bump chromium in DEPS to 133.0.6860.0 * chore: update patches v8/revert_fastapi_remove_dynamic_overload_resolution.patch had some additions due to https://chromium-review.googlesource.com/c/v8/v8/+/6023139 * 6044060: Reland "Moves shared GN templates into //build/config/apple." https://chromium-review.googlesource.com/c/chromium/src/+/6044060 * Revert "6023139: [fastapi] Add support for attribute setters" https://chromium-review.googlesource.com/c/v8/v8/+/6023139 * Update printing.patch The removed include is present in the original source file now, just slightly before where it was being added. 6015430: Reduce platform-like buildflags in sandbox code Refs: https://chromium-review.googlesource.com/c/chromium/src/+/6015430 * 6039836: Migrate Command::IsMediaKey to be a member of ui::Accelerator https://chromium-review.googlesource.com/c/chromium/src/+/6039836 * 6038659: [CodeHealth] Clean up the feature ZstdContentEncoding https://chromium-review.googlesource.com/c/chromium/src/+/6038659 * chore: bump chromium in DEPS to 133.0.6862.0 * chore: update patches * 72747: crypto: switch to C++ https://boringssl-review.googlesource.com/c/boringssl/+/72747 * fixup! 72747: crypto: switch to C++ https://boringssl-review.googlesource.com/c/boringssl/+/72747 * chore: gen libc++ filenames * 6042601: [shared storage] Implement with_lock option for methods from response headers https://chromium-review.googlesource.com/c/chromium/src/+/6042601 * chore: bump chromium in DEPS to 133.0.6864.0 * chore: bump chromium in DEPS to 133.0.6866.0 * chore: bump chromium in DEPS to 133.0.6868.0 * chore: bump chromium in DEPS to 133.0.6870.0 * chore: bump chromium in DEPS to 133.0.6872.0 * chore: bump chromium in DEPS to 133.0.6874.0 * chore: bump chromium in DEPS to 133.0.6876.0 * 6039992: Fix false activation logic for context menu. | https://chromium-review.googlesource.com/c/chromium/src/+/6039992 * chore: update patches * chore: update patches * chore: bump chromium in DEPS to 133.0.6878.0 * chore: update patches * [Build] Organize //components/dbus into a single component Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6055280 * Merge //components/dbus/* into a single //components/dbus, which matches how most components are organized. This avoids having many small shared libraries which incurs unnecessary overhead. * Limit visibility of //components/dbus/* to //components/dbus * fixup! Update _LIBCPP_ABI_VERSION to always have a default value while keeping unstable false due to changes in llvm https://github.com/llvm/llvm-project/pull/112094 * 6040416: Let s know which widget the input came on. | https://chromium-review.googlesource.com/c/chromium/src/+/6040416 * 6056267: [MPArch guest view] Fix authentication for MPArch guests | https://chromium-review.googlesource.com/c/chromium/src/+/6056267 * make_span() is deprecated: https://issues.chromium.org/issues/341907909 * fixup: https://issues.chromium.org/issues/341907909 * chore: delete extra bracket from removing make_span commit * fixup: 6059305: Make WTF::UTF8ConversionMode a scoped enum | https://chromium-review.googlesource.com/c/chromium/src/+/6059305 * 6051058: CookieInclusionStatus: Remove ctors which bypass invariants | https://chromium-review.googlesource.com/c/chromium/src/+/6051058 * 6038981: Remove most remaining CHECK(false)s | https://chromium-review.googlesource.com/c/chromium/src/+/6038981 * build: use third_party/simdutf in Node.js * chore: node ./script/gen-libc++-filenames.js * chore: fix strict-cast conversion error in subspan() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6044946 * chore: fix strict-cast conversion error in base::as_bytes() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6044946 * chore: fix strict-cast conversion error in span.split_at() Xref: https://chromium-review.googlesource.com/c/chromium/src/+/6044946 * chore: use shorthand target name * chore: better docs in build_add_public_config_simdutf_config.patch --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: alice <alice@makenotion.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-12-10 13:16:07 -06:00
@@ -584,7 +584,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
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 10:47:48 -04:00
void DesktopWindowTreeHostWin::SetAspectRatio(
const gfx::SizeF& aspect_ratio,
const gfx::Size& excluded_margin) {
- DCHECK(!aspect_ratio.IsEmpty());
+ DCHECK_NE(aspect_ratio.height(), 0);
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 10:47:48 -04:00
message_handler_->SetAspectRatio(aspect_ratio.width() / aspect_ratio.height(),
excluded_margin);
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 509bbf34ed99b5743564c2683f24d0bb2a6757bb..4957a1aba28263313ec072e8b4e71d14c66bf73e 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -961,8 +961,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
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 10:47:48 -04:00
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio,
const gfx::Size& excluded_margin) {
- // If the aspect ratio is not in the valid range, do nothing.
- DCHECK_GT(aspect_ratio, 0.0f);
+ // If the aspect ratio is 0, reset it to null.
+ if (aspect_ratio == 0.0f) {
+ aspect_ratio_.reset();
+ return;
+ }
aspect_ratio_ = aspect_ratio;