The default bug view has changed. See this FAQ.

createPattern should allow null for the repeat argument

RESOLVED FIXED in Firefox 16

Status

()

Core
Canvas: 2D
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

({regression})

unspecified
mozilla17
x86
Mac OS X
regression
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox16+ fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Apparently it used to, and other UAs do that too.  And the spec changed recently to allow it.

This means backing out part of bug 762657.

We should probably try to get this into aurora.

Comment 1

5 years ago
If peterv agrees, I have no issue with backing out bug 762657 prior to the merge.

If not, I'd need to know more context about the user impact. Sounds like we're just not ready to meet the spec though.
Assignee: nobody → peterv
We don't want to back out bug 762657.  We just need to back out the xpidl change and part of the test changes.

The user impact is that createPattern calls that used to work and should work per the updated spec throw on m-c and aurora right now.

I'm going to have a patch for this very soon.
Assignee: peterv → bzbarsky
I'm going to make this nullable for now in the WebIDL, but the right solution is actually [TreatNullAs=EmptyString].  That would need bug 742195, which is not happening on Aurora.
I filed bug 784869 to do the "throw on undefined" thing.
Created attachment 654444 [details] [diff] [review]
Allow null for the repeat argument of canvas createPattern.
Attachment #654444 - Flags: review?(peterv)
Whiteboard: [need review]
The spec hasn't changed to allow it, and Opera throws as well. See <https://www.w3.org/Bugs/Public/show_bug.cgi?id=17891>.
Attachment #654444 - Flags: review?(peterv) → review+
> The spec hasn't changed to allow it

Rik's editor's draft has...

I believe we should take this to mitigate risk for shipping the webidl canvas stuff, personally.  And I don't see the benefit of switching behavior in a way that might break web pages, honestly.
Sigh... Can we at least not use "the spec" to refer to the W3C fork without qualification?
<shrug>.  I've lost tracks of all the various "specs" involved.
https://hg.mozilla.org/integration/mozilla-inbound/rev/b88ccf7bd3e3
Flags: in-testsuite+
Whiteboard: [need review]
Target Milestone: --- → mozilla17
Comment on attachment 654444 [details] [diff] [review]
Allow null for the repeat argument of canvas createPattern.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 762657
User impact if declined: Some sites might throw exceptions that they don't expect
Testing completed (on m-c, etc.): Passes our tests, as far as I can tell.
Risk to taking this patch (and alternatives if risky): Risk is low.  Just allows
   passing null (and undefined) for the second argument to createPattern,
   basically restoring the Firefox 15 behavior.
String or UUID changes made by this patch: None.
Attachment #654444 - Flags: approval-mozilla-aurora?
Sorry, I backed this out because test_canvas.html was failing on Linux.
https://hg.mozilla.org/integration/mozilla-inbound/rev/2266e0721327
Gah.  Because that's a non-azure canvas, so the test result is different for the moment.  I'm just going to comment that test for undefined out for now.
Created attachment 654796 [details] [diff] [review]
With the test fixed on non-Azure canvas
Attachment #654796 - Flags: approval-mozilla-aurora?
Attachment #654444 - Attachment is obsolete: true
Attachment #654444 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/integration/mozilla-inbound/rev/1bed30d952cc

Updated

5 years ago
tracking-firefox16: ? → +
https://hg.mozilla.org/mozilla-central/rev/1bed30d952cc
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Comment on attachment 654796 [details] [diff] [review]
With the test fixed on non-Azure canvas

[Triage Comment]
Low risk regression fix, approved for Beta 16.
Attachment #654796 - Flags: approval-mozilla-aurora? → approval-mozilla-beta+
https://hg.mozilla.org/releases/mozilla-beta/rev/57ce663f5d6f
status-firefox16: --- → fixed
You need to log in before you can comment on or make changes to this bug.