Closed
Bug 824327
Opened 12 years ago
Closed 12 years ago
Convert direct subclasses of SVGElement to WebIDL
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: dzbarsky, Assigned: dzbarsky)
References
Details
Attachments
(8 files, 7 obsolete files)
11.90 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
21.63 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
16.21 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
33.73 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
12.21 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
27.26 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
24.38 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
2.78 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #695429 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 2•12 years ago
|
||
Attachment #695430 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #695432 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 4•12 years ago
|
||
Attachment #695590 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #695592 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•12 years ago
|
Summary: Convert SVGDescElement, SVGTitleElement, SVGStyleElement, SVGStopElement to WebIDL → Convert SVGDescElement, SVGTitleElement, SVGStyleElement, SVGStopElement, SVGMetadataElement to WebIDL
Assignee | ||
Updated•12 years ago
|
Summary: Convert SVGDescElement, SVGTitleElement, SVGStyleElement, SVGStopElement, SVGMetadataElement to WebIDL → Convert SVGDescElement, SVGTitleElement, SVGStyleElement, SVGStopElement, SVGMetadataElement, SVGMPathElement to WebIDL
Assignee | ||
Comment 6•12 years ago
|
||
Attachment #695606 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•12 years ago
|
Summary: Convert SVGDescElement, SVGTitleElement, SVGStyleElement, SVGStopElement, SVGMetadataElement, SVGMPathElement to WebIDL → Convert direct subclasses of SVGElement to WebIDL
Assignee | ||
Comment 7•12 years ago
|
||
Attachment #695430 -
Attachment is obsolete: true
Attachment #695430 -
Flags: review?(bzbarsky)
Attachment #695671 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 8•12 years ago
|
||
Attachment #695432 -
Attachment is obsolete: true
Attachment #695432 -
Flags: review?(bzbarsky)
Attachment #695672 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 9•12 years ago
|
||
Attachment #695590 -
Attachment is obsolete: true
Attachment #695590 -
Flags: review?(bzbarsky)
Attachment #695673 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 10•12 years ago
|
||
Attachment #695592 -
Attachment is obsolete: true
Attachment #695592 -
Flags: review?(bzbarsky)
Attachment #695674 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 11•12 years ago
|
||
Attachment #695606 -
Attachment is obsolete: true
Attachment #695606 -
Flags: review?(bzbarsky)
Attachment #695676 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 12•12 years ago
|
||
Attachment #695678 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 13•12 years ago
|
||
Attachment #695683 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 14•12 years ago
|
||
Attachment #695683 -
Attachment is obsolete: true
Attachment #695683 -
Flags: review?(bzbarsky)
Attachment #696244 -
Flags: review?(bzbarsky)
![]() |
||
Comment 15•12 years ago
|
||
Comment on attachment 695429 [details] [diff] [review]
Part 1: Add a namespaced version of NS_NewxxxSVGElement
Why this instead of keeping the NS_NewSVGWhateverElement functions but either use a different macro name (as this patch) that creates the namespaced version or do what Peter did for HTML and have the existing macro auto-detect the element concrete class?
Assignee | ||
Comment 16•12 years ago
|
||
Attachment #697665 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•12 years ago
|
Attachment #695429 -
Attachment is obsolete: true
Attachment #695429 -
Flags: review?(bzbarsky)
![]() |
||
Comment 17•12 years ago
|
||
Comment on attachment 697665 [details] [diff] [review]
Part 1: Add a namespaced version of NS_NewxxxSVGElement
r=me
Attachment #697665 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 18•12 years ago
|
||
Comment on attachment 695671 [details] [diff] [review]
SVGDescElement
>+#ifndef SVGDescElement_h
I think Peter and I have been using mozilla_dom_SVGDescElement_h
r=me with that and the NS_New thing updated.
Attachment #695671 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 19•12 years ago
|
||
Comment on attachment 695671 [details] [diff] [review]
SVGDescElement
Oh and:
>+#include "SVGDescElement.h"
I'd prefer mozilla/dom/SVGDescElement.h. Yes, that can matter on Windows, kinda.
![]() |
||
Comment 20•12 years ago
|
||
Comment on attachment 695672 [details] [diff] [review]
SVGTitleElement
>+++ b/browser/base/content/browser.js
Probably better, for now, to set 'hasInstanceInterface': 'nsIDOMSVGTitleElement' in Bindings.conf for SVGTitleElement. Especially because you missed a comm-central use equivalent to the one here...
>+++ b/content/svg/content/src/SVGTitleElement.cpp
>+#include "SVGTitleElement.h"
mozilla/dom/SVGTitleElement.h
>+++ b/content/svg/content/src/SVGTitleElement.h
>+#ifndef SVGTitleElement_h
And mozilla_dom_SVGTitleElement_h
>+ virtual JSObject* WrapNode(JSContext *aCx, JSObject *aScope, bool *aTriedToWrap);
MOZ_OVERRIDE. I missed that on SVGDescElement, so add it there too?
r=me with those nits.
Attachment #695672 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 21•12 years ago
|
||
Comment on attachment 695673 [details] [diff] [review]
SVGStopElement
>+++ b/content/svg/content/src/SVGStopElement.cpp
>+#include "SVGStopElement.h"
mozilla/dom/SVGStopElement.h
>+// sSVGElement methods
Drop that first 's' too?
>+++ b/content/svg/content/src/SVGStopElement.h
>+#ifndef SVGStopElement_h
mozilla_dom_SVGStopElement_h
r=me
Attachment #695673 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 22•12 years ago
|
||
Comment on attachment 695674 [details] [diff] [review]
SVGStyleElement
>+++ b/content/svg/content/src/SVGStyleElement.cpp
>+#include "SVGStyleElement.h"
mozilla/dom/SVGStyleElement.h
>+++ b/content/svg/content/src/SVGStyleElement.h
>+#ifndef SVGStyleElement_h
mozilla_dom_SVGStyleElement_h
How about we assume those two comments for all these patches and I stop making them?
>+++ b/dom/webidl/SVGStyleElement.webidl
>+ attribute DOMString xmlspace; // Spec claims this should be on SVGElement
>+ attribute DOMString type;
>+ attribute DOMString media;
>+ attribute DOMString title;
These should all be [SetterThrows]. You can use the XPCOM getters fine, but the setters will need to look somewhat like SetHTMLAttr (the version that takes an ErrorResult).
Maybe we should hoist an equivalent of SetHTMLAttr on Element...
r=me with that fixed.
Attachment #695674 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 23•12 years ago
|
||
Comment on attachment 695676 [details] [diff] [review]
SVGMetadataElement
With the usual bits about the include guard and the #include in the cpp, r=me.
Attachment #695676 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 24•12 years ago
|
||
Comment on attachment 695678 [details] [diff] [review]
SVGMPathElement
With the usual bits about the include guard and the #include in the cpp, r=me.
Attachment #695678 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 25•12 years ago
|
||
Comment on attachment 696244 [details] [diff] [review]
SVGScriptElement
>+++ b/content/html/content/test/reflect.js
Peter has convinced me that we should do the explicit list thing here... Would you mind doing that?
It looks like the SVGScriptElement.h was created via hg add, not hg cp. I'd prefer hg cp.
Usual comments about the include guard and #include line.
Usual comment about MOZ_OVERRIDE on WrapNode (which I think I forgot on some earlier patches).
>+++ b/dom/webidl/SVGScriptElement.webidl
>+ attribute DOMString type;
>+ attribute DOMString crossOrigin;
Both of these need to be [SetterThrows]; see comments above for SVGStyleElement.
r=me with those fixed.
Attachment #696244 -
Flags: review?(bzbarsky) → review+
Comment 26•12 years ago
|
||
Comment on attachment 695678 [details] [diff] [review]
SVGMPathElement
Review of attachment 695678 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/webidl/SVGMPathElement.webidl
@@ +10,5 @@
> + * liability, trademark and document use rules apply.
> + */
> +
> +interface SVGMPathElement : SVGElement {
> +};
Hrm, this used to be called SVGMpathElement (lower case p), no? If so, you'll probably need to add something to a test_interfaces.html
Assignee | ||
Comment 27•12 years ago
|
||
(In reply to :Ms2ger from comment #26)
> Comment on attachment 695678 [details] [diff] [review]
> SVGMPathElement
>
> Review of attachment 695678 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: dom/webidl/SVGMPathElement.webidl
> @@ +10,5 @@
> > + * liability, trademark and document use rules apply.
> > + */
> > +
> > +interface SVGMPathElement : SVGElement {
> > +};
>
> Hrm, this used to be called SVGMpathElement (lower case p), no? If so,
> you'll probably need to add something to a test_interfaces.html
I think XPConnect still exposes this interface as SVGMpathElement
Assignee | ||
Comment 28•12 years ago
|
||
Landed everything except SVGScriptElement.
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/68ded29fc68e
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/60c936f77dce
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/2a2fdd3161f8
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/00e9c72fa410
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/83dd11d6dc7f
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/c4470a13f216
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/13acd3b74386
Whiteboard: [leave open]
Assignee | ||
Comment 29•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #25)
> Comment on attachment 696244 [details] [diff] [review]
> SVGScriptElement
>
> >+++ b/content/html/content/test/reflect.js
>
> Peter has convinced me that we should do the explicit list thing here...
> Would you mind doing that?
>
reflect.js is only used for HTML elements and the SVG script element, so I think the easiest solution may be to convert HTMLScriptElement and land it at the same time as SVGScriptElement.
Comment 30•12 years ago
|
||
(In reply to David Zbarsky (:dzbarsky) from comment #27)
> > Hrm, this used to be called SVGMpathElement (lower case p), no? If so,
> > you'll probably need to add something to a test_interfaces.html
>
> I think XPConnect still exposes this interface as SVGMpathElement
It's SVGMPathElement in the spec, so I think it should be exposed as such.
Comment 31•12 years ago
|
||
Backed out in http://hg.mozilla.org/integration/mozilla-inbound/rev/9a315f39e03a for browser-chrome failures like https://tbpl.mozilla.org/php/getParsedLog.php?id=18479622&tree=Mozilla-Inbound.
![]() |
||
Comment 32•12 years ago
|
||
> so I think the easiest solution may be to convert HTMLScriptElement and land it at the
> same time as SVGScriptElement.
Makes sense to me.
> It's SVGMPathElement in the spec, so I think it should be exposed as such.
Yes, that's what this patch does. So we have Components.interfaces.nsIDOMSVGMpathElement but window.SVGMPathElement.
The failing test is testing the code that does instanceof SVGTitleElement. I'm fairly surprised that didn't work right, since the landed patch did have the hasInstanceInterface bit in it...
Assignee | ||
Comment 33•12 years ago
|
||
SVGTitleElement didn't have a QI entry for nsIDOMSVGTitleElement =(
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/1c9ec9784927
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/786f26d1302e
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/d42ed304bda1
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/5b57d2f7af3d
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/46e52ba374e0
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/c47eb8f76e9d
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/a0414feb9656
Assignee | ||
Comment 34•12 years ago
|
||
Pushed SVGScriptElement
https://hg.mozilla.org/integration/mozilla-inbound/rev/9d028fec8318
Whiteboard: [leave open]
Comment 35•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1c9ec9784927
https://hg.mozilla.org/mozilla-central/rev/786f26d1302e
https://hg.mozilla.org/mozilla-central/rev/d42ed304bda1
https://hg.mozilla.org/mozilla-central/rev/5b57d2f7af3d
https://hg.mozilla.org/mozilla-central/rev/46e52ba374e0
https://hg.mozilla.org/mozilla-central/rev/c47eb8f76e9d
https://hg.mozilla.org/mozilla-central/rev/a0414feb9656
https://hg.mozilla.org/mozilla-central/rev/9d028fec8318
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in
before you can comment on or make changes to this bug.
Description
•