Plumbed through extended fullscreen again
diff --git a/Source/core/dom/Fullscreen.cpp b/Source/core/dom/Fullscreen.cpp
index 60d34d0..48eceec 100644
--- a/Source/core/dom/Fullscreen.cpp
+++ b/Source/core/dom/Fullscreen.cpp
@@ -294,9 +294,14 @@
             // 4. Otherwise, do nothing for this document. It stays the same.
         } while (++current != docs.end());
 
+        int display_id = 0;
+        if (m_fullscreenOptions.vrDisplay()) {
+            display_id = m_fullscreenOptions.vrDisplay()->index();
+        }
+
         // 5. Return, and run the remaining steps asynchronously.
         // 6. Optionally, perform some animation.
-        document()->frameHost()->chrome().client().enterFullScreenForElement(&element);
+        document()->frameHost()->chrome().client().enterFullScreenForElement(&element, display_id);
 
         // 7. Optionally, display a message indicating how the user can exit displaying the context object fullscreen.
         return;
@@ -417,7 +422,7 @@
     }
 
     // Otherwise, notify the chrome of the new full screen element.
-    host->chrome().client().enterFullScreenForElement(newTop);
+    host->chrome().client().enterFullScreenForElement(newTop, 0);
 }
 
 bool Fullscreen::fullscreenEnabled(Document& document)
diff --git a/Source/core/html/HTMLVideoElement.cpp b/Source/core/html/HTMLVideoElement.cpp
index e9f2b90..d4abd09 100644
--- a/Source/core/html/HTMLVideoElement.cpp
+++ b/Source/core/html/HTMLVideoElement.cpp
@@ -240,7 +240,7 @@
         return;
     }
 
-    Fullscreen::from(document()).requestFullscreen(*this, Fullscreen::PrefixedRequest);
+    Fullscreen::from(document()).requestFullscreen(*this, Fullscreen::PrefixedRequest, FullscreenOptions());
 }
 
 void HTMLVideoElement::webkitExitFullscreen()
diff --git a/Source/core/html/shadow/MediaControlElements.cpp b/Source/core/html/shadow/MediaControlElements.cpp
index 2973d52..17dce8a 100644
--- a/Source/core/html/shadow/MediaControlElements.cpp
+++ b/Source/core/html/shadow/MediaControlElements.cpp
@@ -523,7 +523,7 @@
         if (mediaElement().isFullscreen())
             fullscreen.exitFullscreen();
         else
-            fullscreen.requestFullscreen(mediaElement(), Fullscreen::InternalVideoRequest);
+            fullscreen.requestFullscreen(mediaElement(), Fullscreen::InternalVideoRequest, FullscreenOptions());
         event->setDefaultHandled();
     }
     HTMLInputElement::defaultEventHandler(event);
diff --git a/Source/core/page/ChromeClient.h b/Source/core/page/ChromeClient.h
index a45c642..830ceb2 100644
--- a/Source/core/page/ChromeClient.h
+++ b/Source/core/page/ChromeClient.h
@@ -183,7 +183,7 @@
     virtual void attachCompositorAnimationTimeline(WebCompositorAnimationTimeline*, LocalFrame* localRoot) { }
     virtual void detachCompositorAnimationTimeline(WebCompositorAnimationTimeline*, LocalFrame* localRoot) { }
 
-    virtual void enterFullScreenForElement(Element*) { }
+    virtual void enterFullScreenForElement(Element*, int) { }
     virtual void exitFullScreenForElement(Element*) { }
 
     virtual void clearCompositedSelection() { }
diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp
index b47a0c6..95b168b 100644
--- a/Source/web/ChromeClientImpl.cpp
+++ b/Source/web/ChromeClientImpl.cpp
@@ -727,9 +727,9 @@
     }
 }
 
-void ChromeClientImpl::enterFullScreenForElement(Element* element)
+void ChromeClientImpl::enterFullScreenForElement(Element* element, int display_id)
 {
-    m_webView->enterFullScreenForElement(element);
+    m_webView->enterFullScreenForElement(element, display_id);
 }
 
 void ChromeClientImpl::exitFullScreenForElement(Element* element)
diff --git a/Source/web/ChromeClientImpl.h b/Source/web/ChromeClientImpl.h
index c021c47..32801ca 100644
--- a/Source/web/ChromeClientImpl.h
+++ b/Source/web/ChromeClientImpl.h
@@ -137,7 +137,7 @@
     virtual void attachCompositorAnimationTimeline(WebCompositorAnimationTimeline*, LocalFrame* localRoot) override;
     virtual void detachCompositorAnimationTimeline(WebCompositorAnimationTimeline*, LocalFrame* localRoot) override;
 
