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

This commit is contained in:
trop[bot]
2019-01-10 10:35:01 -05:00
committed by John Kleinschmidt
parent 1f411d33d4
commit 1089dd36b3

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(brightray::InspectableWebContents::Create(