Index: Source/web/FrameLoaderClientImpl.cpp |
diff --git a/Source/web/FrameLoaderClientImpl.cpp b/Source/web/FrameLoaderClientImpl.cpp |
index 8cdf3ebcc1b5da2e7c7f3d9fbec2203351d7f057..447f0c4e6545d573bd6ec1b4d98e246b5dc086d2 100644 |
--- a/Source/web/FrameLoaderClientImpl.cpp |
+++ b/Source/web/FrameLoaderClientImpl.cpp |
@@ -74,6 +74,7 @@ |
#include "core/rendering/HitTestResult.h" |
#include "modules/device_orientation/DeviceMotionController.h" |
#include "modules/device_orientation/DeviceOrientationController.h" |
+#include "modules/gamepad/NavigatorGamepad.h" |
#include "modules/screen_orientation/ScreenOrientationController.h" |
#include "platform/MIMETypeRegistry.h" |
#include "platform/UserGestureIndicator.h" |
@@ -123,6 +124,8 @@ void FrameLoaderClientImpl::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* |
DeviceOrientationController::from(*document); |
if (RuntimeEnabledFeatures::screenOrientationEnabled()) |
ScreenOrientationController::from(*document); |
+ if (RuntimeEnabledFeatures::gamepadEnabled() && document->domWindow()) |
+ NavigatorGamepad::from(document->domWindow()->navigator()); |
} |
} |
} |