Skip to content

Switch to automatic cross-references #486

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

Merged
merged 2 commits into from
Oct 30, 2020
Merged

Switch to automatic cross-references #486

merged 2 commits into from
Oct 30, 2020

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Oct 16, 2020

[This PR cannot be merged as-is. Some discussion needed on the treatment of the remaining errors]

Since the specification was written, authoring tools have made a lot of progress on cross-references support, and groups have become better at differentiating between definitions that should remain internal to a given specification (think "private" in object oriented languages) and those that the group commits to maintain over time and that can be referenced by other specifications (think "public").

This update uses the xref feature of Respec throughout the spec, and drops all indirect definitions that were in the Terminology section that can now be taken care of automatically by Respec. Some of them cannot be because the underlying specifications are not known to Respec.

Some of the definitions no longer existed (for instance the concept of user activation was modified in HTML), or specs are no longer the right ones (reference to Web Storage should now be a reference to HTML).

The exercise also reveals cases where the definitions exist but are not yet exported. Most of them are linked to the creation of the receiving browsing context algorithm. This is not surprising since this part cherry-picks algorithms in different specifications to define an "incognito mode".

In any case, these remaining errors signal the need to exchange with the groups responsible for these specs to ask them whether they can flag the definitions we need as "exported".

The definitions that the Presentation API references but that are not exported by the underlying specs are:

In HTML:

In IndexedDB:

Note this update also adds the IDL index and the index appendices that Respec generates automatically.


Preview | Diff

Since the specification was written, authoring tools have made a lot of progress
on cross-references support, and groups have become better at differentiating
between definitions that should remain internal to a given specification
(think "private" in object oriented languages) and those that the group commits
to maintain over time and that can be referenced by other specifications
(think "public").

This update uses the `xref` feature of Respec throughout the spec, and drops
all indirect definitions that were in the Terminology section that can now be
taken care of automatically by Respec. Some of them cannot be because the
underlying specifications are not known to Respec.

Some of the definitions no longer existed (for instance the concept of user
activation was modified in HTML), or specs are no longer the right ones
(reference to Web Storage should now be a reference to HTML).

The exercise also reveals cases where the definitions exist but are not yet
exported. Most of them are linked to the creation of the receiving browsing
context algorithm. This is not surprising since this part cherry-picks
algorithms in different specifications to define an "incognito mode".

In any case, these remaining errors signal the need to exchange with the groups
responsible for these specs to ask them whether they can flag the definitions
we need as "exported".

The definitions that the Presentation API references but that are not exported
by the underlying specs are:

In HTML:
- [parse a URL](https://html.spec.whatwg.org/multipage/urls-and-fetching.html#parse-a-url)
- [list of descendant browsing contexts](https://html.spec.whatwg.org/multipage/browsers.html#list-of-the-descendant-browsing-contexts)
- [creating a new browsing context](https://html.spec.whatwg.org/multipage/browsers.html#creating-a-new-browsing-context)
- [session history](https://html.spec.whatwg.org/multipage/history.html#session-history)
- [allowed to navigate](https://html.spec.whatwg.org/multipage/browsers.html#allowed-to-navigate)
- [navigating to a fragment identifier](https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate-fragid)

In IndexedDB:
- [databases](https://www.w3.org/TR/IndexedDB/#database)

Note this update also adds the IDL index and the index appendices that Respec
generates automatically.
tidoust referenced this pull request in dontcallmedom/presentation-api Oct 16, 2020
New respec profile is needed to support Process 2020
Using autolinks instead of local definition proxies help identify potentially problematic links (a number of which have been left as errors in this branch)
@markafoltz
Copy link
Contributor

markafoltz commented Oct 18, 2020

We could:

  1. Ask other groups to export these definitions
  2. Find out of there has been progress in defining an "incognito" browsing context in HTML we could reference, instead of defining our own
  3. Remove most of these requirements for the receiving browsing context, leaving them up to the user agent
  4. Leave things as-is

I vote for #4 for now, I think we need more input before deciding how to proceed.

@tidoust
Copy link
Member Author

tidoust commented Oct 19, 2020

I would split the list into two.

First, the terms that the spec needs in other algorithms:

For these, I think that we should reach out to the WHATWG and request that they get an export flag.

Second, the list of terms that the spec needs to define the "incognito" mode. Ideally, that definition would rather be in HTML and it does not make a lot of sense to export these terms from HTML. It may be worth checking whether there is interest in upstreaming the definition.

The cross-ref database only contains terms that specifications choose to export.
The Presentation API needs to reference a few additional terms that are not yet
exported by the relevant specs (mostly HTML). While the group figures out a way
to have these terms exported, this update creates explicit local definitions for
these terms in the terminology section.
@tidoust
Copy link
Member Author

tidoust commented Oct 28, 2020

I adjusted the PR to work around ReSpec's errors. The terminology section now contains:

  1. terms that are defined in specifications that are not in the cross-reference database used by ReSpec, typically those defined in RFCs (e.g. Accept-Language)
  2. terms that are not a direct match of the terms defined in external specification (e.g. trusted event)
  3. terms that are "internal" to another spec. Ideally, that last list should disappear over time, since a spec should not have to reference internal concepts from other specs.

@markafoltz
Copy link
Contributor

This looks good to me, thank you @tidoust for making these extensive cross reference fixes to the spec. It would have taken me a long time to track down all of them!

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