Closed
Bug 1082663
Opened 11 years ago
Closed 11 years ago
DOMMatrix does not implement stringifier from spec
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: potch, Assigned: cabanier, Mentored)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 4 obsolete files)
|
4.52 KB,
patch
|
Details | Diff | Splinter Review |
From the spec: http://dev.w3.org/fxtf/geometry/Overview.html#dom-dommatrixreadonly-stringifier
> In this example, a matrix is created and several 2D transformation methods are called:
>
> var matrix = new DOMMatrix();
> matrix.scaleSelf(2);
> matrix.translateSelf(20,20);
>
> Calling matrix.toString() returns the DOMString:
>
> "matrix(2, 0, 0, 2, 20, 20)"
In Firefox this prints "[object DOMMatrix]".
Comment 1•11 years ago
|
||
Looks like this got added after we added the DOMMatrix implementation.
Mentor: bzbarsky
| Assignee | ||
Comment 2•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #1)
> Looks like this got added after we added the DOMMatrix implementation.
Can you tell me how I mark this up in the IDL? I'll implement it ASAP.
| Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(bzbarsky)
Comment 3•11 years ago
|
||
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → cabanier
| Assignee | ||
Comment 5•11 years ago
|
||
| Assignee | ||
Comment 6•11 years ago
|
||
Attachment #8505256 -
Attachment is obsolete: true
| Assignee | ||
Comment 7•11 years ago
|
||
Attachment #8505258 -
Attachment is obsolete: true
| Assignee | ||
Updated•11 years ago
|
Attachment #8505256 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•11 years ago
|
Attachment #8505260 -
Flags: review?(bzbarsky)
| Assignee | ||
Updated•11 years ago
|
Attachment #8505256 -
Flags: review?(bzbarsky)
Comment 8•11 years ago
|
||
Comment on attachment 8505260 [details] [diff] [review]
Fix + test for stringification of DOMMatrix
Where does the getStringRepresentation bit come from? You just want:
stringifier;
in the IDL and call the method Stringify in the C++. What you're doing actually adds a getStringRepresentation method to the object, which is very much not desirable in this case.
Also, you don't need to define it on DOMMatrix; just putting it on DOMMatrixReadonly is enough.
r=me with those fixed
Attachment #8505260 -
Flags: review?(bzbarsky) → review+
| Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #8)
> Comment on attachment 8505260 [details] [diff] [review]
> Fix + test for stringification of DOMMatrix
>
> Where does the getStringRepresentation bit come from? You just want:
>
> stringifier;
>
> in the IDL and call the method Stringify in the C++. What you're doing
> actually adds a getStringRepresentation method to the object, which is very
> much not desirable in this case.
>
> Also, you don't need to define it on DOMMatrix; just putting it on
> DOMMatrixReadonly is enough.
>
> r=me with those fixed
I tried that first.
Adding 'stringifier' to the IDL didn't do anything so I switched to adding the method to DOMMatrixReadOnly. Then I noticed that that wouldn't stringify DOMMatrix, so I added it to the IDL if DOMMatrix. (I'll double check if just adding stringifier works today once my mac has finished reinstalling)
Comment 10•11 years ago
|
||
> Adding 'stringifier' to the IDL didn't do anything
Should work.
> Then I noticed that that wouldn't stringify DOMMatrix
Whyever not? It just puts a toString on the proto, and the proto of DOMMatrix chains up to the proto of DOMMatrixReadonly.
| Assignee | ||
Comment 11•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #10)
> > Adding 'stringifier' to the IDL didn't do anything
>
> Should work.
I tried and that did work.
> > Then I noticed that that wouldn't stringify DOMMatrix
>
> Whyever not? It just puts a toString on the proto, and the proto of
> DOMMatrix chains up to the proto of DOMMatrixReadonly.
No, putting it only on the DOMMatrixReadonly object didn't work.
See try build: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=53edc37b85c0
Try build where DOMMatrix also has stringifier:
https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=86069ea6f0fd
Flags: needinfo?(bzbarsky)
| Assignee | ||
Comment 12•11 years ago
|
||
Attachment #8505260 -
Attachment is obsolete: true
Comment 13•11 years ago
|
||
> No, putting it only on the DOMMatrixReadonly object didn't work.
Ah. This looks like a bug in the bindings codegen to me. We don't actually set up stringifiers for non-concrete interfaces, which is wrong.
Bug 1083591 filed.
Flags: needinfo?(bzbarsky)
| Assignee | ||
Comment 14•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #13)
> > No, putting it only on the DOMMatrixReadonly object didn't work.
>
> Ah. This looks like a bug in the bindings codegen to me. We don't actually
> set up stringifiers for non-concrete interfaces, which is wrong.
>
> Bug 1083591 filed.
Do I need to wait until that bug is fixed?
Flags: needinfo?(bzbarsky)
Comment 15•11 years ago
|
||
It might be a good idea, so we don't add stuff that we then have to immediately remove.
I expect that bug to be fixed within the next day or two (patch is up, just needs review), so I don't think waiting is unreasonable.
Flags: needinfo?(bzbarsky)
| Assignee | ||
Comment 16•11 years ago
|
||
Attachment #8505847 -
Attachment is obsolete: true
| Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 17•11 years ago
|
||
Keywords: checkin-needed
Comment 18•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Blocks: geometry-1
You need to log in
before you can comment on or make changes to this bug.
Description
•