Bug 556808 - ASSERTION: unknown nsISVGValue: Not Reached, when appending segment to SVG path. r=jwatt
authorRobert Longson <longsonr@gmail.com>
Thu, 08 Apr 2010 18:18:58 +0100
changeset 40597 47cee476df1623147b7f69765de43ad5414b2fd4
parent 40596 e24d24f3ceedc88c24fc753537bd3b2980eb3157
child 40598 bbbb2d668d0d0bce8d8256a5b2f1ad80cd2fc12f
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs556808
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 556808 - ASSERTION: unknown nsISVGValue: Not Reached, when appending segment to SVG path. r=jwatt
content/svg/content/src/nsSVGPathElement.cpp
content/svg/content/src/nsSVGPathElement.h
--- a/content/svg/content/src/nsSVGPathElement.cpp
+++ b/content/svg/content/src/nsSVGPathElement.cpp
@@ -467,16 +467,29 @@ nsSVGPathElement::BeforeSetAttr(PRInt32 
     }
   }
 
   return nsSVGPathElementBase::BeforeSetAttr(aNamespaceID, aName,
                                              aValue, aNotify);
 }
 
 NS_IMETHODIMP
+nsSVGPathElement::WillModifySVGObservable(nsISVGValue* observable,
+                                          nsISVGValue::modificationType aModType)
+{
+  nsCOMPtr<nsIDOMSVGPathSegList> list = do_QueryInterface(observable);
+
+  if (list && mSegments == list) {
+    return NS_OK;
+  }
+
+  return nsSVGPathElementBase::WillModifySVGObservable(observable, aModType);
+}
+
+NS_IMETHODIMP
 nsSVGPathElement::DidModifySVGObservable(nsISVGValue* observable,
                                          nsISVGValue::modificationType aModType)
 {
   nsCOMPtr<nsIDOMSVGPathSegList> list = do_QueryInterface(observable);
 
   if (list && mSegments == list) {
     nsCOMPtr<nsISVGValue> value = do_QueryInterface(mSegments);
     nsAutoString d;
--- a/content/svg/content/src/nsSVGPathElement.h
+++ b/content/svg/content/src/nsSVGPathElement.h
@@ -90,18 +90,20 @@ public:
   NS_FORWARD_NSIDOMNODE(nsSVGPathElementBase::)
   NS_FORWARD_NSIDOMELEMENT(nsSVGPathElementBase::)
   NS_FORWARD_NSIDOMSVGELEMENT(nsSVGPathElementBase::)
 
   // nsIContent interface
   NS_IMETHOD_(PRBool) IsAttributeMapped(const nsIAtom* name) const;
 
   // nsISVGValueObserver
-  NS_IMETHOD DidModifySVGObservable (nsISVGValue* observable,
+  NS_IMETHOD WillModifySVGObservable(nsISVGValue* observable,
                                      nsISVGValue::modificationType aModType);
+  NS_IMETHOD DidModifySVGObservable(nsISVGValue* observable,
+                                    nsISVGValue::modificationType aModType);
 
   // nsSVGPathGeometryElement methods:
   virtual PRBool AttributeDefinesGeometry(const nsIAtom *aName);
   virtual PRBool IsMarkable();
   virtual void GetMarkPoints(nsTArray<nsSVGMark> *aMarks);
   virtual void ConstructPath(gfxContext *aCtx);
 
   virtual already_AddRefed<gfxFlattenedPath> GetFlattenedPath(const gfxMatrix &aMatrix);