Created attachment 610332 [details] [diff] [review] Part 1 - HAL/DOM boilerplate Basically, we want to add a lockOrientation(DOMString orientation) method to window.screen.
Created attachment 610336 [details] [diff] [review] Part 2 - Basic security model Basically, regular content will have to be fullscreen and chrome can do whatever they want.
Created attachment 610337 [details] [diff] [review] Part 3 - Revert orientation when fullscreen is left
Comment on attachment 610336 [details] [diff] [review] Part 2 - Basic security model Use GetOwner(), no mOwner
Comment on attachment 610337 [details] [diff] [review] Part 3 - Revert orientation when fullscreen is left Please no raw pointers which you don't clear ever.
Created attachment 610415 [details] [diff] [review] Part 1 - HAL/DOM boilerplate
Created attachment 610416 [details] [diff] [review] Part 2 - Basic security model
Created attachment 610418 [details] [diff] [review] Part 3 - Revert orientation when fullscreen is left
Comment on attachment 610416 [details] [diff] [review] Part 2 - Basic security model >-nsScreen::Create(nsPIDOMWindow* aWindow) >+nsScreen::Create(nsGlobalWindow* aWindow) Is there now any need for this change? > { >+ if (!aWindow) { >+ return nsnull; >+ } MOZ_ASSERT that aWindow is not null >+ nsCOMPtr<nsIDOMWindow> window = do_QueryInterface(GetOwner()); GetOwner returns nsPIDOMWindow which is-a nsIDOMWindow, so there shouldn't be need for this QI ; > } > >+ > NS_IMETHODIMP Extra newline before NS_IMETHODIMP
Comment on attachment 610418 [details] [diff] [review] Part 3 - Revert orientation when fullscreen is left >+ private: >+ nsIDOMEventTarget* mTarget; Just use event->GetCurrentTarget();
https://hg.mozilla.org/mozilla-central/rev/a1ba687fd66a https://hg.mozilla.org/mozilla-central/rev/d8aa32fa5531 https://hg.mozilla.org/mozilla-central/rev/13bf530d772d
This has been documented, some time ago ;-)