зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1405785, part 1 - Rename nsSVGRenderingObserver::Start/StopListening. r=longsonr
MozReview-Commit-ID: GF9xP8mvuCC
This commit is contained in:
Родитель
3251040469
Коммит
bd85d1e036
|
@ -62,7 +62,7 @@ public:
|
|||
MOZ_ASSERT(mDocWrapper, "Need a non-null SVG document wrapper");
|
||||
MOZ_ASSERT(mVectorImage, "Need a non-null VectorImage");
|
||||
|
||||
StartListening();
|
||||
StartObserving();
|
||||
Element* elem = GetTarget();
|
||||
MOZ_ASSERT(elem, "no root SVG node for us to observe");
|
||||
|
||||
|
@ -79,7 +79,7 @@ public:
|
|||
protected:
|
||||
virtual ~SVGRootRenderingObserver()
|
||||
{
|
||||
StopListening();
|
||||
StopObserving();
|
||||
}
|
||||
|
||||
virtual Element* GetTarget() override
|
||||
|
|
|
@ -25,7 +25,7 @@ using namespace mozilla;
|
|||
using namespace mozilla::dom;
|
||||
|
||||
void
|
||||
nsSVGRenderingObserver::StartListening()
|
||||
nsSVGRenderingObserver::StartObserving()
|
||||
{
|
||||
Element* target = GetTarget();
|
||||
if (target) {
|
||||
|
@ -34,7 +34,7 @@ nsSVGRenderingObserver::StartListening()
|
|||
}
|
||||
|
||||
void
|
||||
nsSVGRenderingObserver::StopListening()
|
||||
nsSVGRenderingObserver::StopObserving()
|
||||
{
|
||||
Element* target = GetTarget();
|
||||
|
||||
|
@ -108,7 +108,7 @@ void
|
|||
nsSVGRenderingObserver::NotifyEvictedFromRenderingObserverList()
|
||||
{
|
||||
mInObserverList = false; // We've been removed from rendering-obs. list.
|
||||
StopListening(); // Remove ourselves from mutation-obs. list.
|
||||
StopObserving(); // Remove ourselves from mutation-obs. list.
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -184,12 +184,12 @@ nsSVGIDRenderingObserver::nsSVGIDRenderingObserver(nsIURI* aURI,
|
|||
{
|
||||
// Start watching the target element
|
||||
mObservedElementTracker.Reset(aObservingContent, aURI, true, aReferenceImage);
|
||||
StartListening();
|
||||
StartObserving();
|
||||
}
|
||||
|
||||
nsSVGIDRenderingObserver::~nsSVGIDRenderingObserver()
|
||||
{
|
||||
StopListening();
|
||||
StopObserving();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -246,7 +246,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsSVGFilterReference)
|
|||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsSVGFilterReference)
|
||||
tmp->StopListening();
|
||||
tmp->StopObserving();
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mObservedElementTracker);
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
|
|
|
@ -40,8 +40,8 @@ class nsSVGFilterChainObserver;
|
|||
* "GetTarget()" to specify the piece of SVG content that they'd like to
|
||||
* monitor, and they need to implement "DoUpdate" to specify how we'll react
|
||||
* when that content gets re-rendered. They also need to implement a
|
||||
* constructor and destructor, which should call StartListening and
|
||||
* StopListening, respectively.
|
||||
* constructor and destructor, which should call StartObserving and
|
||||
* StopObserving, respectively.
|
||||
*/
|
||||
class nsSVGRenderingObserver : public nsStubMutationObserver
|
||||
{
|
||||
|
@ -84,8 +84,8 @@ public:
|
|||
|
||||
protected:
|
||||
// Non-virtual protected methods
|
||||
void StartListening();
|
||||
void StopListening();
|
||||
void StartObserving();
|
||||
void StopObserving();
|
||||
|
||||
// Virtual protected methods
|
||||
virtual void DoUpdate() = 0; // called when the referenced resource changes.
|
||||
|
@ -138,9 +138,9 @@ protected:
|
|||
{}
|
||||
protected:
|
||||
virtual void ElementChanged(Element* aFrom, Element* aTo) override {
|
||||
mOwningObserver->StopListening(); // stop observing the old element
|
||||
mOwningObserver->StopObserving(); // stop observing the old element
|
||||
IDTracker::ElementChanged(aFrom, aTo);
|
||||
mOwningObserver->StartListening(); // start observing the new element
|
||||
mOwningObserver->StartObserving(); // start observing the new element
|
||||
mOwningObserver->DoUpdate();
|
||||
}
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче