Last Comment Bug 740188 - Screen Orientation API: implement locking
: Screen Orientation API: implement locking
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla14
Assigned To: Mounir Lamouri (:mounir)
:
Mentors:
Depends on: 740190 743217 747442 764753 766903
Blocks: 673922
  Show dependency treegraph
 
Reported: 2012-03-28 15:58 PDT by Mounir Lamouri (:mounir)
Modified: 2013-08-15 13:52 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Part 1 - HAL/DOM boilerplate (10.73 KB, patch)
2012-03-28 15:58 PDT, Mounir Lamouri (:mounir)
bugs: review-
Details | Diff | Review
Part 2 - Basic security model (4.74 KB, patch)
2012-03-28 15:59 PDT, Mounir Lamouri (:mounir)
bugs: review-
Details | Diff | Review
Part 3 - Revert orientation when fullscreen is left (2.73 KB, patch)
2012-03-28 15:59 PDT, Mounir Lamouri (:mounir)
bugs: review-
Details | Diff | Review
Part 1 - HAL/DOM boilerplate (11.34 KB, patch)
2012-03-28 21:07 PDT, Mounir Lamouri (:mounir)
bugs: review+
jonas: superreview+
Details | Diff | Review
Part 2 - Basic security model (3.59 KB, patch)
2012-03-28 21:08 PDT, Mounir Lamouri (:mounir)
bugs: review+
Details | Diff | Review
Part 3 - Revert orientation when fullscreen is left (2.81 KB, patch)
2012-03-28 21:08 PDT, Mounir Lamouri (:mounir)
bugs: review+
Details | Diff | Review

Description Mounir Lamouri (:mounir) 2012-03-28 15:58:19 PDT
Created attachment 610332 [details] [diff] [review]
Part 1 - HAL/DOM boilerplate

Basically, we want to add a lockOrientation(DOMString orientation) method to window.screen.
Comment 1 Mounir Lamouri (:mounir) 2012-03-28 15:59:16 PDT
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.
Comment 2 Mounir Lamouri (:mounir) 2012-03-28 15:59:43 PDT
Created attachment 610337 [details] [diff] [review]
Part 3 - Revert orientation when fullscreen is left
Comment 3 Olli Pettay [:smaug] 2012-03-28 17:58:47 PDT
Comment on attachment 610336 [details] [diff] [review]
Part 2 - Basic security model

Use GetOwner(), no mOwner
Comment 4 Olli Pettay [:smaug] 2012-03-28 18:11:58 PDT
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.
Comment 5 Mounir Lamouri (:mounir) 2012-03-28 21:07:32 PDT
Created attachment 610415 [details] [diff] [review]
Part 1 - HAL/DOM boilerplate
Comment 6 Mounir Lamouri (:mounir) 2012-03-28 21:08:04 PDT
Created attachment 610416 [details] [diff] [review]
Part 2 - Basic security model
Comment 7 Mounir Lamouri (:mounir) 2012-03-28 21:08:31 PDT
Created attachment 610418 [details] [diff] [review]
Part 3 - Revert orientation when fullscreen is left
Comment 8 Olli Pettay [:smaug] 2012-03-29 08:53:54 PDT
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 9 Olli Pettay [:smaug] 2012-03-29 08:57:47 PDT
Comment on attachment 610418 [details] [diff] [review]
Part 3 - Revert orientation when fullscreen is left


>+  private:
>+    nsIDOMEventTarget* mTarget;

Just use event->GetCurrentTarget();
Comment 11 Jean-Yves Perrier [:teoli] 2013-08-15 13:52:43 PDT
This has been documented, some time ago ;-)

Note You need to log in before you can comment on or make changes to this bug.