mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-27 09:41:17 +01:00
Fix dismissal of select popups on NotifyMoveOrResizeStarted (see issue #3294)
This impacts both Alloy and Chrome runtimes when using a native parent window.
This commit is contained in:
parent
0428438e72
commit
5f4bccd672
@ -261,14 +261,11 @@ void CefBrowserPlatformDelegateAlloy::SendCaptureLostEvent() {
|
|||||||
|
|
||||||
#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC))
|
#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC))
|
||||||
void CefBrowserPlatformDelegateAlloy::NotifyMoveOrResizeStarted() {
|
void CefBrowserPlatformDelegateAlloy::NotifyMoveOrResizeStarted() {
|
||||||
if (!browser_)
|
if (!web_contents_)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Dismiss any existing popups.
|
// Dismiss any existing popups.
|
||||||
auto frame = browser_->GetMainFrame();
|
web_contents_->ClearFocusedElement();
|
||||||
if (frame && frame->IsValid()) {
|
|
||||||
static_cast<CefFrameHostImpl*>(frame.get())->NotifyMoveOrResizeStarted();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -283,13 +283,6 @@ void CefFrameHostImpl::RefreshAttributes() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefFrameHostImpl::NotifyMoveOrResizeStarted() {
|
|
||||||
SendToRenderFrame(__FUNCTION__,
|
|
||||||
base::BindOnce([](const RenderFrameType& render_frame) {
|
|
||||||
render_frame->MoveOrResizeStarted();
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefFrameHostImpl::LoadRequest(cef::mojom::RequestParamsPtr params) {
|
void CefFrameHostImpl::LoadRequest(cef::mojom::RequestParamsPtr params) {
|
||||||
if (!url_util::FixupGURL(params->url))
|
if (!url_util::FixupGURL(params->url))
|
||||||
return;
|
return;
|
||||||
|
@ -82,10 +82,6 @@ class CefFrameHostImpl : public CefFrame, public cef::mojom::BrowserFrame {
|
|||||||
void SetFocused(bool focused);
|
void SetFocused(bool focused);
|
||||||
void RefreshAttributes();
|
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.
|
// Load the specified request.
|
||||||
void LoadRequest(cef::mojom::RequestParamsPtr params);
|
void LoadRequest(cef::mojom::RequestParamsPtr params);
|
||||||
|
|
||||||
|
@ -73,10 +73,6 @@ interface RenderFrame {
|
|||||||
|
|
||||||
// Loading has stopped.
|
// Loading has stopped.
|
||||||
DidStopLoading();
|
DidStopLoading();
|
||||||
|
|
||||||
// Move or resize of the renderer's containing window has started. Used on
|
|
||||||
// Windows and Linux with the Alloy runtime.
|
|
||||||
MoveOrResizeStarted();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Interface for communicating with a frame in the browser process.
|
// Interface for communicating with a frame in the browser process.
|
||||||
|
@ -684,14 +684,6 @@ void CefFrameImpl::DidStopLoading() {
|
|||||||
OnDraggableRegionsChanged();
|
OnDraggableRegionsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CefFrameImpl::MoveOrResizeStarted() {
|
|
||||||
if (frame_) {
|
|
||||||
auto web_view = frame_->View();
|
|
||||||
if (web_view)
|
|
||||||
web_view->CancelPagePopup();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void CefFrameImpl::ContextLifecycleStateChanged(
|
void CefFrameImpl::ContextLifecycleStateChanged(
|
||||||
blink::mojom::blink::FrameLifecycleState state) {
|
blink::mojom::blink::FrameLifecycleState state) {
|
||||||
if (state == blink::mojom::FrameLifecycleState::kFrozen && IsMain() &&
|
if (state == blink::mojom::FrameLifecycleState::kFrozen && IsMain() &&
|
||||||
|
@ -142,7 +142,6 @@ class CefFrameImpl
|
|||||||
int32_t startLine) override;
|
int32_t startLine) override;
|
||||||
void LoadRequest(cef::mojom::RequestParamsPtr params) override;
|
void LoadRequest(cef::mojom::RequestParamsPtr params) override;
|
||||||
void DidStopLoading() override;
|
void DidStopLoading() override;
|
||||||
void MoveOrResizeStarted() override;
|
|
||||||
|
|
||||||
// blink_glue::CefExecutionContextLifecycleStateObserver methods:
|
// blink_glue::CefExecutionContextLifecycleStateObserver methods:
|
||||||
void ContextLifecycleStateChanged(
|
void ContextLifecycleStateChanged(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user