fix: properly determine if WebContents is offscreen in WebContentsDelegate (#16329)

This commit is contained in:
Michelle Tilley 2019-01-09 09:55:45 -08:00 committed by GitHub
parent f72d5a4184
commit 744f737cba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -187,7 +187,7 @@ void CommonWebContentsDelegate::InitWithWebContents(
// Determien whether the WebContents is offscreen.
auto* web_preferences = WebContentsPreferences::From(web_contents);
offscreen_ =
!web_preferences || web_preferences->IsEnabled(options::kOffscreen);
web_preferences && web_preferences->IsEnabled(options::kOffscreen);
// Create InspectableWebContents.
web_contents_.reset(InspectableWebContents::Create(