Closed Bug 1087469 Opened 10 years ago Closed 10 years ago

Add support for a "start_url" property in app manifests

Categories

(Core Graveyard :: DOM: Apps, defect)

defect
Not set
normal

Tracking

(firefox39 fixed)

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: benfrancis, Assigned: benfrancis)

References

Details

(Keywords: feature)

Attachments

(1 file, 2 obsolete files)

The proposed W3C spec for web app manifests specifies a "start_url" property [1] which is very similar to our existing "launch_path" property. A "start_url" can be an absolute URL, but is resolved against the manifest URL so in the end is the same thing. Fabrice has suggested [2] that in the short term we might just internally translate start_url into launch_path, but in the long term we want to move towards the W3C spec. 1. http://w3c.github.io/manifest/#start_url-member 2. https://bugzilla.mozilla.org/show_bug.cgi?id=1075704#c4
I chatted with Alive and it turns out that Gaia gets the current launch_path URL from the event.detail.url property inside the webapps-launch event from Gecko. It seems the simplest way to add support for the start_url property for installed apps in Firefox OS would be to parse it in Gecko and pass it along with this event.
Hi Fabrice, what needs modifying in Gecko to support start_url as well as launch_path as a URL to register in the app registry at install time and pass along to Gaia via the webapps-launch event?
Flags: needinfo?(fabrice)
Flags: needinfo?(fabrice)
Assignee: nobody → bfrancis
Attached patch WIP Patch (obsolete) — Splinter Review
Fabrice, is this what you meant? Can you advise on what tests would be required?
Attachment #8566811 - Flags: feedback?(fabrice)
Comment on attachment 8566811 [details] [diff] [review] WIP Patch Review of attachment 8566811 [details] [diff] [review]: ----------------------------------------------------------------- For the testing part, an xpchsell like https://mxr.mozilla.org/mozilla-central/source/dom/apps/tests/unit/test_manifestSanitizer.js will be good for this purpose.
Attachment #8566811 - Flags: feedback?(fabrice) → feedback+
Attached patch Patch (obsolete) — Splinter Review
How does this look?
Attachment #8566811 - Attachment is obsolete: true
Attachment #8577219 - Flags: review?(fabrice)
Comment on attachment 8577219 [details] [diff] [review] Patch Review of attachment 8577219 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/apps/tests/unit/test_manifestHelper.js @@ +5,5 @@ > + let manifest = { > + start_url: "start.html", > + launch_path: "other.html" > + }; > + nit: trailing whitespace @@ +9,5 @@ > + > + var helper = new ManifestHelper(manifest, "http://foo.com", > + "http://foo.com/manifest.json"); > + var path = helper.fullLaunchPath(); > + do_check_true(path == "http://foo.com/start.html"); We need to test that without start_url we still resolve properly launch_path against the manifest url. So I would start with only launch_path in the manifest, and then add start_url.
Attachment #8577219 - Flags: review?(fabrice)
Attached patch PatchSplinter Review
Thanks for the review Fabrice, is this better?
Attachment #8577219 - Attachment is obsolete: true
Attachment #8578840 - Flags: review?(fabrice)
Attachment #8578840 - Flags: review?(fabrice) → review+
Thanks :)
Keywords: checkin-needed
Try link? :)
Keywords: checkin-needed
Note: I have a local version with the right commit info, I'll push it if try is green.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Ben, can you suggest a release note? Do you think this warrants one? Thanks.
Flags: needinfo?(bfrancis)
start_url is currently just a synonym of launch_path and isn't interesting in its own right, only as part of broader support for the W3C manifest format as a whole, which didn't make 2.2 and as far as I know may never be released. So no, I don't think it warrants a release note :)
Flags: needinfo?(bfrancis)
See Also: → 1321923
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: