| Index: third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
|
| diff --git a/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp b/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
|
| index bb3ad3ce0ea4ed344752cca89033acb72b673b65..efad7b6130d2456f103c910f6ffaa2c0962d5815 100644
|
| --- a/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
|
| +++ b/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp
|
| @@ -220,7 +220,7 @@ static bool isGamepadEvent(const AtomicString& eventType)
|
| void NavigatorGamepad::didAddEventListener(LocalDOMWindow*, const AtomicString& eventType)
|
| {
|
| if (isGamepadEvent(eventType)) {
|
| - if (page() && page()->visibilityState() == PageVisibilityStateVisible)
|
| + if (page() && page()->isPageVisible())
|
| startUpdatingIfAttached();
|
| m_hasEventListener = true;
|
| }
|
| @@ -250,7 +250,7 @@ void NavigatorGamepad::didRemoveGamepadEventListeners()
|
| void NavigatorGamepad::pageVisibilityChanged()
|
| {
|
| // Inform the embedder whether it needs to provide gamepad data for us.
|
| - bool visible = page()->visibilityState() == PageVisibilityStateVisible;
|
| + bool visible = page()->isPageVisible();
|
| if (visible && (m_hasEventListener || m_gamepads))
|
| startUpdatingIfAttached();
|
| else
|
|
|