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
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
Depends on:
Reported: 2012-06-16 10:44 UTC by contributor
Modified: 2012-08-24 00:45 UTC (History)
3 users (show)

See Also:


Description contributor 2012-06-16 10:44:21 UTC

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

Posted from:
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 (

[16]	DefaultValue	→	ConstValue 
 | string

'' is surely not a ConstValue, since the definition of this nonterminal is (

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

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

This is defined as (

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.