-    virtual void enterFullScreenForElement(Element*) override;
+    virtual void enterFullScreenForElement(Element*, int) override;
     virtual void exitFullScreenForElement(Element*) override;
 
     virtual void clearCompositedSelection() override;
diff --git a/Source/web/FullscreenController.cpp b/Source/web/FullscreenController.cpp
index 3eca065..b672c07 100644
--- a/Source/web/FullscreenController.cpp
+++ b/Source/web/FullscreenController.cpp
@@ -134,7 +134,7 @@
     m_fullScreenFrame.clear();
 }
 
-void FullscreenController::enterFullScreenForElement(Element* element)
+void FullscreenController::enterFullScreenForElement(Element* element, int display_id)
 {
     // We are already transitioning to fullscreen for a different element.
     if (m_provisionalFullScreenElement) {
@@ -152,7 +152,7 @@
     // We need to transition to fullscreen mode.
     WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(element->document().frame());
     if (frame && frame->client()) {
-        frame->client()->enterFullscreen();
+        frame->client()->enterFullscreen(display_id);
         m_provisionalFullScreenElement = element;
     }
 }
diff --git a/Source/web/FullscreenController.h b/Source/web/FullscreenController.h
index 302c289..9cfb486 100644
--- a/Source/web/FullscreenController.h
+++ b/Source/web/FullscreenController.h
@@ -51,7 +51,7 @@
     void didEnterFullScreen();
     void didExitFullScreen();
 
-    void enterFullScreenForElement(Element*);
+    void enterFullScreenForElement(Element*, int);
     void exitFullScreenForElement(Element*);
 
     bool isFullscreen() { return m_fullScreenFrame; }
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 1ffda43..da7d46d 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -2008,9 +2008,9 @@
     view->invalidateRect(damagedRect);
 }
 
-void WebViewImpl::enterFullScreenForElement(Element* element)
+void WebViewImpl::enterFullScreenForElement(Element* element, int display_id)
 {
-    m_fullscreenController->enterFullScreenForElement(element);
+    m_fullscreenController->enterFullScreenForElement(element, display_id);
 }
 
 void WebViewImpl::exitFullScreenForElement(Element* element)
diff --git a/Source/web/WebViewImpl.h b/Source/web/WebViewImpl.h
index 715a5a5..44fe906 100644
--- a/Source/web/WebViewImpl.h
+++ b/Source/web/WebViewImpl.h
@@ -480,7 +480,7 @@
     float fakePageScaleAnimationPageScaleForTesting() const { return m_fakePageScaleAnimationPageScaleFactor; }
     bool fakePageScaleAnimationUseAnchorForTesting() const { return m_fakePageScaleAnimationUseAnchor; }
 
-    void enterFullScreenForElement(Element*);
+    void enterFullScreenForElement(Element*, int);
     void exitFullScreenForElement(Element*);
 
     void clearCompositedSelection();
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp
index 1831bbe..4bee3ae 100644
--- a/Source/web/tests/WebViewTest.cpp
+++ b/Source/web/tests/WebViewTest.cpp
@@ -1200,7 +1200,7 @@
     EXPECT_EQ(20, webViewImpl->pinchViewportOffset().y);
 
     RefPtrWillBeRawPtr<Element> element = static_cast<PassRefPtrWillBeRawPtr<Element>>(webViewImpl->mainFrame()->document().body());
-    webViewImpl->enterFullScreenForElement(element.get());
+    webViewImpl->enterFullScreenForElement(element.get(), 0);
     webViewImpl->didEnterFullScreen();
 
     // Page scale factor must be 1.0 during fullscreen for elements to be sized
@@ -1209,7 +1209,7 @@
 
     // Make sure fullscreen nesting doesn't disrupt scroll/scale saving.
     RefPtrWillBeRawPtr<Element> otherElement = static_cast<PassRefPtrWillBeRawPtr<Element>>(webViewImpl->mainFrame()->document().head());
-    webViewImpl->enterFullScreenForElement(otherElement.get());
+    webViewImpl->enterFullScreenForElement(otherElement.get(), 0);
 
     // Confirm that exiting fullscreen restores the parameters.
     webViewImpl->didExitFullScreen();
diff --git a/public/web/WebFrameClient.h b/public/web/WebFrameClient.h
index 80281d3..b1201d9 100644
--- a/public/web/WebFrameClient.h
+++ b/public/web/WebFrameClient.h
@@ -623,7 +623,7 @@
     // WebWidget::{will,Did}ExitFullScreen should bound resizing the WebWidget
     // out of fullscreen mode.
     // Note: the return value is ignored.
-    virtual bool enterFullscreen() { return false; }
+    virtual bool enterFullscreen(int display_id) { return false; }
     virtual bool exitFullscreen() { return false; }