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)
Core Graveyard
DOM: Apps
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)
2.01 KB,
patch
|
fabrice
:
review+
|
Details | Diff | Splinter Review |
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
Assignee | ||
Comment 1•10 years ago
|
||
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.
Assignee | ||
Comment 3•10 years ago
|
||
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)
Comment 4•10 years ago
|
||
I think adding support to https://mxr.mozilla.org/mozilla-central/source/dom/apps/AppsUtils.jsm#901 should do the trick.
Flags: needinfo?(fabrice)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → bfrancis
Assignee | ||
Comment 5•10 years ago
|
||
Fabrice, is this what you meant?
Can you advise on what tests would be required?
Attachment #8566811 -
Flags: feedback?(fabrice)
Comment 6•10 years ago
|
||
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+
Assignee | ||
Comment 7•10 years ago
|
||
How does this look?
Attachment #8566811 -
Attachment is obsolete: true
Attachment #8577219 -
Flags: review?(fabrice)
Comment 8•10 years ago
|
||
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)
Assignee | ||
Comment 9•10 years ago
|
||
Thanks for the review Fabrice, is this better?
Attachment #8577219 -
Attachment is obsolete: true
Attachment #8578840 -
Flags: review?(fabrice)
Updated•10 years ago
|
Attachment #8578840 -
Flags: review?(fabrice) → review+
Comment 12•10 years ago
|
||
Comment 13•10 years ago
|
||
Note: I have a local version with the right commit info, I'll push it if try is green.
Comment 14•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Comment 16•10 years ago
|
||
Ben, can you suggest a release note? Do you think this warrants one? Thanks.
Flags: needinfo?(bfrancis)
Assignee | ||
Comment 17•10 years ago
|
||
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)
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•