-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API/StorageManager: add compat data #2272
Conversation
Sources: 1. MDN article: https://developer.mozilla.org/en-US/docs/Web/API/StorageManager#Browser_compatibility 2. Chromium repository: https://chromium.googlesource.com/chromium/src/+/21ba553558ed7cd65f59199b28dd8732f5dc93a0%5E%21/third_party/WebKit/Source/modules/quota/StorageManager.idl (initial) https://chromium.googlesource.com/chromium/src/+/703806a09a9c9dc295e29c86d079dfef4dc67f40%5E!/third_party/WebKit/Source/modules/quota/StorageManager.idl (estimate) https://chromium.googlesource.com/chromium/src/+/0b5bf0fd87c2dad9b2c7223a20f2b8b7756f3e57%5E%21/third_party/WebKit/Source/modules/quota/StorageManager.idl (persisted, persist) 3. Firefox bug tracker: https://bugzil.la/1267941 (estimate) https://bugzil.la/1286717 (persist, persisted) 4. Firefox repository: https://github.com/mozilla/gecko-dev/blob/ba9fa0d68ab991dd0eb90ab6545e82a38abf5678/dom/webidl/StorageManager.webidl (initial) https://github.com/mozilla/gecko-dev/blob/04b9cbbc2be2137a37e158a5ebaf9c7bef2364f9/dom/webidl/StorageManager.webidl (status quo) https://github.com/mozilla/gecko-dev/blob/04b9cbbc2be2137a37e158a5ebaf9c7bef2364f9/modules/libpref/init/all.js#L5723-L5727 (flag on Android)
@@ -5,34 +5,56 @@ | |||
"mdn_url": "https://developer.mozilla.org/docs/Web/API/StorageManager", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, I have added the compat data despite the ongoing discussion in #190 about representing the "secure context" requirement.
In my opinion, a browser could be considered compatible if it offers the feature in the secure context as defined by the spec. On the other hand, I wouldn't consider a browser incompatible, if it also offers the feature outside of the [required] secure context, but instead point this out in a "notes"
entry.
api/StorageManager.json
Outdated
}, | ||
"chrome": { | ||
"version_added": null | ||
"version_added": "48" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MDN stated 55
, but basic and full support was already established in 48
and 52
respectively:
{ | ||
"type": "preference", | ||
"name": "dom.storageManager.enabled", | ||
"value_to_set": "true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MDN stated that, from version 55, the preference browser.storageManager.enabled
was also required, but I found no evidence for this (neither in the repository nor in the bugs).
{ | ||
"type": "preference", | ||
"name": "dom.storageManager.enabled", | ||
"value_to_set": "true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MDN did not mention yet that the feature is still be behind a flag on Android:
https://github.com/mozilla/gecko-dev/blob/04b9cbbc2be2137a37e158a5ebaf9c7bef2364f9/modules/libpref/init/all.js#L5723-L5727
}, | ||
"ie": { | ||
"version_added": null | ||
}, | ||
"opera": { | ||
"version_added": null | ||
"version_added": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I updated the Chrome versions and am not aware of a Chrome version to Opera version mapping (like [the one for Samsung Internet]), I have reset these versions to true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opera is usually Chrome - 13, so in this case 35. But I've always been a little bit uncomfortable doing that on an automatic basis, so you don't actually have to change this. I'll leave it up to your judgment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice research on this @caugner. A few points, but this is pretty close. Thank you!
api/StorageManager.json
Outdated
{ | ||
"version_added": "51", | ||
"version_removed": "57", | ||
"notes": "See <a href='https://bugzil.la/1304966'>Bug 1304966</a> and <a href='https://bugzil.la/1399038'>Bug 1399038</a>.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we routinely capitalize "bug"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api/StorageManager.json
Outdated
"firefox_android": { | ||
"version_added": null | ||
"version_added": "51", | ||
"notes": "See <a href='https://bugzil.la/1304966'>Bug 1304966</a> and <a href='https://bugzil.la/1399038'>Bug 1399038</a>.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug capitalization here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
}, | ||
"ie": { | ||
"version_added": null | ||
}, | ||
"opera": { | ||
"version_added": null | ||
"version_added": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opera is usually Chrome - 13, so in this case 35. But I've always been a little bit uncomfortable doing that on an automatic basis, so you don't actually have to change this. I'll leave it up to your judgment
api/StorageManager.json
Outdated
@@ -5,34 +5,56 @@ | |||
"mdn_url": "https://developer.mozilla.org/docs/Web/API/StorageManager", | |||
"support": { | |||
"webview_android": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I've suggested other changes, may as well sort the browsers too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I just did that in 4125b1a.
@ddbeck Regarding the Opera version (for some reason I cannot directly reply to that comment), I would think it's better – for the sake of traceability – to make such derivations systematically in a PR dedicated to that purpose. |
Good idea! I opened #2510 to tackle the question generally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @caugner! 🎉
3 years have passed, but I thought I'd point out for anyone subscribed to this PR that there was a problem with how the Chromium versions were determined. Just looking at when Web IDL was added to Chromium isn't reliable, because it can still be behind a runtime flag. In this case, that's the The data is being updated in #11698. |
Sources:
https://developer.mozilla.org/en-US/docs/Web/API/StorageManager#Browser_compatibility
https://chromium.googlesource.com/chromium/src/+/21ba553558ed7cd65f59199b28dd8732f5dc93a0%5E%21/third_party/WebKit/Source/modules/quota/StorageManager.idl (initial)
https://chromium.googlesource.com/chromium/src/+/703806a09a9c9dc295e29c86d079dfef4dc67f40%5E!/third_party/WebKit/Source/modules/quota/StorageManager.idl (estimate)
https://chromium.googlesource.com/chromium/src/+/0b5bf0fd87c2dad9b2c7223a20f2b8b7756f3e57%5E%21/third_party/WebKit/Source/modules/quota/StorageManager.idl (persisted, persist)
https://bugzil.la/1267941 (estimate)
https://bugzil.la/1286717 (persist, persisted)
https://github.com/mozilla/gecko-dev/blob/ba9fa0d68ab991dd0eb90ab6545e82a38abf5678/dom/webidl/StorageManager.webidl (initial)
https://github.com/mozilla/gecko-dev/blob/04b9cbbc2be2137a37e158a5ebaf9c7bef2364f9/dom/webidl/StorageManager.webidl (status quo)
https://github.com/mozilla/gecko-dev/blob/04b9cbbc2be2137a37e158a5ebaf9c7bef2364f9/modules/libpref/init/all.js#L5723-L5727 (flag on Android)