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 17760 - createPattern(canvas, null) now throws rather than 'repeat'
Summary: createPattern(canvas, null) now throws rather than 'repeat'
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML Canvas 2D Context (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: rcabanie
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on: 17891
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-12 15:56 UTC by kkrueger
Modified: 2012-08-20 23:33 UTC (History)
5 users (show)

See Also:


Attachments

Description kkrueger 2012-07-12 15:56:19 UTC
For compatibility and interoperability it would seem far safer to not throw an exception when createPattern(canvas, null) is used.  In the below list of browsers that treat this as a 'repeat' e.g. createPattern(canvas, 'repeat').

The previous version of the spec had a normative statement that matched the majority of browsers.  The latest version of the spec changed this normative statement.

Previous Spec
'If the empty string or null is specified, repeat must be assumed. If an unrecognized value is given, then the user agent must raise a SYNTAX_ERR exception'

Current working draft has changed to 
'If the empty string is specified, repeat must be assumed. If an unrecognized value is given, then the user agent must raise a SYNTAX_ERR exception.'


Treats null as 'repeat'
Firefox 13.1
Internet Explorer 9
Chrome 20

Opera 12 does indeed raise an exception when passed 'null'

Test Case
http://www.w3c-test.org/html/tests/submission/PhilipTaylor/canvas/2d.pattern.repeat.null.html
Related Bug
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17141
Comment 1 Ms2ger 2012-07-17 15:32:52 UTC
Nightly also throws.
Comment 2 contributor 2012-07-18 07:13:14 UTC
This bug was cloned to create bug 17891 as part of operation convergence.
Comment 3 Ms2ger 2012-08-15 17:13:19 UTC
Filter on [Idon'tcareaboutHTMLWGbugspam].
Comment 4 rcabanie 2012-08-15 17:29:02 UTC
This was a result of an update to the IDL, see:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=10640

I'm unsure if this was an intended change. Pinged the writer of the patch.
Comment 5 rcabanie 2012-08-16 00:58:10 UTC
(In reply to comment #4)
> This was a result of an update to the IDL, see:
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=10640
> 
> I'm unsure if this was an intended change. Pinged the writer of the patch.

Cameron McCormack says that this was an accidental change.
This should be reverted to the previous behavior.
Comment 7 Ian 'Hixie' Hickson 2012-08-20 23:33:12 UTC
(Please note that the WHATWG spec will not be taking this change, as it does not lead towards interop and is a technically worse state for the spec to be in.)