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

Elaborate on FencedFrameConfig #67

Merged
merged 42 commits into from
Apr 18, 2023
Merged

Elaborate on FencedFrameConfig #67

merged 42 commits into from
Apr 18, 2023

Conversation

gtanzer
Copy link
Collaborator

@gtanzer gtanzer commented Apr 7, 2023

spec.bs Outdated Show resolved Hide resolved
@domfarolino
Copy link
Collaborator

Per our earlier discussion, all that's left here is making all of the optional stuff into the correct "Null or [...]" language, and specifying the visibility type etc right?

@gtanzer
Copy link
Collaborator Author

gtanzer commented Apr 7, 2023

Per our earlier discussion, all that's left here is making all of the optional stuff into the correct "Null or [...]" language, and specifying the visibility type etc right?

Yes, I believe so.

spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
@gtanzer
Copy link
Collaborator Author

gtanzer commented Apr 12, 2023

@domfarolino Elaborated on the fenced frame config mapping in the tentative way we discussed. (It's broken up into a pending mapping and a finalized mapping. Lookup waits until the config is no longer present in the pending mapping; we can change the description to use an explicit callback as needed later.)

Copy link
Collaborator

@domfarolino domfarolino left a comment

Choose a reason for hiding this comment

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

Getting close!

spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated
1. If *instance*'s [=fenced frame config instance/mapped url=] is null, then the behavior is
unspecified.

1. If this [=document=]'s [=origin=] and *instance*'s
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed to the [=relevant settings object=] to match FLEDGE spec, but lmk if I'm misunderstanding what that means.

spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
Garrett Tanzer and others added 9 commits April 14, 2023 17:11
 * Use infra.spec.whatwg.org
 * Separate the dfn of fenced frame config mapping from traversable navigable
   member of the same type
 * Make algorithm names more casual, and signatures more formal with variables
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Outdated Show resolved Hide resolved
spec.bs Show resolved Hide resolved
spec.bs Show resolved Hide resolved
Copy link
Collaborator

@domfarolino domfarolino left a comment

Choose a reason for hiding this comment

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

Looking great, just a few small comments and I think we're good to go

spec.bs Outdated Show resolved Hide resolved
containing an <dfn export for="exfiltration budget metadata reference">origin</dfn>, which is an
[=origin=]; and an <dfn export for="exfiltration budget metadata reference">amount to debit
reference</dfn>, which is a mutable reference to a non-negative valid floating point number.
<span class=XXX>TODO: are mutable references a thing in spec?</span>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this just be the number itself? Specs have the concept of a "pointer to foo" basically, but if we could make this just a plain ole number (instead of a pointer to a number elsewhere) that would be easiest. Is there a strong reason not to do this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It has to be a reference because when you perform a fence-escaping navigation, it subtracts this number from the budget and then sets it to 0 (through the reference, so that it applies to all instances created from the same config).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Where does "the budget" that we subtract from ultimately live? Right now in our spec it seems like a closed loop where the config member is referenced by the instance, and the instance member is referenced by the instantiation algorithm.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The actual remaining budget lives somewhere defined by sharedStorage spec (on disk somewhere). The amount to deduct lives in the [=fenced frame config=] in the config mapping though.

Not sure how pointers really work in spec, since the copy semantics are not very explicit.

navigable=]'s [=navigable/traversable navigable=]'s [=fenced frame config instance=].

<span class=XXX>This and the below references should point to an actual member on [=traversable
navigable=], not just the type.</span>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I put this as a TODO here that we should follow-up on quickly, but feel free to address this before we land if you want. Basically I think inside this section we should introduce a new member called "fenced frame config instance" or whatever is similar to what we have on DocumentLoader where this can live. That way here and elsewhere we have a concrete thing to initialize, assign, and address wherever we need.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Agree. Where should it live? If we didn't have to deal with urn iframes I think it could just be attached to the fenced content navigable or whatever, but we probably have to attach it to the root.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That reminds me: this part about fenced frame config mappings is probably wrong for urn iframes (though it is wrong in the same way that our implementation is "wrong"):

Each [=traversable navigable=] has a <dfn for="traversable navigable" export>fenced frame config
mapping</dfn>, which is a new [=fenced frame config mapping=].

Copy link
Collaborator

Choose a reason for hiding this comment

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

So the fenced navigable is indeed a traversable navigable, per https://wicg.github.io/fenced-frame/#fenced-navigable-container-fenced-navigable. That's the root, essentially content::Page / content::FencedFrame so the member should probably live there, and iframes can climb the tree to reference it. That's basically what the implementation does, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The config mapping does go in the Page in the implementation, but that is semi-broken for urn iframes because it means that you can load configs that shouldn't really be in scope (e.g., you can in principle take a single urn and then create arbitrarily deep nested urn iframes using that urn).

The config instance goes in the root FTN in the implementation because it's more important for that degeneracy not to exist there. But when urn iframes are gone, it would go in the FrameTree. (Maybe the config mapping should also go there.)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah yeah... hmm OK I think for now we should make it a normal member of "navigable" (basically FTN) with some strong Note saying that once URN iframes are gone this will exclusively live on "traversable navigable".

spec.bs Outdated Show resolved Hide resolved
@gtanzer
Copy link
Collaborator Author

gtanzer commented Apr 18, 2023

@domfarolino Looks fine to merge to me. Still a little stuff to do in followups.

@domfarolino domfarolino merged commit 256b2bf into master Apr 18, 2023
@domfarolino domfarolino deleted the config-fields branch April 18, 2023 07:55
github-actions bot added a commit that referenced this pull request Apr 18, 2023
SHA: 256b2bf
Reason: push, by domfarolino

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants