зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1494695. Remove SVGFilterElement::Invalidate. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D7095 --HG-- extra : rebase_source : 951c95ceef8ce6682ed867aa96c88283c64ccbd1 extra : __touch-noise__ : 4288727139 extra : amend_source : ad0a1fcb56b4c1ad08f54142cac64c1ab7d7300b
This commit is contained in:
Родитель
64d88eee9b
Коммит
8b400ea6ce
|
@ -16,6 +16,7 @@
|
|||
#include "nsLayoutUtils.h"
|
||||
#include "nsSVGUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "SVGObserverUtils.h"
|
||||
#include "imgIContainer.h"
|
||||
#include "gfx2DGlue.h"
|
||||
|
||||
|
@ -356,22 +357,14 @@ SVGFEImageElement::Notify(imgIRequest* aRequest, int32_t aType, const nsIntRect*
|
|||
if (aType == imgINotificationObserver::LOAD_COMPLETE ||
|
||||
aType == imgINotificationObserver::FRAME_UPDATE ||
|
||||
aType == imgINotificationObserver::SIZE_AVAILABLE) {
|
||||
Invalidate();
|
||||
if (GetParent() && GetParent()->IsSVGElement(nsGkAtoms::filter)) {
|
||||
SVGObserverUtils::InvalidateDirectRenderingObservers(
|
||||
static_cast<SVGFilterElement*>(GetParent()));
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// helper methods
|
||||
|
||||
void
|
||||
SVGFEImageElement::Invalidate()
|
||||
{
|
||||
if (GetParent() && GetParent()->IsSVGElement(nsGkAtoms::filter)) {
|
||||
static_cast<SVGFilterElement*>(GetParent())->Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -76,9 +76,6 @@ public:
|
|||
already_AddRefed<DOMSVGAnimatedPreserveAspectRatio> PreserveAspectRatio();
|
||||
|
||||
private:
|
||||
// Invalidate users of the filter containing this element.
|
||||
void Invalidate();
|
||||
|
||||
nsresult LoadSVGImage(bool aForce, bool aNotify);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -137,23 +137,6 @@ SVGFilterElement::IsAttributeMapped(const nsAtom* name) const
|
|||
SVGFilterElementBase::IsAttributeMapped(name);
|
||||
}
|
||||
|
||||
void
|
||||
SVGFilterElement::Invalidate()
|
||||
{
|
||||
nsAutoTObserverArray<nsIMutationObserver*, 1> *observers = GetMutationObservers();
|
||||
|
||||
if (observers && !observers->IsEmpty()) {
|
||||
nsAutoTObserverArray<nsIMutationObserver*, 1>::ForwardIterator iter(*observers);
|
||||
while (iter.HasMore()) {
|
||||
nsCOMPtr<nsIMutationObserver> obs(iter.GetNext());
|
||||
RefPtr<SVGFilterObserver> filter = do_QueryObject(obs);
|
||||
if (filter) {
|
||||
filter->Invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsSVGElement methods
|
||||
|
||||
|
|
|
@ -41,9 +41,6 @@ public:
|
|||
virtual nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
|
||||
NS_IMETHOD_(bool) IsAttributeMapped(const nsAtom* aAttribute) const override;
|
||||
|
||||
// Invalidate users of this filter
|
||||
void Invalidate();
|
||||
|
||||
// nsSVGSVGElement methods:
|
||||
virtual bool HasValidDimensions() const override;
|
||||
|
||||
|
|
|
@ -272,7 +272,6 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(SVGFilterObserver)
|
|||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(SVGFilterObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIMutationObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(SVGFilterObserver)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(SVGFilterObserver)
|
||||
|
|
|
@ -290,10 +290,6 @@ protected:
|
|||
nsSVGFrameReferenceFromProperty mFrameReference;
|
||||
};
|
||||
|
||||
#define NS_SVGFILTEROBSERVER_IID \
|
||||
{ 0x9744ee20, 0x1bcf, 0x4c62, \
|
||||
{ 0x86, 0x7d, 0xd3, 0x7a, 0x91, 0x60, 0x3e, 0xef } }
|
||||
|
||||
/**
|
||||
* In a filter chain, there can be multiple SVG reference filters.
|
||||
* e.g. filter: url(#svg-filter-1) blur(10px) url(#svg-filter-2);
|
||||
|
@ -327,7 +323,6 @@ public:
|
|||
nsSVGFilterFrame *GetFilterFrame();
|
||||
|
||||
// nsISupports
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_SVGFILTEROBSERVER_IID)
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(SVGFilterObserver)
|
||||
|
||||
|
@ -343,8 +338,6 @@ private:
|
|||
SVGFilterObserverList* mFilterObserverList;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(SVGFilterObserver, NS_SVGFILTEROBSERVER_IID)
|
||||
|
||||
/**
|
||||
* This class manages a list of SVGFilterObservers, which correspond to
|
||||
* reference to SVG filters in a list of filters in a given 'filter' property.
|
||||
|
|
Загрузка…
Ссылка в новой задаче