Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(503)

Side by Side Diff: content/test/data/fullscreen_frame.html

Issue 1914643005: Add support for entering/exiting HTML fullscreen from OOPIFs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5
6 var expectedWidth, expectedHeight;
7
8 function onResize() {
9 if (window.innerWidth == expectedWidth && window.innerHeight == expectedHeight ) {
10 domAutomationController.setAutomationId(0);
11 domAutomationController.send("resize");
12 removeResizeListener();
13 }
14 }
15
16 function addResizeListener(width, height) {
17 expectedWidth = width;
18 expectedHeight = height;
19 window.addEventListener('resize', onResize);
20 }
21
22 function removeResizeListener() {
23 window.removeEventListener('resize', onResize);
24 }
25
26 function activateFullscreen() {
27 document.getElementById("fullscreen-div").webkitRequestFullscreen();
28 }
29
30 function exitFullscreen() {
31 document.webkitExitFullscreen();
32 }
33
34 </script>
35 </head>
36 <body>
37
38 <div>This page contains a div that will go fullscreen</div>
39
40 <div id="fullscreen-div" style="border: 1px solid black;">
41 This div will go fullscreen
42 </div>
43
44 <iframe id="child-0" srcdoc="This should not go fullscreen"></iframe>
45
46 </body>
47 </html>
48
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698