-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add missing features for DOMRect API #11679
Conversation
This PR is a part of a project to add missing interfaces and interface features to BCD that are from an active spec (including WICG specs) and is supported in at least one browser. This particular PR adds the missing features of the DOMRect API, populating the results using data from the [mdn-bcd-collector](https://mdn-bcd-collector.appspot.com) project (v3.2.1). Tests Used: https://mdn-bcd-collector.appspot.com/tests/api/DOMRect
api/DOMRect.json
Outdated
"spec_url": "https://drafts.fxtf.org/geometry/#dom-domrectreadonly-height", | ||
"support": { | ||
"chrome": { | ||
"version_added": "61" |
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.
"version_added": "61" | |
"version_added": "2" |
For the properties that were on ClientRect
, I think we should mark support as going back that far. That's what we do with other prefixed and alt.name. entries.
api/DOMRect.json
Outdated
"version_added": "27" | ||
}, | ||
"ie": { | ||
"version_added": false, |
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.
"version_added": false, | |
"version_added": "4", |
And no note needed. These were copied from DOMRectReadOnly.json
but I think we should remove everything about ClientRect
from there, including the notes.
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've sent #11694 for that.
Co-authored-by: Philip Jägenstedt <[email protected]>
One important fact when reviewing this is to know what properties |
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 noticed that Samsung Internet 8.0 was probably wrong, and then more :)
There's a problem with treating ClientRect
as an alias I didn't realize before, I'll write a separate comment.
Trying to make the data consistently represent the earlier support of This means that we'd need to treat It's tempting to say we should just forget about |
Hmm. My initial reaction is to favor consistency, even though it's a bit of a hassle to reinstate what you just removed. This isn't even so much for the benefit of being outwardly consistent as it is for not doing surprising things that we'll stumble upon later. |
Co-authored-by: Philip Jägenstedt <[email protected]>
Since the properties top, right, bottom and left are on DOMRectReadOnly, it's necessary to treat ClientRect as an alias of both DOMRect and DOMRectReadOnly. See discussion starting here: mdn#11679 (comment) This reverts mdn#11694 but goes much further in representing the ClientRect support than before.
It was a bit of a hassle, but I've sent #11960 now. I think having the alias in both places is the right call in the end. |
Since the properties top, right, bottom and left are on DOMRectReadOnly, it's necessary to treat ClientRect as an alias of both DOMRect and DOMRectReadOnly. See discussion starting here: #11679 (comment) This reverts #11694 but goes much further in representing the ClientRect support than before.
This PR is a part of a project to add missing interfaces and interface features to BCD that are from an active spec (including WICG specs) and is supported in at least one browser. This particular PR adds the missing features of the DOMRect API, populating the results using data from the mdn-bcd-collector project (v3.2.1).
Tests Used: https://mdn-bcd-collector.appspot.com/tests/api/DOMRect