fix a bug that caused a crash when using an offscreen window with detached devtools, related to autofill popups
This commit is contained in:
parent
5daaff91ea
commit
e39aacb30e
6 changed files with 31 additions and 8 deletions
|
@ -1357,14 +1357,15 @@ void NativeWindowViews::HandleKeyboardEvent(
|
|||
|
||||
void NativeWindowViews::ShowAutofillPopup(
|
||||
content::RenderFrameHost* frame_host,
|
||||
atom::api::WebContents* web_contents,
|
||||
const gfx::RectF& bounds,
|
||||
const std::vector<base::string16>& values,
|
||||
const std::vector<base::string16>& labels) {
|
||||
auto wc = atom::api::WebContents::FromWrappedClass(
|
||||
v8::Isolate::GetCurrent(), web_contents());
|
||||
// auto wc = atom::api::WebContents::FromWrappedClass(
|
||||
// v8::Isolate::GetCurrent(), web_contents());
|
||||
autofill_popup_->CreateView(
|
||||
frame_host,
|
||||
wc->IsOffScreenOrEmbedderOffscreen(),
|
||||
web_contents->IsOffScreenOrEmbedderOffscreen(),
|
||||
widget(),
|
||||
bounds);
|
||||
autofill_popup_->SetItems(values, labels);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue