Pointer Lock handles disconnected DOM elements
[WebKit-https.git] / Source / WebCore / dom / Document.cpp
index 73dccb7..b4fa8a2 100644 (file)
@@ -2080,6 +2080,11 @@ void Document::detach()
     ASSERT(attached());
     ASSERT(!m_inPageCache);
 
+#if ENABLE(POINTER_LOCK)
+    if (page())
+        page()->pointerLockController()->documentDetached(this);
+#endif
+
     if (this == topDocument())
         clearAXObjectCache();