1bbb407dc9
* chore: bump chromium in DEPS to 99e60beb593ecf98f8a441e3f03a13b68cfcb311 * update patches * chore: bump chromium in DEPS to b1abadda21f417ba5e8276c4dd779d31445d16cd * update patches * 2146532: gtkui: Fix standalone Ozone/Wayland configuration https://chromium-review.googlesource.com/c/chromium/src/+/2146532 * 2145152: Pass source URL when setting a cookie https://chromium-review.googlesource.com/c/chromium/src/+/2145152 * lint * chore: bump chromium in DEPS to 8897189f1da5a3670bbe32d343767fd71f80d779 * chore: bump chromium in DEPS to 8ac51eeee93a02ed5b81f47e28627079edeecde0 * chore: bump chromium in DEPS to e897b8003f3a5f3c8d654eee9b03c513046ae7ea * chore: bump chromium in DEPS to 7b80f9c82122600291d041c530698616a4716cdf * Update patches * Move definition of WebInputEvent enums into mojo https://chromium-review.googlesource.com/c/chromium/src/+/2152777 * update patches Co-authored-by: Electron Bot <anonymous@electronjs.org> Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net> Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
36 lines
1.8 KiB
Diff
36 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shelley Vohr <shelley.vohr@gmail.com>
|
|
Date: Tue, 31 Mar 2020 14:32:33 -0700
|
|
Subject: fix: undo redo broken in webviews
|
|
|
|
When propagating the undo and redo events from the menu, Chromium was not
|
|
properly sending the events to the focused webcontents on macOS. This fixes
|
|
that error. A crbug has been opened at https://bugs.chromium.org/p/chromium/issues/detail?id=1067284
|
|
and this patch will be removed when it has been resolved upstream.
|
|
|
|
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
|
index 17e3fe40522e088057eaf01a290b658a0b6d1d01..a573ff0b42f344aade85f2c62ac5fbfb251f36ef 100644
|
|
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
|
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
|
@@ -38,6 +38,7 @@
|
|
#include "content/browser/renderer_host/render_widget_host_input_event_router.h"
|
|
#import "content/browser/renderer_host/text_input_client_mac.h"
|
|
#import "content/browser/renderer_host/ui_events_helper.h"
|
|
+#include "content/browser/web_contents/web_contents_impl.h"
|
|
#include "content/common/text_input_state.h"
|
|
#include "content/common/view_messages.h"
|
|
#include "content/public/browser/browser_context.h"
|
|
@@ -978,7 +979,12 @@ gfx::Range RenderWidgetHostViewMac::ConvertCharacterRangeToCompositionRange(
|
|
}
|
|
|
|
WebContents* RenderWidgetHostViewMac::GetWebContents() {
|
|
- return WebContents::FromRenderViewHost(RenderViewHost::From(host()));
|
|
+ auto* wc = WebContents::FromRenderViewHost(RenderViewHost::From(host()));
|
|
+ if (wc) {
|
|
+ WebContentsImpl* web_contents_impl = static_cast<WebContentsImpl*>(wc);
|
|
+ return web_contents_impl->GetFocusedWebContents();
|
|
+ }
|
|
+ return wc;
|
|
}
|
|
|
|
bool RenderWidgetHostViewMac::GetCachedFirstRectForCharacterRange(
|