Support orientation property in manfiest for packaged apps

RESOLVED FIXED in Firefox 25

Status

()

Firefox for Android
Web Apps
P1
normal
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: jsmith, Assigned: wesj)

Tracking

(Blocks: 1 bug, {regression, reproducible})

Trunk
Firefox 25
ARM
Android
regression, reproducible
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox23 affected, firefox24 affected)

Details

(Whiteboard: [A4A][games:p1])

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
At some point, orientation lock was working for web apps, but it definitely isn't working now. 

Critical to fix given that we've got apps (including packaged apps) that will only run in landscape orientation.

Example of a good app to test this with is "Packaged App Test Case 20" on http://mozqa.com/webapi-permissions-tests/ - which happens to be Poppit.
(Reporter)

Updated

5 years ago
Priority: -- → P1
Whiteboard: [A4A]
(Reporter)

Updated

5 years ago
Keywords: regression
(Reporter)

Updated

5 years ago
Whiteboard: [A4A] → [A4A][games:p?]
(Reporter)

Comment 2

5 years ago
Created attachment 743162 [details]
Poppit Broken

Example screenshot of what happens when we don't care about orientation lock.
Wes worked on this previously
Assignee: nobody → wjohnston

Updated

5 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 4

5 years ago
Likely fixed by bug 856131.
Depends on: 856131
Fixed via 856131; but there's a really awful bug still where content doesn't stretch to the device width http://cl.ly/image/0i1S0c1j0S0E
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
status-firefox23: --- → verified
Resolution: --- → FIXED

Updated

5 years ago
Status: RESOLVED → VERIFIED
(Reporter)

Comment 6

5 years ago
This isn't fixed for me on a Galaxy Nexus on a 5/11 Nightly build. Reopening.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
(Reporter)

Updated

5 years ago
status-firefox23: verified → affected
Wes, Aaron, any ideas why Jason isn't seeing this fixed in Nightly?
Whiteboard: [A4A][games:p?] → [A4A][games:p1]
Nope. I see this too.
status-firefox24: --- → affected
Keywords: reproducible
(Assignee)

Comment 9

5 years ago
Packaged app 20's manifest is http://mozqa.com/webapi-permissions-tests/poppit.manifest I think? It doesn't include an orientation lock line. What are they using?
(Reporter)

Comment 10

5 years ago
(In reply to Wesley Johnston (:wesj) from comment #9)
> Packaged app 20's manifest is
> http://mozqa.com/webapi-permissions-tests/poppit.manifest I think? It
> doesn't include an orientation lock line. What are they using?

That's the mini-manifest, which won't include orientation lock in it. You need to look at the webapp manifest in the root of the zip archive. You'll see the following:

{
    "name": "Poppit!™",
	"version": "1.0.1",
    "description": "The prickly puzzle game where popping balloons has never been so much fun! Pop colorful strings of balloons to earn a bonus!",
    "launch_path": "/index.html",
    "icons": {
        "30": "/img/freeballoon-30.png",
        "60": "/img/freeballoon-60.png",
		"128": "/img/Poppitlogo.png"
    },
    "developer": {
        "name":"Electronic Arts",
        "url":"http://www.ea.com"
    },
    "default_locale": "en",
    "fullscreen": "true",
    "orientation": ["landscape"]
}
(Assignee)

Comment 11

5 years ago
Ahh, well then this has always been broken for packaged apps. Lets rename this bug to something more descriptive.
Summary: Orientation lock is broken in FxAndroid Web Apps → Support orientation property in manfiest for packaged apps
(Assignee)

Comment 12

5 years ago
Created attachment 757605 [details] [diff] [review]
Patch

Wanted to get james used to reviewing as well (and maybe this is some code you haven't looked at before). There were some layers of problems here (and I cleaned up a little on the way too).

1.) We were saving this info using the wrong manifest for packaged apps
2.) We weren't updating the correct webapp index during install, so we would up writing prefs into a different profile than the one we launched with
3.) orientations is really an array of possible values.

I also cleaned up an error that would scroll by setting the origin for "app" protocol apps in java (used only to determine if we should show a titlebar or not), and renamed uniqueURI to origin to make the code a little clearer to me as to what it was doing.
Attachment #757605 - Flags: review?(mark.finkle)
Attachment #757605 - Flags: review?(jhugman)
(Assignee)

Comment 13

5 years ago
Pinging james and mfinkle?
Flags: needinfo?(mark.finkle)
Flags: needinfo?(jhugman)
(Assignee)

Updated

5 years ago
Blocks: 887254
Comment on attachment 757605 [details] [diff] [review]
Patch

The whole "origin" and "originalOrigin" is a bit confusing, but the one single comment in browser.js helps explain it. You might want to add some comments in postInstallWebApp as to why "originalOrigin" even exists.
Attachment #757605 - Flags: review?(mark.finkle) → review+
Flags: needinfo?(mark.finkle)
https://hg.mozilla.org/mozilla-central/rev/7a905d1c9b37
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25

Updated

5 years ago
Blocks: 710398
Removing out of date flags.
Flags: needinfo?(jhugman)
Attachment #757605 - Flags: review?(jhugman)
You need to log in before you can comment on or make changes to this bug.