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 14913 - No way to specify [OverrideBuiltins] if the getter is in a partial interface
Summary: No way to specify [OverrideBuiltins] if the getter is in a partial interface
Status: CLOSED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-23 17:38 UTC by Aryeh Gregor
Modified: 2011-12-29 16:22 UTC (History)
4 users (show)

See Also:


Attachments

Description Aryeh Gregor 2011-11-23 17:38:09 UTC
HTML currently has [OverrideBuiltins] partial interface Document { ... }, which is invalid because you can't have extended attributes on a partial interface.  But DOM4 can't add [OverrideBuiltins] to the actual Document interface definition, because that defines no getter.

Suggested resolution: allow [OverrideBuiltins] on partial interfaces, and say it has the same effect as if it was specified on the original interface.  So the partial interface can add that extended attribute too, not just members.
Comment 1 Ian 'Hixie' Hickson 2011-11-23 17:58:10 UTC
By just restricting it to the interface or partial interface that has the getter, we can neatly solve the problem of it being unclear which interface should have it.
Comment 2 Cameron McCormack 2011-12-09 06:07:17 UTC
The non-localised effects of extended attributes on partial interface definitions is exactly what I was trying to avoid with the current spec restrictions.  Ian's comment 1 suggestion does neatly get around that problem.

(An alternative would be to write in HTML

  [NoInterfaceObject,OverrideBuiltins]
  interface DocumentProperties {
    getter ...;
  };
  Document implements DocumentProperties;

.)
Comment 3 Cameron McCormack 2011-12-15 03:18:50 UTC
I've done comment 1.

http://dev.w3.org/cvsweb/2006/webapi/WebIDL/Overview.xml.diff?r1=1.421;r2=1.422;f=h

Aryeh, let me know if this change is satisfactory, thanks.
Comment 4 Aryeh Gregor 2011-12-28 18:03:47 UTC
AFAICT, the grammar still doesn't allow extended attributes on partial interfaces, although the prose now does.
Comment 5 Cameron McCormack 2011-12-29 00:24:37 UTC
You were right.  I fixed this yesterday as part of the callback edit.
Comment 6 Aryeh Gregor 2011-12-29 16:22:15 UTC
Oh, I misread.  Never mind me.  Updated WebIDLParser.js and idlharness.js:

https://github.com/ayg/webidl.js/commit/ebed0073
http://dvcs.w3.org/hg/html/rev/c0952a1118d7