Bug 15931 - WebIDL snippets need updating
Summary: WebIDL snippets need updating
Alias: None
Product: CSS
Classification: Unclassified
Component: Regions (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Vincent Hardy
QA Contact: public-css-bugzilla
Whiteboard: cssom
Depends on:
Reported: 2012-02-07 20:26 UTC by Ms2ger
Modified: 2012-03-15 17:58 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Ms2ger 2012-02-07 20:26:32 UTC
There are various bugs in the WebIDL blocks:

> [Supplemental] interface Document {
>   NamedFlow getFlowByName(DOMString name);
>   NamedFlowCollection getNamedFlows();
> };

'[Supplemental]' should be 'partial'.

> interface NamedFlowCollection {
>     readonly attribute unsigned long length;
>     caller getter NamedFlow item (in unsigned long index);
> }

Trailing semicolon is missing.

'caller' should not be used, as it should only be used for legacy features (document.all). See <http://dev.w3.org/2006/webapi/WebIDL/#idl-legacy-callers>.

The specification does not list the 'supported property indices', as required by the WebIDL specification (<http://dev.w3.org/2006/webapi/WebIDL/#idl-indexed-properties>).

Furthermore, as item() can return null, the return type must be 'NamedFlow?', including the question mark.

'in' is also no longer supported.

> [Supplemental] interface Element {
>     readonly attribute DOMString regionOverflow;
>     getter Range[] getRegionFlowRanges();
> };

Again, 'partial'.

'getter's must take exactly one argument (either unsigned long or DOMString). In fact, this should probably be

|     readonly attribute Range[] regionFlowRanges;

as there doesn't seem to be a compelling reason to use a function.

Finally, a normative reference to the WebIDL specification is missing, which strictly speaking means that these snippets are meaningless.
Comment 1 Vincent Hardy 2012-03-15 01:40:54 UTC
Implemented the requested changes in:


The only difference is for regionFlowRanges which I re-specified as:


Because this is meant to return a new array instance on each call and it is not meant to be a live list.

I'll close this after 48h if you (Ms2ger) have no objection.

Comment 2 Ms2ger 2012-03-15 17:37:47 UTC
Looks good, thanks.
Comment 3 Vincent Hardy 2012-03-15 17:58:22 UTC
Thanks for the review. Closing the bug now.