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 17507 - Wrong IDL in definition of HitRegionOptions
Summary: Wrong IDL in definition of HitRegionOptions
Status: RESOLVED WORKSFORME
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-16 10:44 UTC by contributor
Modified: 2012-08-24 00:45 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2012-06-16 10:44:21 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html
Multipage: http://www.whatwg.org/C#2dcontext
Complete: http://www.whatwg.org/c#2dcontext

Comment:
In dictionary HitRegionOptions {   Path? path = null;	DOMString id = '';

Posted from: 84.182.211.110
User agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.34 Safari/536.11
Comment 1 Wolfgang Keller 2012-06-16 10:52:55 UTC
In the IDL of HitRegionOptions we have

dictionary HitRegionOptions {
  // [snip]
  DOMString id = '';
  // [snap]
};

If we look at the current version of the WebIDL draft the definition of the nonterminal DefaultValue (which is used for the part after the equal sign) we see (http://dev.w3.org/2006/webapi/WebIDL/#proddef-DefaultValue):

[16]	DefaultValue	→	ConstValue 
 | string

'' is surely not a ConstValue, since the definition of this nonterminal is (http://www.w3.org/TR/WebIDL/#prod-ConstValue):

[27]	ConstValue	→	BooleanLiteral 
 | FloatLiteral 
 | integer 
 | "null"

Thus '' have to be the terminal named "string"

This is defined as (http://dev.w3.org/2006/webapi/WebIDL/#prod-string)

string	=	"[^"]*"

In other words: it has to begin with a double quote - not a single quote.

To solve this bug we either should change the IDL of HitRegionOptions to

dictionary HitRegionOptions {
  // [snip]
  DOMString id = ""; // Note the double quotes
  // [snap]
};

or allow in the definition of WebIDL to let strings enclosed in single quotes.
Comment 2 contributor 2012-07-18 17:46:38 UTC
This bug was cloned to create bug 18233 as part of operation convergence.
Comment 3 Ian 'Hixie' Hickson 2012-08-24 00:45:30 UTC
This got fixed as part of my fixing various IDL errors recently.