Closed Bug 827197 Opened 12 years ago Closed 12 years ago

Remove some uses of nsIDOMSVGElement subclasses

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dzbarsky, Assigned: dzbarsky)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
      No description provided.
Attachment #698517 - Flags: review?(longsonr)
Comment on attachment 698517 [details] [diff] [review]
Patch

>+        if (rootElement->IsSVG() && rootElement->Tag() == nsGkAtoms::svg) {

    if (rootElement->IsSVG(nsGkAtoms::svg) {

>+                  nsIContent* child = childNodes->Item(i);
>+                  if (child->IsSVG() && child->Tag() == nsGkAtoms::title) {

                  if (child->IsSVG(nsGkAtoms::title)) {

I tell you what, let's assume I make the same comment everywhere in this patch it's possible to do this and you fix it everywhere you've done it.

>-    nsCOMPtr<nsIDOMSVGTSpanElement> tspan = do_QueryInterface(aContent);
>-    nsCOMPtr<nsIDOMSVGAltGlyphElement> altGlyph = do_QueryInterface(aContent);
>-    NS_ASSERTION(tspan || altGlyph, "Content is not an SVG tspan or altGlyph");
>+    NS_ASSERTION(aContent->IsSVG() && (aContent->Tag() == nsGkAtoms::altGlyph ||
>+                                       aContent->Tag() == nsGkAtoms::tspan),
>+                 "Content is not an SVG tspan or altGlyph");

Which is pretty much everything except this case as far as I can see.

r=me with above comment addressed everywhere it occurs.
Attachment #698517 - Flags: review?(longsonr) → review+
https://hg.mozilla.org/mozilla-central/rev/fe40f8da7644
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: