Fullscreen API implementation
This PR implements the Fullscreen API.
The final commit also adds some Qt UI (an "exit fullscreen" button that animates from the top down, sort of like how Chrome does it, and also Firefox). For Qt-backends, the escape key also exits out of fullscreen, fully.
The spec can be found here.
New web platform test results (fullscreen/api) with this patch series applied:
Ran 57 tests finished in 13.7 seconds.
• 36 ran as expected. 0 tests skipped.
• 1 tests had errors unexpectedly
• 1 tests timed out unexpectedly
• 21 tests had unexpected subtest results
(up from 0 expected to 36. Another test succeeds when #4329 is applied)
Additional work that needs to happen:
- https://fullscreen.spec.whatwg.org/#dom-document-fullscreenenabled needs to be implemented fully, where a document's "allowed to use" can be deterimined by the
allowFullscreenattribute set on an iframe. This attribute can not be changed dynamically and once set for a document, is set for the rest of it's life time.
Additional work that's required can be determined by the WPT suite.
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.
First comment before review: Make sure your commit messages follow the guidelines. e.g. Imperative verbs, not past tense. Do the thing not Did the thing
The missing visit on document::m_fullscreen_element needs fixed: https://github.com/LadybirdBrowser/ladybird/actions/runs/14411993971/job/40447984611?pr=4330#step:11:1711
Make sure your IDE doesn't add "" includes. Files that #include a missing local file: Libraries/LibWeb/CSS/SelectorEngine.cpp Libraries/LibWeb/DOM/Element.cpp UI/Qt/BrowserWindow.cpp
And be sure to use the same version of clang-format as CI.
You should invest in pre-commit https://github.com/LadybirdBrowser/ladybird/blob/master/CONTRIBUTING.md#commit-hooks
The missing visit on document::m_fullscreen_element needs fixed: https://github.com/LadybirdBrowser/ladybird/actions/runs/14411993971/job/40447984611?pr=4330#step:11:1711
Make sure your IDE doesn't add
""includes.Files that #include a missing local file: Libraries/LibWeb/CSS/SelectorEngine.cpp Libraries/LibWeb/DOM/Element.cpp UI/Qt/BrowserWindow.cppAnd be sure to use the same version of clang-format as CI.
You should invest in
pre-commithttps://github.com/LadybirdBrowser/ladybird/blob/master/CONTRIBUTING.md#commit-hooks
Thanks! i'll do that, I thought I had snuffed out all the style issues, but clearly I did not.
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.
@theIDinside looks like the linter check is failing in idl file, it's likely an indentation issue. It should be:
enum FullscreenNavigationUI {
"auto",
"show",
"hide"
};
dictionary FullscreenOptions {
FullscreenNavigationUI navigationUI = "auto";
};
4 spaces indent. Maybe in other places too
@theIDinside looks like the linter check is failing in idl file, it's likely an indentation issue. It should be:
enum FullscreenNavigationUI { "auto", "show", "hide" }; dictionary FullscreenOptions { FullscreenNavigationUI navigationUI = "auto"; };4 spaces indent. Maybe in other places too
Fixed it. Rebased on most current master.
Fixed most of your nits & issues @ADKaster. Rebased onto master. Also changed the last commit message (one pertaining to Qt) - which can be viewed as an entirely preliminary commit and one that can be taken off completely. Now that I've added the "hit the escape key" separately, and added that logic as a new commit, this should just work for any backend going forward (obviously, the displayed UI stuff like "here's an exit button" would have to be implemented though).
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.
These new round of changes to address nits and other things, I also threw in the implementation for ShadowRoot, which means that our wpt test score for fullscreen/api for this PR gets a small bump to 43 when ran locally.
Fixed a bug in the element ready check steps, where it should check that it's an <svg> element not just "any ol' svg element-kind".
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.
Just updating with a comment. Maybe @awesomekling can take a quick look? Would be greatly appreciated.
Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!
This pull request has been closed because it has not had recent activity. Feel free to open a new pull request if you wish to still contribute these changes. Thank you for your contributions!