Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial implementation of the unprefixed fullscreen API
https://bugs.webkit.org/show_bug.cgi?id=246103 Reviewed by Tim Nguyen. Add initial implementation of the unprefixed fullscreen API: - https://fullscreen.spec.whatwg.org/#api The feature is behind an experimental feature flag, off by default. This is needed to unblock the WPT testing of the screen orientation API since screen orientation locking requires being in fullscreen. * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/html/capability-delegation/delegate-fullscreen-request-popup-same-origin.https.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/capability-delegation/delegate-fullscreen-request-subframe-same-origin.https.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/screen-orientation/active-lock-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/screen-orientation/event-before-promise-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/screen-orientation/lock-basic-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/screen-orientation/lock-sandboxed-iframe-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/screen-orientation/lock-unlock-check-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/screen-orientation/onchange-event-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/screen-orientation/onchange-event-subframe-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/screen-orientation/orientation-reading-expected.txt: * Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml: * Source/WebCore/dom/Element+Fullscreen.idl: * Source/WebCore/dom/Element.cpp: (WebCore::Element::requestFullscreen): * Source/WebCore/dom/Element.h: * Source/WebCore/dom/EventNames.h: * Source/WebCore/dom/FullscreenManager.cpp: (WebCore::FullscreenManager::dispatchFullscreenChangeEvents): * Source/WebCore/html/HTMLAttributeNames.in: Canonical link: https://commits.webkit.org/255317@main
- Loading branch information
Showing
77 changed files
with
645 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...mported/w3c/web-platform-tests/feature-policy/reporting/fullscreen-reporting-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
|
||
FAIL Fullscreen Report Format document.getElementById('fs').requestFullscreen is not a function. (In 'document.getElementById('fs').requestFullscreen()', 'document.getElementById('fs').requestFullscreen' is undefined) | ||
Harness Error (TIMEOUT), message = null | ||
|
||
TIMEOUT Fullscreen Report Format Test timed out | ||
|
2 changes: 1 addition & 1 deletion
2
...c/web-platform-tests/fullscreen/api/document-exit-fullscreen-active-document-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL Document#exitFullscreen() when the document is not the active document documentBeforeNav.exitFullscreen is not a function. (In 'documentBeforeNav.exitFullscreen()', 'documentBeforeNav.exitFullscreen' is undefined) | ||
PASS Document#exitFullscreen() when the document is not the active document | ||
|
12 changes: 9 additions & 3 deletions
12
...web-platform-tests/fullscreen/api/document-exit-fullscreen-nested-shadow-dom-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: outer.requestFullscreen is not a function. (In 'outer.requestFullscreen()', 'outer.requestFullscreen' is undefined) | ||
CONSOLE MESSAGE: Unhandled Promise Rejection: Error: assert_equals: expected Element node <div id="outer"> | ||
<slot></slot> | ||
</div> but got null | ||
fullscreen | ||
|
||
Harness Error (FAIL), message = Unhandled rejection: outer.requestFullscreen is not a function. (In 'outer.requestFullscreen()', 'outer.requestFullscreen' is undefined) | ||
Harness Error (FAIL), message = Unhandled rejection: assert_equals: expected Element node <div id="outer"> | ||
<slot></slot> | ||
</div> but got null | ||
|
||
TIMEOUT Exiting fullscreen from a nested shadow root works correctly. Test timed out | ||
|
||
Harness Error (FAIL), message = Unhandled rejection: outer.requestFullscreen is not a function. (In 'outer.requestFullscreen()', 'outer.requestFullscreen' is undefined) | ||
Harness Error (FAIL), message = Unhandled rejection: assert_equals: expected Element node <div id="outer"> | ||
<slot></slot> | ||
</div> but got null | ||
|
||
TIMEOUT Exiting fullscreen from a nested shadow root works correctly. Test timed out | ||
|
2 changes: 1 addition & 1 deletion
2
...eb-platform-tests/fullscreen/api/document-fullscreen-enabled-active-document-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL Document#fullscreenEnabled when the document is not the active document assert_false: expected false got undefined | ||
PASS Document#fullscreenEnabled when the document is not the active document | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/imported/w3c/web-platform-tests/fullscreen/api/document-fullscreen-enabled-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL Document#fullscreenEnabled assert_true: top-level document expected true got undefined | ||
PASS Document#fullscreenEnabled | ||
|
2 changes: 1 addition & 1 deletion
2
...ts/imported/w3c/web-platform-tests/fullscreen/api/document-onfullscreenerror-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL Document#onfullscreenerror assert_equals: initial onfullscreenerror expected (object) null but got (undefined) undefined | ||
PASS Document#onfullscreenerror | ||
|
2 changes: 1 addition & 1 deletion
2
...web-platform-tests/fullscreen/api/element-request-fullscreen-active-document-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL Element#requestFullscreen() when the document is not the active document documentBeforeNav.documentElement.requestFullscreen is not a function. (In 'documentBeforeNav.documentElement.requestFullscreen()', 'documentBeforeNav.documentElement.requestFullscreen' is undefined) | ||
PASS Element#requestFullscreen() when the document is not the active document | ||
|
9 changes: 1 addition & 8 deletions
9
...rted/w3c/web-platform-tests/fullscreen/api/element-request-fullscreen-dialog-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: dialog.requestFullscreen is not a function. (In 'dialog.requestFullscreen()', 'dialog.requestFullscreen' is undefined) | ||
|
||
Harness Error (FAIL), message = Unhandled rejection: dialog.requestFullscreen is not a function. (In 'dialog.requestFullscreen()', 'dialog.requestFullscreen' is undefined) | ||
|
||
TIMEOUT Element#requestFullscreen() for dialog element Test timed out | ||
|
||
Harness Error (FAIL), message = Unhandled rejection: dialog.requestFullscreen is not a function. (In 'dialog.requestFullscreen()', 'dialog.requestFullscreen' is undefined) | ||
|
||
TIMEOUT Element#requestFullscreen() for dialog element Test timed out | ||
FAIL Element#requestFullscreen() for dialog element assert_unreached: fullscreenchange event Reached unreachable code | ||
|
4 changes: 1 addition & 3 deletions
4
...ts/imported/w3c/web-platform-tests/fullscreen/api/element-request-fullscreen-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
Harness Error (FAIL), message = Test named 'Element#requestFullscreen()' specified 1 'cleanup' function, and 1 failed. | ||
|
||
FAIL Element#requestFullscreen() assert_unreached: TypeError: div.requestFullscreen is not a function. (In 'div.requestFullscreen()', 'div.requestFullscreen' is undefined) Reached unreachable code | ||
PASS Element#requestFullscreen() | ||
|
2 changes: 1 addition & 1 deletion
2
...w3c/web-platform-tests/fullscreen/api/element-request-fullscreen-not-allowed-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL Element#requestFullscreen() when not allowed to request fullscreen div.requestFullscreen is not a function. (In 'div.requestFullscreen()', 'div.requestFullscreen' is undefined) | ||
PASS Element#requestFullscreen() when not allowed to request fullscreen | ||
|
4 changes: 1 addition & 3 deletions
4
...ted/w3c/web-platform-tests/fullscreen/api/element-request-fullscreen-options-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
FAIL Element#requestFullscreen({ navigationUI }) support document.body.requestFullscreen is not a function. (In 'document.body.requestFullscreen({ | ||
get navigationUI() { invoked = true; return "irrelevant-value"; } | ||
})', 'document.body.requestFullscreen' is undefined) | ||
PASS Element#requestFullscreen({ navigationUI }) support | ||
|
4 changes: 2 additions & 2 deletions
4
LayoutTests/imported/w3c/web-platform-tests/fullscreen/api/promises-reject-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL Promises#reject e.requestFullscreen is not a function. (In 'e.requestFullscreen()', 'e.requestFullscreen' is undefined) | ||
FAIL Promises#reject 1 document.exitFullscreen is not a function. (In 'document.exitFullscreen()', 'document.exitFullscreen' is undefined) | ||
PASS Promises#reject | ||
PASS Promises#reject 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rted/w3c/web-platform-tests/fullscreen/rendering/fullscreen-css-invalidation-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Should be green | ||
|
||
FAIL Invalidate :fullscreen based style document.documentElement.requestFullscreen is not a function. (In 'document.documentElement.requestFullscreen()', 'document.documentElement.requestFullscreen' is undefined) | ||
FAIL Invalidate :fullscreen based style assert_equals: Green when :root is fullscreened. expected "rgb(0, 128, 0)" but got "rgb(255, 0, 0)" | ||
|
2 changes: 1 addition & 1 deletion
2
...ported/w3c/web-platform-tests/fullscreen/rendering/fullscreen-css-transition-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Should be green | ||
|
||
FAIL Transitions should not be stopped by going fullscreen trans.requestFullscreen is not a function. (In 'trans.requestFullscreen()', 'trans.requestFullscreen' is undefined) | ||
PASS Transitions should not be stopped by going fullscreen | ||
|
9 changes: 3 additions & 6 deletions
9
...ity-delegation/delegate-fullscreen-request-popup-same-origin.https.tentative-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
CONSOLE MESSAGE: TypeError: document.body.requestFullscreen is not a function. (In 'document.body.requestFullscreen()', 'document.body.requestFullscreen' is undefined) | ||
Verifies that element.requestFullscreen() calls from a same-origin popup without user activation work if and only if the opener has user activation and it delegates the capability. https://wicg.github.io/capability-delegation/spec.html | ||
|
||
Harness Error (TIMEOUT), message = null | ||
|
||
TIMEOUT Fullscreen requests from a same-origin popup fails without delegation from an opener with no user activation Test timed out | ||
NOTRUN Fullscreen requests from a same-origin popup fails without delegation from an opener with user activation | ||
NOTRUN Fullscreen requests from a same-origin popup succeeds with delegation from an opener with user activation | ||
PASS Fullscreen requests from a same-origin popup fails without delegation from an opener with no user activation | ||
PASS Fullscreen requests from a same-origin popup fails without delegation from an opener with user activation | ||
FAIL Fullscreen requests from a same-origin popup succeeds with delegation from an opener with user activation assert_equals: expected "success" but got "failure" | ||
|
10 changes: 4 additions & 6 deletions
10
...-delegation/delegate-fullscreen-request-subframe-same-origin.https.tentative-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
CONSOLE MESSAGE: TypeError: document.body.requestFullscreen is not a function. (In 'document.body.requestFullscreen()', 'document.body.requestFullscreen' is undefined) | ||
CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: Type error | ||
Verifies that element.requestFullscreen() calls from a same-origin subframe without user activation work if and only if the top frame has user activation, regardless of whether it delegates the capability or not. https://wicg.github.io/capability-delegation/spec.html See wpt/html/user-activation/propagation*.html for frame tree user activation visibility tests. | ||
|
||
|
||
Harness Error (TIMEOUT), message = null | ||
|
||
TIMEOUT Fullscreen requests from a same-origin subframe fails without delegation from an opener with no user activation Test timed out | ||
NOTRUN Fullscreen requests from a same-origin subframe succeeds without delegation from an opener with user activation | ||
NOTRUN Fullscreen requests from a same-origin subframe succeeds with delegation from an opener with user activation | ||
PASS Fullscreen requests from a same-origin subframe fails without delegation from an opener with no user activation | ||
PASS Fullscreen requests from a same-origin subframe succeeds without delegation from an opener with user activation | ||
PASS Fullscreen requests from a same-origin subframe succeeds with delegation from an opener with user activation | ||
|
3 changes: 2 additions & 1 deletion
3
...atform-tests/html/semantics/embedded-content/the-iframe-element/iframe-allow-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
CONSOLE MESSAGE: Feature policy 'Fullscreen' check failed for iframe with origin 'null' and allow attribute ''. | ||
|
||
FAIL iframe-cross-origin-allow assert_false: Document inside cross-origin iframe without allow attribute should not have feature enabled expected false got undefined | ||
FAIL iframe-cross-origin-allow assert_false: Feature should be denied when correct allow attribute is added, before reload expected false got true | ||
|
9 changes: 5 additions & 4 deletions
9
...ts/html/semantics/embedded-content/the-iframe-element/iframe-allowfullscreen-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
CONSOLE MESSAGE: Feature policy 'Fullscreen' check failed for iframe with origin 'null' and allow attribute ''. | ||
|
||
FAIL iframe-same-origin-allowfullscreen assert_true: Top level document has fullscreen enabled flag set expected true got undefined | ||
FAIL iframe-cross-origin-allowfullscreen assert_false: Document inside cross-origin iframe without allowfullscreen attribute should not have fullscreen enabled flag set expected false got undefined | ||
FAIL iframe-noload-noallowfullscreen assert_true: Fullscreen should still be enabled in same-origin document without allowfullscreen attribute expected true got undefined | ||
FAIL iframe-noload-allowfullscreen assert_true: Fullscreen should be enabled with allowfullscreen attribute expected true got undefined | ||
PASS iframe-same-origin-allowfullscreen | ||
FAIL iframe-cross-origin-allowfullscreen assert_false: Fullscreen should be denied when allowfullscreen attribute is added, before reload expected false got true | ||
PASS iframe-noload-noallowfullscreen | ||
PASS iframe-noload-allowfullscreen | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.