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

Issue #83: Move media-source spec to Contiguous IDL #127

Closed
wants to merge 17 commits into from

Conversation

mwatson2
Copy link
Contributor

No description provided.

@wolenetz
Copy link
Member

@mwatson2 : media-source.html should not be changed by this PR. It needs to remain as a redirector to index.html. Thanks for preparing this. I'll do further review on this before EOW.

@jdsmith3000
Copy link
Contributor

The new IDL text seems to render fine in HTML, but isn't very readable in text form because it's one long run-on line. I've prefer these be broken up, like the examples in the Contiguous IDL document:

  [Constructor]
  interface Dahut : Mammal {
    const unsigned short LEVROGYROUS = 0;
    const unsigned short DEXTROGYROUS = 1;
    readonly attribute DOMString chirality;
    attribute unsigned long age;
    Dahut turnAround(float angle, boolean fall);
    unsigned long trip();
    void yell([AllowAny] unsigned long volume,
              [TreatNullAs=EmptyString] DOMString sentence);
  };

You mentioned the conversion was largely done by an updated version of respec. Does it do the current formatting?

@mwatson2
Copy link
Contributor Author

media-source.html should not be changed by this PR

Oops. Fixed that.

The new IDL text seems to render fine in HTML, but isn't very readable in text form because it's one long run-on line.

Not sure what you mean. Do you mean there is a case there is IDL is on one run-on line ? Or are you talking about the HTML for the attribute / method tables ?

You mentioned the conversion was largely done by an updated version of respec. Does it do the current formatting?

Yes, it does what ReSpec does with "Old School" IDL (convert to the HTML for the IDL itself, the method and attribute tables and description sections) and nothing else. So, what you are left with is Contiguous IDL. Then you need to go in and patch up all the links, which have changed.

@jdsmith3000
Copy link
Contributor

I did an update and don't see as clear of an example as previously. The formatting is ragged around the IDL content though, like this:

       <div><pre class="idl">partial interface Navigator {
    [SecureContext] Promise&lt;MediaKeySystemAccess&gt; requestMediaKeySystemAccess (DOMString keySystem, sequence&lt;MediaKeySystemConfiguration&gt; supportedConfigurations);
};</pre><section><h2>Methods</h2><dl class="methods" data-dfn-for="Navigator" data-link-for="Navigator"><dt><dfn><code>requestMediaKeySystemAccess</code></dfn></dt><dd>

@mwatson2
Copy link
Contributor Author

@jdsmith3000 Yes, it didn't format the HTML it generated nicely. We could tidy it up by hand (in one go, or as we work on each part of the spec) or we could use a tool to reformat the whole thing.

@jdsmith3000
Copy link
Contributor

If you know of a tool, that would be great. If not, the cleanup looks straightforward and wouldn't be too hard to do manually. We could merge this change (since it is functional) and enter an issue for cleanup, if there is time.

