зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1488700 p4. Rename nsSVGIDRenderingObserver to SVGIDRenderingObserver. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D5026 --HG-- extra : rebase_source : b9a11dbf110f99820e0538368305ad3d3230b85a
This commit is contained in:
Родитель
3023d05065
Коммит
886e2b8ae4
|
@ -157,13 +157,13 @@ SVGRenderingObserver::ContentRemoved(nsIContent* aChild,
|
|||
/**
|
||||
* Note that in the current setup there are two separate observer lists.
|
||||
*
|
||||
* In nsSVGIDRenderingObserver's ctor, the new object adds itself to the
|
||||
* In SVGIDRenderingObserver's ctor, the new object adds itself to the
|
||||
* mutation observer list maintained by the referenced element. In this way the
|
||||
* nsSVGIDRenderingObserver is notified if there are any attribute or content
|
||||
* SVGIDRenderingObserver is notified if there are any attribute or content
|
||||
* tree changes to the element or any of its *descendants*.
|
||||
*
|
||||
* In nsSVGIDRenderingObserver::GetReferencedElement() the
|
||||
* nsSVGIDRenderingObserver object also adds itself to an
|
||||
* In SVGIDRenderingObserver::GetReferencedElement() the
|
||||
* SVGIDRenderingObserver object also adds itself to an
|
||||
* SVGRenderingObserverList object belonging to the referenced
|
||||
* element.
|
||||
*
|
||||
|
@ -171,9 +171,9 @@ SVGRenderingObserver::ContentRemoved(nsIContent* aChild,
|
|||
* benefits/necessity of maintaining a second observer list.
|
||||
*/
|
||||
|
||||
nsSVGIDRenderingObserver::nsSVGIDRenderingObserver(nsIURI* aURI,
|
||||
nsIContent* aObservingContent,
|
||||
bool aReferenceImage)
|
||||
SVGIDRenderingObserver::SVGIDRenderingObserver(nsIURI* aURI,
|
||||
nsIContent* aObservingContent,
|
||||
bool aReferenceImage)
|
||||
: mObservedElementTracker(this)
|
||||
{
|
||||
// Start watching the target element
|
||||
|
@ -181,13 +181,13 @@ nsSVGIDRenderingObserver::nsSVGIDRenderingObserver(nsIURI* aURI,
|
|||
StartObserving();
|
||||
}
|
||||
|
||||
nsSVGIDRenderingObserver::~nsSVGIDRenderingObserver()
|
||||
SVGIDRenderingObserver::~SVGIDRenderingObserver()
|
||||
{
|
||||
StopObserving();
|
||||
}
|
||||
|
||||
void
|
||||
nsSVGIDRenderingObserver::OnRenderingChange()
|
||||
SVGIDRenderingObserver::OnRenderingChange()
|
||||
{
|
||||
if (mObservedElementTracker.get() && mInObserverList) {
|
||||
SVGObserverUtils::RemoveRenderingObserver(mObservedElementTracker.get(), this);
|
||||
|
@ -217,7 +217,7 @@ NS_IMPL_ISUPPORTS(nsSVGRenderingObserverProperty, nsIMutationObserver)
|
|||
void
|
||||
nsSVGRenderingObserverProperty::OnRenderingChange()
|
||||
{
|
||||
nsSVGIDRenderingObserver::OnRenderingChange();
|
||||
SVGIDRenderingObserver::OnRenderingChange();
|
||||
|
||||
nsIFrame* frame = mFrameReference.Get();
|
||||
|
||||
|
@ -245,7 +245,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsSVGFilterReference)
|
|||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsSVGFilterReference)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsSVGIDRenderingObserver)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, SVGIDRenderingObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIMutationObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISVGFilterReference)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
@ -260,7 +260,7 @@ nsSVGFilterReference::GetFilterFrame()
|
|||
void
|
||||
nsSVGFilterReference::OnRenderingChange()
|
||||
{
|
||||
nsSVGIDRenderingObserver::OnRenderingChange();
|
||||
SVGIDRenderingObserver::OnRenderingChange();
|
||||
|
||||
if (mFilterChainObserver) {
|
||||
mFilterChainObserver->Invalidate();
|
||||
|
|
|
@ -129,18 +129,18 @@ protected:
|
|||
* element IDs change). The code here is responsible for that.
|
||||
*
|
||||
* When a frame references a supporting resource, we create a property
|
||||
* object derived from nsSVGIDRenderingObserver to manage the relationship. The
|
||||
* object derived from SVGIDRenderingObserver to manage the relationship. The
|
||||
* property object is attached to the referencing frame.
|
||||
*/
|
||||
class nsSVGIDRenderingObserver : public SVGRenderingObserver
|
||||
class SVGIDRenderingObserver : public SVGRenderingObserver
|
||||
{
|
||||
public:
|
||||
typedef mozilla::dom::Element Element;
|
||||
typedef mozilla::dom::IDTracker IDTracker;
|
||||
|
||||
nsSVGIDRenderingObserver(nsIURI* aURI, nsIContent* aObservingContent,
|
||||
SVGIDRenderingObserver(nsIURI* aURI, nsIContent* aObservingContent,
|
||||
bool aReferenceImage);
|
||||
virtual ~nsSVGIDRenderingObserver();
|
||||
virtual ~SVGIDRenderingObserver();
|
||||
|
||||
protected:
|
||||
Element* GetTarget() override { return mObservedElementTracker.get(); }
|
||||
|
@ -155,7 +155,7 @@ protected:
|
|||
class ElementTracker final : public IDTracker
|
||||
{
|
||||
public:
|
||||
explicit ElementTracker(nsSVGIDRenderingObserver* aOwningObserver)
|
||||
explicit ElementTracker(SVGIDRenderingObserver* aOwningObserver)
|
||||
: mOwningObserver(aOwningObserver)
|
||||
{}
|
||||
protected:
|
||||
|
@ -171,7 +171,7 @@ protected:
|
|||
*/
|
||||
virtual bool IsPersistent() override { return true; }
|
||||
private:
|
||||
nsSVGIDRenderingObserver* mOwningObserver;
|
||||
SVGIDRenderingObserver* mOwningObserver;
|
||||
};
|
||||
|
||||
ElementTracker mObservedElementTracker;
|
||||
|
@ -203,14 +203,14 @@ private:
|
|||
nsIPresShell *mFramePresShell;
|
||||
};
|
||||
|
||||
class nsSVGRenderingObserverProperty : public nsSVGIDRenderingObserver
|
||||
class nsSVGRenderingObserverProperty : public SVGIDRenderingObserver
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
|
||||
nsSVGRenderingObserverProperty(nsIURI* aURI, nsIFrame *aFrame,
|
||||
bool aReferenceImage)
|
||||
: nsSVGIDRenderingObserver(aURI, aFrame->GetContent(), aReferenceImage)
|
||||
: SVGIDRenderingObserver(aURI, aFrame->GetContent(), aReferenceImage)
|
||||
, mFrameReference(aFrame)
|
||||
{}
|
||||
|
||||
|
@ -234,14 +234,14 @@ protected:
|
|||
*
|
||||
* The nsSVGFilterChainObserver class manages a list of nsSVGFilterReferences.
|
||||
*/
|
||||
class nsSVGFilterReference final : public nsSVGIDRenderingObserver
|
||||
class nsSVGFilterReference final : public SVGIDRenderingObserver
|
||||
, public nsISVGFilterReference
|
||||
{
|
||||
public:
|
||||
nsSVGFilterReference(nsIURI* aURI,
|
||||
nsIContent* aObservingContent,
|
||||
nsSVGFilterChainObserver* aFilterChainObserver)
|
||||
: nsSVGIDRenderingObserver(aURI, aObservingContent, false)
|
||||
: SVGIDRenderingObserver(aURI, aObservingContent, false)
|
||||
, mFilterChainObserver(aFilterChainObserver)
|
||||
{
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ public:
|
|||
|
||||
// nsISupports
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsSVGFilterReference, nsSVGIDRenderingObserver)
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsSVGFilterReference, SVGIDRenderingObserver)
|
||||
|
||||
// nsISVGFilterReference
|
||||
virtual void Invalidate() override { OnRenderingChange(); };
|
||||
|
@ -265,7 +265,7 @@ public:
|
|||
protected:
|
||||
virtual ~nsSVGFilterReference() {}
|
||||
|
||||
// nsSVGIDRenderingObserver
|
||||
// SVGIDRenderingObserver
|
||||
virtual void OnRenderingChange() override;
|
||||
|
||||
private:
|
||||
|
|
Загрузка…
Ссылка в новой задаче