-
Notifications
You must be signed in to change notification settings - Fork 10
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
Rename supportedSources to knownSources #268
Conversation
LGTM, but need more reviewers. |
index.html
Outdated
Each [=global object=] has an associated <dfn>frozen array of supported source types</dfn>, which is initialized | ||
to the {{FrozenArray}} created from the sequence of strings values present in the enumeration | ||
{{PressureSource}}, in alphabetical order. |
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 find this confusing, although I can see it's similar to https://w3c.github.io/performance-timeline/#dom-performanceobserver-supportedentrytypes:
- Why is the data per-global object if the list of known sources is not going to vary per global?
- Please mention in the commit message that the list is now mandated to be returned in alphabetical order, this was not the case before.
- "A FrozednArray created from PressureSource" does not really say that it contains only the source types this implementation might have support for.
What if you just say something like "each user agent has a list of PressureSource values corresponding to the source types that are known to the implementation" and the getter returns this list in alphabetical order?
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 guess I can say user agent instead of global object given they are stable across user agent
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.
Actually I think this is wrong. It's a FrozenArray (object) and that needs to be attached to a JS realm, thus global object
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.
The internal representation of the list of supported sources does not need to be a FrozenArray, it just needs to be represented as such when the attribute getter is accessed.
In other words, I think you could simply mention in https://www.w3.org/TR/compute-pressure/#internal-slot-definitions that the user agent has a list of supported sources and, in the getter here, say that it should return the list in alphabetical order. Since the getter returns a FrozenArray, the conversion between a list and a FrozenArray would be automatic.
I think we should merge this and we can make changes when we get answers to the files issue on the WebIDL repo. It is basically just a rename and it needs the global object to create a FrozenArray (which is an array and thus an object) |
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.
lgtm! 🥳
Based on specification change [1], supportedSources attribute is renamed to knowSources. [1]: w3c/compute-pressure#268 Bug: 337837870 Change-Id: Ic80d0c806531ed99f8bc2c368f89e55427b0202c
Based on specification change [1], supportedSources attribute is renamed to knownSources. [1]: w3c/compute-pressure#268 Bug: 337837870 Change-Id: Ic80d0c806531ed99f8bc2c368f89e55427b0202c
Based on specification change [1], supportedSources attribute is renamed to knownSources. [1]: w3c/compute-pressure#268 Bug: 337837870 Change-Id: Ic80d0c806531ed99f8bc2c368f89e55427b0202c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5491092 Commit-Queue: Arnaud Mandy <arnaud.mandy@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Mike Taylor <miketaylr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1294408}
Based on specification change [1], supportedSources attribute is renamed to knownSources. [1]: w3c/compute-pressure#268 Bug: 337837870 Change-Id: Ic80d0c806531ed99f8bc2c368f89e55427b0202c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5491092 Commit-Queue: Arnaud Mandy <arnaud.mandy@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Mike Taylor <miketaylr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1294408}
Based on specification change [1], supportedSources attribute is renamed to knownSources. [1]: w3c/compute-pressure#268 Bug: 337837870 Change-Id: Ic80d0c806531ed99f8bc2c368f89e55427b0202c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5491092 Commit-Queue: Arnaud Mandy <arnaud.mandy@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Mike Taylor <miketaylr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1294408}
Based on specification change [1], supportedSources attribute is renamed to knownSources. [1]: w3c/compute-pressure#268 (cherry picked from commit fc3b944) Bug: 337837870 Change-Id: Ic80d0c806531ed99f8bc2c368f89e55427b0202c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5491092 Commit-Queue: Arnaud Mandy <arnaud.mandy@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Mike Taylor <miketaylr@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1294408} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5508494 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Arnaud Mandy <arnaud.mandy@intel.com> Reviewed-by: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/branch-heads/6422@{#626} Cr-Branched-From: 9012208-refs/heads/main@{#1287751}
…s to knownSources, a=testonly Automatic update from web-platform-tests compute pressure: Rename supportedSources to knownSources Based on specification change [1], supportedSources attribute is renamed to knownSources. [1]: w3c/compute-pressure#268 Bug: 337837870 Change-Id: Ic80d0c806531ed99f8bc2c368f89e55427b0202c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5491092 Commit-Queue: Arnaud Mandy <arnaud.mandy@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Mike Taylor <miketaylr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1294408} -- wpt-commits: 02b375dd256fbe9090082cdda642b837b669404b wpt-pr: 45968
…s to knownSources, a=testonly Automatic update from web-platform-tests compute pressure: Rename supportedSources to knownSources Based on specification change [1], supportedSources attribute is renamed to knownSources. [1]: w3c/compute-pressure#268 Bug: 337837870 Change-Id: Ic80d0c806531ed99f8bc2c368f89e55427b0202c Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5491092 Commit-Queue: Arnaud Mandy <arnaud.mandy@intel.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Reviewed-by: Mike Taylor <miketaylr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1294408} -- wpt-commits: 02b375dd256fbe9090082cdda642b837b669404b wpt-pr: 45968
The list is now mandated to be returned in alphabetical order, this was not the case before.
Fixes #266
Preview | Diff