fix: properly determine if WebContents is offscreen in WebContentsDelegate (backport: 3-1-x) (#16341)

This commit is contained in:
trop[bot] 2019-01-09 15:14:40 -08:00 committed by Michelle Tilley
parent 034ea3cdfb
commit 17c00954bd

View file

@ -163,7 +163,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(brightray::InspectableWebContents::Create(