servoshell: add fullscreen option
These changes add a cli option to start servo in fullscreen mode. As requested in #30599. It is currently in draft form as we need to have further discussions to determine whether we truly need it.
servo --fullscreen
No tests for now.
🔨 Triggering try run (#6846095678) with platforms=windows and layout=none
✨ Try run (#6846095678) succeeded.
Appreciate your advice. I call set_fullscreen on our headed Window before returning it.
It works as expected when launching.
When I refresh page, the web content seems not displayed in fullscreen mode.
And I can't exit fullscreen mode or servo by Esc.
The Esc problem is because fullscreen is a whatwg web api. It will do nothing if there is no fullscreen element in the document. So I change the code to always Send EmbedderMsg first.
The web content not in fullscreen problem is solved by call .with_maximized on the window builder. I have no idea why. Am I missing something?