-
Notifications
You must be signed in to change notification settings - Fork 132
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
Update SVG interfaces to use mixins where possible in all SVG specs. Issue #353 #376
Conversation
You might want to rename the section titles accordingly, too. |
You mean the "Interface" headlines? If I am right currently, Peters script relies on patterns to detect IDL interfaces in the SVG spec. |
@plinss can you in/confirm and possibly fix? |
The is a heuristic that marks section headings as an interface definition, if the heading’s anchor starts with “Interface”, and the heading text starts with “Interface “. This was put in for the old SVG spec. I can update the heuristic if necessary, but you can also simply put a ‘data-dfn-type=interface’ attribute on the header if you’re going to edit it (the heuristics were meant to capture data from old specs without having to update them, if you’re editing the spec, or writing a new one, better to be explicit). |
@tobie What do you propose as headline pattern for the mixins? |
@plinss Thanks a lot for your comment. |
DOM uses "Mixin Foo," HTML: "The Foo Mixin." |
@tobie "Mixin Foo" seems more in line with the interface definitions in SVG. @plinss Currently we use |
Ah, good catch. When the heuristics match, the spec parser also synthesizes linking text from the heading content (whatever was after “Interface “). To keep that working, also add a ‘data-lt’ attribute, e.g. ‘data-lt=SVGAnimatedPoints’. Agreed to not change the ID. |
Any update on this? Would be great to get it merged. We need this merged before we can include tabindex/focus/blur/dataset as a mixin from HTML. whatwg/html#3543 (I'm writing tests for that now as part of the SVG2 §4 testing task I was given) |
In general, I'm supportive of the change. My main concern for reviewing is to make sure that you've caught all the relevant references. Below I summarize the changes made & the checks I made against them: The following have been converted from
Those are all the eligible In addition, the following mixins defined in the HTML standard are now references as
However, those interfaces are still being linked to W3C HTML 5.1 definitions, which used the Also note that there is an open issue about conflicts implementing The only other potentially-mixin interface implemented in SVG is Final comment: There should be an edit made to the changes appendix describing these changes (one line in the "changes to the entire spec" section should be fine). That & a WG decision on cross-linking to the HTML specs, and I'd be able to sign off on this PR. |
For CSSOM the PR is w3c/csswg-drafts#2123 |
FWIW Edge implements GetSVGDocument as a mixin for both SVG and HTML interfaces. I guess we should have an issue either here or on HTML to decide which way to go. Yeah HTMLHyperlinkElementUtils is outside of this, but AFAICT no one supports it on SVG. |
CSSOM has been updated now, so we just need to point to that to solve that particular problem. |
Naïve newbie question: is it strictly necessary for W3C HTML to update to the new WebIDL syntax for mixins for us to change to the new syntax for including them on our interfaces? They`re still mixins in the old syntax. just that there was no official WebIDL syntax for expressing that cleanly. If so maybe one of my ex-Opera chums @brucelawson @cynthia , @patricia-gallardo , @shwetank, can help with merging that change into the W3C version (still doesn't help that we still reference 5.1) |
I'm certainly not an expert on Web IDL syntax. It might not make a big deal. The Web IDL spec clearly describes the old usage of
We could at least update our definitions to use https://www.w3.org/TR/html/ or https://www.w3.org/TR/html5/ as the base URL, which currently point to 5.2, but would get updated when 5.3 is published. If it's likely that 5.3 will include the new IDL syntax and get published before we next update an SVG 2 CR, that would solve that issue without a W3C vs WHATWG debate. @dirkschulze
If you're not likely to get to it in the next week or so, I suspect that @dstorey would make the changes if you asked. |
Also pinging @tobie on the question about if it is ok to use the new mixin syntax if the spec we reference that defines the mixin hasn't updated yet. He wrote the PR so will probably known. |
@dstorey Is this still the case with master? I don't think anyone plans to update 5.1. |
Well, technically that behavior is unspecified. So, for example, the algorithm to get the exposure set of a WebIDL construct might return something completely weird. I'd suggest adding a note to the spec that says included interfaces must be treated as if it they were interface mixins… and aim to get that fixed as soon as possible. |
It's still the case with the Editor's Draft, and I don't see any PR or issues discussing the mixin syntax as an option. |
@AmeliaBR That is good to know - feel free to raise an issue about this if you think this needs to be looked into. |
One other change required: We'll need to update the references to point to the "living standard" version of WebIDL (AKA, the Editor's Draft), instead of the TR Level 1. (Unless @tobie or @heycam tell us that there is a likelihood of a TR Level 2 spec with the updated syntax in the near future.) Use SpecRef as the basis for the markup (we are, sadly, not automagically linked to them). |
Is this something you're still able to get time to do @dirkschulze ? I believe this is just updating the change log and references now. |
@AmeliaBR wrote:
I'm not too sure what the story around the WebIDL leveled specs is, tbh. Nor do I know who's in charge of publishing these or what their timeline is, if any. I recommend treating WebIDL as a living standard. |
@dstorey I will do the suggested edits by @AmeliaBR in #376 (comment) in the next couple of days. |
Thanks @dirkschulze! If we go ahead with #60, we'll probably update the HTML references again, to point to WHATWG, but this is an improvement for now. |
I can make that change. The change is already in HTML and I need WHATWG references for other changes |
@tobie Could you verify please?
Need to build locally before submitting.
The PR addresses issue #353.