Closed
Bug 826740
Opened 12 years ago
Closed 11 years ago
Convert HTMLCanvasElement to WebIDL
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: ehsan.akhgari, Assigned: Ms2ger)
References
(Blocks 1 open bug)
Details
Attachments
(7 files, 1 obsolete file)
7.16 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
4.09 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
6.24 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
7.22 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
5.99 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
16.87 KB,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
946 bytes,
patch
|
khuey
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Reporter | ||
Updated•12 years ago
|
Assignee: nobody → ehsan
Reporter | ||
Comment 1•12 years ago
|
||
I hit this error when converting canvas: Traceback (most recent call last): File "/Users/ehsanakhgari/moz/mozilla-central/config/pythonpath.py", line 56, in <module> main(sys.argv[1:]) File "/Users/ehsanakhgari/moz/mozilla-central/config/pythonpath.py", line 48, in main execfile(script, frozenglobals) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/BindingGen.py", line 66, in <module> main() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/BindingGen.py", line 61, in main generate_binding_cpp(config, outputPrefix, webIDLFile); File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/BindingGen.py", line 29, in generate_binding_cpp if replaceFileIfChanged(filename, root.define()): File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 7058, in define return stripTrailingWhitespace(self.root.define()) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 350, in define defn = self.child.define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 350, in define defn = self.child.define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 350, in define defn = self.child.define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 279, in define return self.join(child.define() for child in self.children if child is not None) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 275, in join return self.joiner.join(filter(lambda s: len(s) > 0, (child for child in generator))) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 275, in <genexpr> return self.joiner.join(filter(lambda s: len(s) > 0, (child for child in generator))) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 279, in <genexpr> return self.join(child.define() for child in self.children if child is not None) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 350, in define defn = self.child.define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 350, in define defn = self.child.define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 350, in define defn = self.child.define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 350, in define defn = self.child.define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 350, in define defn = self.child.define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 279, in define return self.join(child.define() for child in self.children if child is not None) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 275, in join return self.joiner.join(filter(lambda s: len(s) > 0, (child for child in generator))) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 275, in <genexpr> return self.joiner.join(filter(lambda s: len(s) > 0, (child for child in generator))) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 279, in <genexpr> return self.join(child.define() for child in self.children if child is not None) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 6460, in define return self.cgRoot.define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 350, in define defn = self.child.define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 350, in define defn = self.child.define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 350, in define defn = self.child.define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 279, in define return self.join(child.define() for child in self.children if child is not None) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 275, in join return self.joiner.join(filter(lambda s: len(s) > 0, (child for child in generator))) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 275, in <genexpr> return self.joiner.join(filter(lambda s: len(s) > 0, (child for child in generator))) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 279, in <genexpr> return self.join(child.define() for child in self.children if child is not None) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 315, in define defn = self.child.define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 736, in define return "" if self.inline else self._define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 734, in _define return self.definition_prologue() + "\n" + self.definition_body() + self.definition_epilogue() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 4321, in definition_body self.descriptor, self.method).define() File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 3864, in __init__ self.cgRoot = CGList([ CGIndenter(getPerSignatureCall(signature)) ]) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 3855, in getPerSignatureCall method, argConversionStartsAt) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 3741, in __init__ static)) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 3627, in __init__ resultAlreadyAddRefed) File "/Users/ehsanakhgari/moz/mozilla-central/dom/bindings/Codegen.py", line 3593, in getRetvalDeclarationForType raise TypeError("Need to sort out ownership model for union retvals"); TypeError: Need to sort out ownership model for union retvals I suspect this is because of the getContext function. Also, I came across a discrepancy which I filed as bug 827138.
Reporter | ||
Comment 2•12 years ago
|
||
Reporter | ||
Updated•11 years ago
|
Assignee: ehsan → nobody
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → Ms2ger
OS: Mac OS X → All
Hardware: x86 → All
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #731859 -
Flags: review?(khuey)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #731860 -
Flags: review?(khuey)
Assignee | ||
Comment 5•11 years ago
|
||
Also tried overloading xpc_qsUnwrapArg, but that's only called for objects, while we need it for primitives; and overloading won't work because DOMString and double aren't distinguishable per spec.
Attachment #698448 -
Attachment is obsolete: true
Attachment #731862 -
Flags: review?(khuey)
Assignee | ||
Comment 6•11 years ago
|
||
Attachment #731864 -
Flags: review?(khuey)
Assignee | ||
Comment 7•11 years ago
|
||
Attachment #731865 -
Flags: review?(khuey)
Assignee | ||
Comment 8•11 years ago
|
||
Attachment #731866 -
Flags: review?(khuey)
Assignee | ||
Comment 9•11 years ago
|
||
Attachment #731946 -
Flags: review?(khuey)
Attachment #731859 -
Flags: review?(khuey) → review+
Comment on attachment 731860 [details] [diff] [review] Part b: Remove unused arguments from nsIDOMHTMLCanvasElement Review of attachment 731860 [details] [diff] [review]: ----------------------------------------------------------------- r=me with comments addressed ::: dom/interfaces/html/nsIDOMHTMLCanvasElement.idl @@ -61,5 @@ > // toDataURL(); -- defaults to image/png > // toDataURL(type); -- uses given type > // toDataURL(type, params); -- uses given type, and any valid parameters > - [optional_argc] DOMString toDataURL([optional] in DOMString type, > - [optional] in nsIVariant params); This needs an IID change.
Attachment #731860 -
Flags: review?(khuey) → review+
Attachment #731862 -
Flags: review?(khuey) → review+
Attachment #731864 -
Flags: review?(khuey) → review+
Attachment #731865 -
Flags: review?(khuey) → review+
Comment on attachment 731866 [details] [diff] [review] Part f: Move HTMLCanvasElement to Paris bindings Review of attachment 731866 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/webidl/HTMLCanvasElement.webidl @@ +23,5 @@ > + [Pure, SetterThrows] > + attribute unsigned long height; > + > + [Throws] > + nsISupports? getContext(DOMString contextId, optional any contextOptions); Why doesn't this return "RenderingContext?"? @@ +29,5 @@ > + [Throws] > + DOMString toDataURL(optional DOMString type = "", > + optional any encoderOptions); > + [Throws] > + void toBlob(FileCallback _callback, optional DOMString? type = null); The spec doesn't have type as a nullable string ... is the spec wrong or are we? @@ +33,5 @@ > + void toBlob(FileCallback _callback, optional DOMString? type = null); > +}; > + > +// Mozilla specific bits > +partial interface HTMLCanvasElement { This is a neat trick.
Attachment #731946 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 12•11 years ago
|
||
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #11) > Comment on attachment 731866 [details] [diff] [review] > Part f: Move HTMLCanvasElement to Paris bindings > > Review of attachment 731866 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/webidl/HTMLCanvasElement.webidl > @@ +23,5 @@ > > + [Pure, SetterThrows] > > + attribute unsigned long height; > > + > > + [Throws] > > + nsISupports? getContext(DOMString contextId, optional any contextOptions); > > Why doesn't this return "RenderingContext?"? Bug 858217. > @@ +29,5 @@ > > + [Throws] > > + DOMString toDataURL(optional DOMString type = "", > > + optional any encoderOptions); > > + [Throws] > > + void toBlob(FileCallback _callback, optional DOMString? type = null); > > The spec doesn't have type as a nullable string ... is the spec wrong or are > we? It doesn't matter, but I'll make this non-nullable.
Comment on attachment 731866 [details] [diff] [review] Part f: Move HTMLCanvasElement to Paris bindings Review of attachment 731866 [details] [diff] [review]: ----------------------------------------------------------------- r=me with what we agreed to on irc
Attachment #731866 -
Flags: review?(khuey) → review+
Assignee | ||
Comment 14•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a2326f2d2fea https://hg.mozilla.org/mozilla-central/rev/be3d2fce568d https://hg.mozilla.org/mozilla-central/rev/61b2c7597a8f https://hg.mozilla.org/mozilla-central/rev/69516514842f https://hg.mozilla.org/mozilla-central/rev/cdd115e6d58e https://hg.mozilla.org/mozilla-central/rev/72844eee2060 https://hg.mozilla.org/mozilla-central/rev/49b4328c90ff
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•