interface MediaSource : EventTarget {
readonly attribute SourceBufferList sourceBuffers;
readonly attribute SourceBufferList activeSourceBuffers;
readonly attribute ReadyState readyState;
Copy link
Member

Choose a reason for hiding this comment

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

index.html no longer contains a hyperlink from "readyState" to the attribute's definition from the WebIDL table. Please fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a ReSpec bug: w3c/respec#893

Copy link
Contributor

Choose a reason for hiding this comment

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

Does the respec bug also encompass the enum link I just noted for enum ReadyState?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I expect so. It gets confused internally between readyState and ReadyState.

@jdsmith3000
Copy link
Contributor

@wolenetz I'm glad you caught these. Note sure how I missed them.

@mwatson2 Are these the type of links that respec doesn't migrate to contiguous IDL properly?

<dl title="interface SourceBufferList : EventTarget" class="idl">
<dt>readonly attribute unsigned long length</dt>
<dd>
<div><pre class="idl">interface SourceBufferList : EventTarget {
Copy link
Member

@wolenetz wolenetz Jul 26, 2016

Choose a reason for hiding this comment

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

Ditto (many types missing links here, in this object's IDL, attribute and method details...)

@wolenetz
Copy link
Member

@mwatson2 Please also update the publishDate (or I can do that if that's all that's remaining before merging).
I just finished this iteration of reviewing this. Other than publishDate, I think the main issue is many of the types in the IDL, attribute and method detail no longer have links when they did before this change.

@wolenetz
Copy link
Member

Note that when I was originally trying to fix those respec errors, I hit a similar problem where the links evaporated: see #68 (comment)

@wolenetz
Copy link
Member

I've finished this iteration of review as of 1f5f9f3 -- it looks much better, @mwatson2. Thank you! If w3c/respec#893 only impacts readyState and appendBuffer, it seems we could file another V1Editorial to fix-up those (or work-around those) separately.
Current outstanding review comments:

@mwatson2
Copy link
Contributor Author

@wolenetz In response to the several "Is this expected ?", the conversion script is very ad hoc and such instructions as I was given note that you'll have to fix up some links, so in that sense, yes, it is expected that it will break some links and mess up some formatting which we will then have to fix.

Regarding w3c/respec#893, I only just filed it so I'm not sure there's an ETA. If I knew how to work around it, I'd just fix the underlying bug myself ;-)

The missing appendBuffer links is likely a different ReSpec issue: there is nothing we can do in the source to fix it, since the source is just the pure IDL. I did ask about this issue and it was suggested to replace the two methods with:

void appendBuffer( (ArrayBuffer or ArrayBufferView) data );

(WebIDL apparently doesn't really have overloading, but it does have union types).

So, I will fix the formatting issues.

@wolenetz
Copy link
Member

Sounds good. If we need to work around the respec bug manually in
index.html please document the steps so that we can publish a clean
version. Thanks for working on this, Mark.

On Jul 28, 2016 4:56 PM, "mwatson2" notifications@github.com wrote:

@wolenetz https://github.com/wolenetz In response to the several "Is
this expected ?", the conversion script is very ad hoc and such
instructions as I was given note that you'll have to fix up some links, so
in that sense, yes, it is expected that it will break some links and mess
up some formatting which we will then have to fix.

Regarding w3c/respec#893 w3c/respec#893, I
only just filed it so I'm not sure there's an ETA. If I knew how to work
around it, I'd just fix the underlying bug myself ;-)

The missing appendBuffer links is likely a different ReSpec issue: there
is nothing we can do in the source to fix it, since the source is just the
pure IDL. I did ask about this issue and it was suggested to replace the
two methods with:

void appendBuffer( (ArrayBuffer or ArrayBufferView) data );

(WebIDL apparently doesn't really have overloading, but it does have union
types).

So, I will fix the formatting issues.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#127 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/ALCtwwX_rz6NL_cHdyh13NMfuvR_gXi1ks5qaUHDgaJpZM4JQVpO
.

@mwatson2
Copy link
Contributor Author

I have a question in on the ReSpec bug. A cannot find a way to fix the appendBuffer problem. We might have to patch that up by hand in media-source.js.

The other problems should be fixed now.

<dl title="enum ReadyState" class="idl">
<dt>closed</dt>
<dd>
<div><pre class="idl">enum ReadyState {
Copy link
Contributor

Choose a reason for hiding this comment

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

The enum ReadyState is linked to the readyState attribute description, and that attribute (lower down) has no link.

@jdsmith3000
Copy link
Contributor

It looks like both the ReadyState enum and attribute have link problems still as well.

I also noted a link from the TrackDefaultList interface to it's constructor that is new.

@dontcallmedom
Copy link
Member

Regarding the problem of auto-linking of readyState, I think it can be solved without patching ReSpec: replacing the <dt> where readyState is defined with the following seems to do the trick:
<dt><dfn data-dfn-for='MediaSource' data-lt='readyState'><code>readyState</code></dfn> of type <span class="idlAttrType"><a href="#idl-def-readystate">ReadyState</a></span>, readonly </dt>

With that, the id dom-readystate disappears, which breaks a number of internal links based on def-id which seems a local thing.

@mwatson2
Copy link
Contributor Author

mwatson2 commented Aug 2, 2016

This PR now includes the work-around for the readyState link problem as well as 6 other issues (per the commits above). I think it is now good-to-go.

@mwatson2
Copy link
Contributor Author

mwatson2 commented Aug 3, 2016

I believe all the issues are fixed now. Shall I merge this ?

@jdsmith3000
Copy link
Contributor

jdsmith3000 commented Aug 3, 2016

The only odd thing I noticed was the ReadyState enum has a link to itself, where the common format would have no link. Right?

@wolenetz
Copy link
Member

wolenetz commented Aug 8, 2016

I've landed some large chunks (removing the 3 at-risk features) on gh-pages, so before reviewing, I'll try to add a merge commit to this PR that resolves those conflicts.

@wolenetz
Copy link
Member

wolenetz commented Aug 8, 2016

Looks mostly good. There's still a little weirdness around "ReadyState" type of the "readyState" attribute linking to the readyState attribute IDL, not the ReadyState enum. I believe that's the only issue I spotted related to this PR when I merged it with current gh-pages locally. I'll attempt to add that merge commit to this PR now.

@wolenetz
Copy link
Member

wolenetz commented Aug 8, 2016

As I expected, I don't have permissions to push to mwatson2's fork of w3c/media-source. I'll redo this PR using my own fork and post that PR reference here shortly.

@wolenetz
Copy link
Member

wolenetz commented Aug 8, 2016

See PR #141 for a more current version of this PR. Closing this one since it is replaced by #141.

@wolenetz wolenetz closed this Aug 8, 2016
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.

None yet

4 participants