mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Revert "Fix dismissal of select popups on NotifyMoveOrResizeStarted (see issue #3294)"
This reverts commit 5f4bccd672
.
Reason for revert: This change causes a native parented browser to lose focus
on move (fixes issue #3426).
This commit is contained in:
@ -261,12 +261,15 @@ void CefBrowserPlatformDelegateAlloy::SendCaptureLostEvent() {
|
||||
|
||||
#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC))
|
||||
void CefBrowserPlatformDelegateAlloy::NotifyMoveOrResizeStarted() {
|
||||
if (!web_contents_) {
|
||||
if (!browser_) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Dismiss any existing popups.
|
||||
web_contents_->ClearFocusedElement();
|
||||
auto frame = browser_->GetMainFrame();
|
||||
if (frame && frame->IsValid()) {
|
||||
static_cast<CefFrameHostImpl*>(frame.get())->NotifyMoveOrResizeStarted();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -304,6 +304,13 @@ void CefFrameHostImpl::RefreshAttributes() {
|
||||
}
|
||||
}
|
||||
|
||||
void CefFrameHostImpl::NotifyMoveOrResizeStarted() {
|
||||
SendToRenderFrame(__FUNCTION__,
|
||||
base::BindOnce([](const RenderFrameType& render_frame) {
|
||||
render_frame->MoveOrResizeStarted();
|
||||
}));
|
||||
}
|
||||
|
||||
void CefFrameHostImpl::LoadRequest(cef::mojom::RequestParamsPtr params) {
|
||||
if (!url_util::FixupGURL(params->url)) {
|
||||
return;
|
||||
|
@ -82,6 +82,10 @@ class CefFrameHostImpl : public CefFrame, public cef::mojom::BrowserFrame {
|
||||
void SetFocused(bool focused);
|
||||
void RefreshAttributes();
|
||||
|
||||
// Notification that a move or resize of the renderer's containing window has
|
||||
// started. Used on Windows and Linux with the Alloy runtime.
|
||||
void NotifyMoveOrResizeStarted();
|
||||
|
||||
// Load the specified request.
|
||||
void LoadRequest(cef::mojom::RequestParamsPtr params);
|
||||
|
||||
|
Reference in New Issue
Block a user