This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21718 - xrefs are broken
Summary: xrefs are broken
Status: RESOLVED INVALID
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM View (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 21828
  Show dependency treegraph
 
Reported: 2013-04-16 13:55 UTC by Simon Pieters
Modified: 2013-08-08 13:28 UTC (History)
1 user (show)

See Also:


Attachments

Description Simon Pieters 2013-04-16 13:55:04 UTC
https://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#widl-Window-scrollTo-void-long-x-long-y

[[
When the scrollTo operation is invoked, the user agent must act as if the    scroll() method was invoked with the same arguments.
]]

The "scroll()" part is intended to be a link to the definition of scroll(). However, the build script does two things wrong that causes Anolis to not create an xref for it:

cssom-generate.js

    var IDL_ID_PREFIX = 'widl';

should be

    var IDL_ID_PREFIX = 'dom';

(to match the old style of IDs that the references use)

Second, the generated markup for a definition is:

<dt class="method" id="widl-Window-scroll-void-long-x-long-y">
<code>scroll</code> (....

Anolis needs a <dfn> element to make xrefs, so it should be something like:

<dt class="method">
<dfn id="dom-Window-scroll"><code>scroll</code></dfn> (...

I'm not sure how overloads are currently handled, maybe we should include the arguments in the ID though I personally prefer having a single definition of an overloaded method...
Comment 1 Glenn Adams 2013-04-26 00:19:08 UTC
(In reply to comment #0)
> https://dvcs.w3.org/hg/csswg/raw-file/tip/cssom-view/Overview.html#widl-
> Window-scrollTo-void-long-x-long-y
> 
> [[
> When the scrollTo operation is invoked, the user agent must act as if the   
> scroll() method was invoked with the same arguments.
> ]]
> 
> The "scroll()" part is intended to be a link to the definition of scroll().
> However, the build script does two things wrong that causes Anolis to not
> create an xref for it:
> 
> cssom-generate.js
> 
>     var IDL_ID_PREFIX = 'widl';
> 
> should be
> 
>     var IDL_ID_PREFIX = 'dom';
> 
> (to match the old style of IDs that the references use)
> 
> Second, the generated markup for a definition is:
> 
> <dt class="method" id="widl-Window-scroll-void-long-x-long-y">
> <code>scroll</code> (....
> 
> Anolis needs a <dfn> element to make xrefs, so it should be something like:
> 
> <dt class="method">
> <dfn id="dom-Window-scroll"><code>scroll</code></dfn> (...
> 
> I'm not sure how overloads are currently handled, maybe we should include
> the arguments in the ID though I personally prefer having a single
> definition of an overloaded method...

Made some progress on this, but some further work is required.

(1) should use 'widl-' not 'dom-' prefixes in title, refs, etc., when referring to cssom related idl defined terms; 'dom-' is reserved for DOM-4 related interfaces;

(2) pre-processor now wraps member term definitions with anolis compatible dfn;
Comment 2 Simon Pieters 2013-04-26 09:29:50 UTC
(In reply to comment #1)

> Made some progress on this, but some further work is required.

Thanks!

> (1) should use 'widl-' not 'dom-' prefixes in title, refs, etc., when
> referring to cssom related idl defined terms; 'dom-' is reserved for DOM-4
> related interfaces;

No, dom- is used in various specs (e.g. HTML), not just the DOM spec. I'd prefer to use the dom- naming convention.

> (2) pre-processor now wraps member term definitions with anolis compatible
> dfn;

Great.
Comment 3 Glenn Adams 2013-04-26 13:52:55 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > (1) should use 'widl-' not 'dom-' prefixes in title, refs, etc., when
> > referring to cssom related idl defined terms; 'dom-' is reserved for DOM-4
> > related interfaces;
> 
> No, dom- is used in various specs (e.g. HTML), not just the DOM spec. I'd
> prefer to use the dom- naming convention.

I disagree. I didn't invent the widl- prefix either. It is used by all documents created using respec.js, such as those in the WebApps WG and other WGs. It provides a more useful term that is neutral of the defining spec. If we were to change it, then cssom- would be more appropriate that dom-.

We no longer use the term DOM to describe the CSSOM et al functionality, so it isn't necessary or even appropriate to do so. As for the HTML spec, it is clearly defining the HTML DOM, so it isn't inappropriate to use the dom- prefix in that context.

Finally, nothing about anolis or pub tools relies on using one prefix versus another.
Comment 4 Simon Pieters 2013-05-15 11:38:17 UTC
BTW I think you need to set the title attribute instead of the id attribute to make xrefs work as intended. (Anolis will generate the id attribute.)