Skip to content
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 fenced frames BCD #20294

Merged
merged 18 commits into from
Dec 8, 2023
Merged

Add fenced frames BCD #20294

merged 18 commits into from
Dec 8, 2023

Conversation

chrisdavidmills
Copy link
Collaborator

Summary

Fenced frames are part of the set of Privacy Sandbox features being released by default in Chrome 115 and friends. This PR aims to add BCD for all the new features that the fenced frame spec brings.

See my research document for details of all the features added by this PR.

Test results and supporting details

Related issues

@github-actions github-actions bot added data:http 🚠 Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API data:html 📄 Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML labels Jul 4, 2023
@queengooborg
Copy link
Collaborator

Based upon results from the mdn-bcd-collector project, it appears that this set of features has landed in Chrome 117. May we update the data accordingly?

@chrisdavidmills
Copy link
Collaborator Author

Based upon results from the mdn-bcd-collector project, it appears that this set of features has landed in Chrome 117. May we update the data accordingly?

@queengooborg done.

@github-actions github-actions bot added the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Oct 16, 2023
@github-actions
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot removed the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Oct 16, 2023
Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu <vinyldarkscratch@gmail.com>
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the IDL, are these features missing in this PR or do they not have an implementation?

  • api.Navigator.deprecatedReplaceInURN
  • api.HTMLFencedFrameElement.HTMLFencedFrameElement (constructor)

@chrisdavidmills
Copy link
Collaborator Author

  • api.Navigator.deprecatedReplaceInURN

  • api.HTMLFencedFrameElement.HTMLFencedFrameElement (constructor)

@Elchi3 Hrm, these weren't in the spec when I first started documenting this (it was a while ago). I've had a look in the Chromium source code, and they are there in the IDL.

I've dropped the Chrome eng folk an email to ask when these items were first supported.

@Elchi3 Elchi3 marked this pull request as draft October 19, 2023 13:55
@Elchi3
Copy link
Member

Elchi3 commented Oct 19, 2023

Marking this as draft, please set as ready once you want me to re-review.

@chrisdavidmills chrisdavidmills marked this pull request as ready for review October 27, 2023 08:01
@chrisdavidmills
Copy link
Collaborator Author

Marking this as draft, please set as ready once you want me to re-review.

@Elchi3 OK, I've looked into the missing items some more, and have come to the following conclusions:

  • api.Navigator.deprecatedReplaceInURN: This is definitely supported, and was introduced at the same time as the rest of the fenced frames features. I've added this here, and will also add a page to the corresponding content PR.
  • api.HTMLFencedFrameElement.HTMLFencedFrameElement (constructor): I don't know where I got that this was included in Chrome from. I later found this IDL, which doesn't include it, and when you try to use it in JS, you get an "Illegal constructor" error. So I am going to leave it out for now.

@Elchi3
Copy link
Member

Elchi3 commented Oct 27, 2023

  • api.HTMLFencedFrameElement.HTMLFencedFrameElement (constructor): I don't know where I got that this was included in Chrome from. I later found this IDL, which doesn't include it, and when you try to use it in JS, you get an "Illegal constructor" error. So I am going to leave it out for now.

Thanks for looking into this, Chris! I also just now realized that the spec uses an "HTMLConstructor". I will need to read into what this means exactly. See https://html.spec.whatwg.org/multipage/dom.html#html-element-constructors.

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Chris. Thanks to OWD's BCD collector project, I can verify the following:
https://mdn-bcd-collector.gooborg.com/tests/api/Fence
https://mdn-bcd-collector.gooborg.com/tests/api/HTMLFencedFrameElement
https://mdn-bcd-collector.gooborg.com/tests/api/Navigator/deprecatedReplaceInURN
https://mdn-bcd-collector.gooborg.com/tests/api/Window/fence

However, in FencedFrameConfig, there are a few properties that seem unsupported for the moment:
https://mdn-bcd-collector.gooborg.com/tests/api/FencedFrameConfig

api.FencedFrameConfig.containerHeight (Window exposure):  No Support
api.FencedFrameConfig.containerWidth (Window exposure):  No Support
api.FencedFrameConfig.contentHeight (Window exposure):  No Support
api.FencedFrameConfig.contentWidth (Window exposure):  No Support

I also don't see them in the IDL:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/fenced_frame/fenced_frame_config.idl

Can you remove these from this PR or do you have other information?

@chrisdavidmills
Copy link
Collaborator Author

Can you remove these from this PR or do you have other information?

@Elchi3 I suspect this isn't that simple and is to do with the "opaque identifiers" concept around fenced frames (look at the IDL listing, lines 12-15). Saying that, I don't fully understand this, so I will ask the Chrome engineers for some help here.

@Elchi3
Copy link
Member

Elchi3 commented Nov 10, 2023

@chrisdavidmills Any news? This PR could land if you remove the 4 properties.

@chrisdavidmills
Copy link
Collaborator Author

@chrisdavidmills Any news? This PR could land if you remove the 4 properties.

I finally managed to talk to someone who can help me track down this information; I should have a definite answer about these properties very soon.

@gtanzer
Copy link

gtanzer commented Nov 30, 2023

It looks like the width and height attributes on the FencedFrameConfig are not currently functional and probably shouldn't be there. They don't need to be documented.

The idea is that at some point we may surface containerWidth, containerHeight, contentWidth, and contentHeight (though they may potentially be opaque), perhaps with different names, but we haven't done it yet.

@chrisdavidmills
Copy link
Collaborator Author

@Elchi3 OK, I've removed those unexposed properties, as per clarification in mdn/content#27781 (comment).

@chrisdavidmills chrisdavidmills merged commit 1bbca17 into mdn:main Dec 8, 2023
6 checks passed
@chrisdavidmills chrisdavidmills deleted the fenced-frames branch December 8, 2023 15:27
@queengooborg
Copy link
Collaborator

Welp...it looks like this is another set of APIs that doesn't seem to be available in BrowserStack. The collector results are reporting these APIs as unsupported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API data:html 📄 Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML data:http 🚠 Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants