Permalink
Browse files

merge after backing out changeset 5a5ead36d721 / bug 610796

  • Loading branch information...
2 parents 9cd3e47 + c8a54bc commit e87a00a85f71350e08f9c6bf6121247ff21c17da @dholbert dholbert committed Nov 16, 2010
@@ -193,13 +193,6 @@ nsSVGRenderingObserver::InvalidateViaReferencedElement()
}
void
-nsSVGRenderingObserver::NotifyEvictedFromRenderingObserverList()
-{
- mInObserverList = PR_FALSE; // We've been removed from rendering-obs. list.
- StopListening(); // Remove ourselves from mutation-obs. list.
-}
-
-void
nsSVGRenderingObserver::AttributeChanged(nsIDocument* aDocument,
dom::Element* aElement,
PRInt32 aNameSpaceID,
@@ -549,21 +542,6 @@ nsSVGRenderingObserverList::InvalidateAll()
}
}
-void
-nsSVGRenderingObserverList::RemoveAll()
-{
- nsAutoTArray<nsSVGRenderingObserver*,10> observers;
-
- // The PL_DHASH_REMOVE in GatherEnumerator drops all our observers here:
- mObservers.EnumerateEntries(GatherEnumerator, &observers);
-
- // Our list is now cleared. We need to notify the observers we've removed,
- // so they can update their state & remove themselves as mutation-observers.
- for (PRUint32 i = 0; i < observers.Length(); ++i) {
- observers[i]->NotifyEvictedFromRenderingObserverList();
- }
-}
-
static void
DestroyObservers(void *aObject, nsIAtom *aPropertyName,
void *aPropertyValue, void *aData)
@@ -600,16 +578,6 @@ nsSVGEffects::RemoveRenderingObserver(Element *aElement, nsSVGRenderingObserver
}
void
-nsSVGEffects::RemoveAllRenderingObservers(Element *aElement)
-{
- nsSVGRenderingObserverList *observerList = GetObserverList(aElement);
- if (observerList) {
- observerList->RemoveAll();
- aElement->SetHasRenderingObservers(false);
- }
-}
-
-void
nsSVGEffects::InvalidateRenderingObservers(nsIFrame *aFrame)
{
NS_ASSERTION(!aFrame->GetPrevContinuation(), "aFrame must be first continuation");
@@ -80,12 +80,6 @@ class nsSVGRenderingObserver : public nsStubMutationObserver {
NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
void InvalidateViaReferencedElement();
-
- // When a nsSVGRenderingObserver list gets forcibly cleared, it uses this
- // callback to notify every observer that's cleared from it, so they can
- // react.
- void NotifyEvictedFromRenderingObserverList();
-
nsIFrame* GetReferencedFrame();
PRBool IsInObserverList() const { return mInObserverList; }
@@ -262,12 +256,6 @@ class nsSVGRenderingObserverList {
*/
void InvalidateAll();
- /**
- * Drop all our observers, and notify them that we have dropped our reference
- * to them.
- */
- void RemoveAll();
-
private:
nsTHashtable<nsVoidPtrHashKey> mObservers;
};
@@ -362,12 +350,6 @@ class nsSVGEffects {
* @param aFrame must be a first-continuation.
*/
static void RemoveRenderingObserver(Element *aElement, nsSVGRenderingObserver *aObserver);
-
- /**
- * Removes all rendering observers from aElement.
- */
- static void RemoveAllRenderingObservers(Element *aElement);
-
/**
* This can be called on any frame. We invalidate the observers of aFrame's
* element, if any, or else walk up to the nearest observable SVG parent
@@ -60,7 +60,6 @@
#include "gfxRect.h"
#include "nsSVGSVGElement.h"
#include "nsSVGLength2.h"
-#include "nsSVGEffects.h"
using namespace mozilla::dom;
@@ -299,12 +298,6 @@ SVGDocumentWrapper::Observe(nsISupports* aSubject,
const PRUnichar *aData)
{
if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
- // Sever ties from rendering observers to helper-doc's root SVG node
- nsSVGSVGElement* svgElem = GetRootSVGElem();
- if (svgElem) {
- nsSVGEffects::RemoveAllRenderingObservers(svgElem);
- }
-
// Clean up at XPCOM shutdown time.
DestroyViewer();
if (mListener)

0 comments on commit e87a00a

Please sign in to comment.