- Electron version: 0.37.2
- Operating system: OS X 10.11.3 

https://github.com/atom/electron/pull/4700 added support for the `visibilitychange` event (thank you @zcbenz!), but that event doesn't make its way into `<webview>`s, which are always "visible" regardless of their host page's `document.visibilityState`.

Tested using the following setup

Host page:

``` coffee
console.log "<webview> host page initial visibilityState =", document.visibilityState

document.addEventListener "visibilitychange", ->
  console.log "<webview> host page visibilitychange event, visibilityState =", document.visibilityState
```

`<webview>`:

``` coffee
console.log "<webview> initial visibilityState =", document.visibilityState

addEventListener "visibilitychange", ->
  console.log "<webview> visibilitychange, visibilityState =", document.visibilityState

setInterval ->
  console.log "<webview> visibilityState =", document.visibilityState
, 3000
```

Host page logs:

```
<webview> host page initial visibilityState = visible
<webview> host page visibilitychange event, visibilityState = hidden
<webview> host page visibilitychange event, visibilityState = visible
```

`<webview>` logs:

```
<webview> initial visibilityState = visible
(24) <webview> visibilityState = visible
```

atom/browser/web_contents_preferences.cc
}
  if (self->web_preferences_.GetBoolean("allowDisplayingInsecureContent", &b))
    prefs->allow_displaying_insecure_content = b;
  if (self->web_preferences_.GetBoolean("allowRunningInsecureContent", &b))
    prefs->allow_running_insecure_content = b;
  const base::DictionaryValue* fonts = nullptr;
  if (self->web_preferences_.GetDictionary("defaultFontFamily", &fonts)) {
    base::string16 font;
    if (fonts->GetString("standard", &font))
      prefs->standard_font_family_map[content::kCommonScript] = font;
    if (fonts->GetString("serif", &font))
      prefs->serif_font_family_map[content::kCommonScript] = font;
    if (fonts->GetString("sansSerif", &font))
      prefs->sans_serif_font_family_map[content::kCommonScript] = font;
    if (fonts->GetString("monospace", &font))
      prefs->fixed_font_family_map[content::kCommonScript] = font;
  }
  int size;
  if (self->web_preferences_.GetInteger("defaultFontSize", &size))
    prefs->default_font_size = size;
  if (self->web_preferences_.GetInteger("defaultMonospaceFontSize", &size))
    prefs->default_fixed_font_size = size;
  if (self->web_preferences_.GetInteger("minimumFontSize", &size))
    prefs->minimum_font_size = size;
  std::string encoding;
  if (self->web_preferences_.GetString("defaultEncoding", &encoding))
    prefs->default_encoding = encoding;
}
}