Last Comment Bug 740192 - Screen orientation needs a specific security model for installed web apps
: Screen orientation needs a specific security model for installed web apps
Status: RESOLVED FIXED
: dev-doc-needed
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla15
Assigned To: Mounir Lamouri (:mounir)
:
Mentors:
Depends on: 725397 753978 766902
Blocks: 673922
  Show dependency treegraph
 
Reported: 2012-03-28 16:04 PDT by Mounir Lamouri (:mounir)
Modified: 2012-06-21 03:24 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (1.43 KB, patch)
2012-05-10 12:47 PDT, Mounir Lamouri (:mounir)
justin.lebar+bug: review+
Details | Diff | Review

Description Mounir Lamouri (:mounir) 2012-03-28 16:04:31 PDT
Right now we can't know if a web app is installed or not from C++ (bug 725397) but as soon as we can, we should allow them to change the orientation as they want (ie. no need to be fullscreen).
Also, we might have to handle a default orientation value. Right now, we always revert to Firefox Mobile default orientation when ORIENTATION_NONE is used but we will have to use the app default orientation instead.
Comment 1 Mounir Lamouri (:mounir) 2012-05-10 12:47:31 PDT
Created attachment 622859 [details] [diff] [review]
Patch v1
Comment 2 Justin Lebar (not reading bugmail) 2012-05-10 14:35:37 PDT
Comment on attachment 622859 [details] [diff] [review]
Patch v1

Review of attachment 622859 [details] [diff] [review]:
-----------------------------------------------------------------

>-    bool fullscreen;
>-    doc->GetMozFullScreen(&fullscreen);
>-    if (!fullscreen) {
>-      *aReturn = false;
>-      return NS_OK;
>+    // Non-app need to be fullscreen.
>+    if (!static_cast<nsGlobalWindow*>(GetOwner())->IsPartOfApp()) {
>+      bool fullscreen;
>+      doc->GetMozFullScreen(&fullscreen);
>+      if (!fullscreen) {
>+        *aReturn = false;
>+        return NS_OK;
>+      }
>     }

Make the comment positive, please:

 Apps and frames contained in apps can lock orientation.  But non-apps can lock orientation only if they're fullscreen.
Comment 3 Mounir Lamouri (:mounir) 2012-05-10 17:58:17 PDT
http://hg.mozilla.org/mozilla-central/rev/c3b5e70e85e7

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