[Bug 17507] Wrong IDL in definition of HitRegionOptions

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17507

Wolfgang Keller <wolfgangkeller@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
                 CC|                            |wolfgangkeller@gmail.com
            Summary|In dictionary               |Wrong IDL in definition of
                   |HitRegionOptions {   Path?  |HitRegionOptions
                   |path = null;   DOMString id |
                   |= '';                       |

--- Comment #1 from Wolfgang Keller <wolfgangkeller@gmail.com> 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.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Saturday, 16 June 2012 10:52:57 UTC