From 90519c3ac07c5a4a682f13a1e625b1ffb51f5f76 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 2 Oct 2018 00:14:37 -0700 Subject: [PATCH] fix: check guest view's devtools window size --- brightray/browser/inspectable_web_contents_impl.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/brightray/browser/inspectable_web_contents_impl.cc b/brightray/browser/inspectable_web_contents_impl.cc index 53f66b7dd2ef..78dc78b87eed 100644 --- a/brightray/browser/inspectable_web_contents_impl.cc +++ b/brightray/browser/inspectable_web_contents_impl.cc @@ -215,8 +215,6 @@ InspectableWebContentsImpl::InspectableWebContentsImpl( is_guest_(is_guest), view_(CreateInspectableContentsView(this)), weak_factory_(this) { - if (is_guest) - return; auto* bounds_dict = pref_service_->GetDictionary(kDevToolsBoundsPref); if (bounds_dict) { DictionaryToRect(*bounds_dict, &devtools_bounds_); @@ -227,7 +225,7 @@ InspectableWebContentsImpl::InspectableWebContentsImpl( } if (!IsPointInScreen(devtools_bounds_.origin())) { gfx::Rect display; - if (web_contents->GetNativeView()) { + if (!is_guest && web_contents->GetNativeView()) { display = display::Screen::GetScreen() ->GetDisplayNearestView(web_contents->GetNativeView()) .bounds();