fix: check guest view's devtools window size (#14928)
This commit is contained in:
parent
8d362150e0
commit
ee6de82c08
1 changed files with 1 additions and 3 deletions
|
@ -214,8 +214,6 @@ InspectableWebContentsImpl::InspectableWebContentsImpl(
|
||||||
is_guest_(is_guest),
|
is_guest_(is_guest),
|
||||||
view_(CreateInspectableContentsView(this)),
|
view_(CreateInspectableContentsView(this)),
|
||||||
weak_factory_(this) {
|
weak_factory_(this) {
|
||||||
if (is_guest)
|
|
||||||
return;
|
|
||||||
auto* bounds_dict = pref_service_->GetDictionary(kDevToolsBoundsPref);
|
auto* bounds_dict = pref_service_->GetDictionary(kDevToolsBoundsPref);
|
||||||
if (bounds_dict) {
|
if (bounds_dict) {
|
||||||
DictionaryToRect(*bounds_dict, &devtools_bounds_);
|
DictionaryToRect(*bounds_dict, &devtools_bounds_);
|
||||||
|
@ -226,7 +224,7 @@ InspectableWebContentsImpl::InspectableWebContentsImpl(
|
||||||
}
|
}
|
||||||
if (!IsPointInScreen(devtools_bounds_.origin())) {
|
if (!IsPointInScreen(devtools_bounds_.origin())) {
|
||||||
gfx::Rect display;
|
gfx::Rect display;
|
||||||
if (web_contents->GetNativeView()) {
|
if (!is_guest && web_contents->GetNativeView()) {
|
||||||
display = display::Screen::GetScreen()
|
display = display::Screen::GetScreen()
|
||||||
->GetDisplayNearestView(web_contents->GetNativeView())
|
->GetDisplayNearestView(web_contents->GetNativeView())
|
||||||
.bounds();
|
.bounds();
|
||||||
|
|
Loading…
Reference in a new issue