2006-04-14 19:09:39 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2006-04-14 19:09:39 +04:00
|
|
|
|
2013-02-18 03:28:47 +04:00
|
|
|
#ifndef mozilla_dom_SVGFilterElement_h
|
|
|
|
#define mozilla_dom_SVGFilterElement_h
|
2006-04-14 19:09:39 +04:00
|
|
|
|
2007-08-28 03:11:14 +04:00
|
|
|
#include "nsSVGEnum.h"
|
2013-01-03 10:17:03 +04:00
|
|
|
#include "nsSVGElement.h"
|
2012-01-26 13:57:21 +04:00
|
|
|
#include "nsSVGIntegerPair.h"
|
|
|
|
#include "nsSVGLength2.h"
|
2008-06-14 13:01:02 +04:00
|
|
|
#include "nsSVGString.h"
|
2006-04-14 19:09:39 +04:00
|
|
|
|
2013-02-18 03:28:47 +04:00
|
|
|
typedef nsSVGElement SVGFilterElementBase;
|
2006-04-14 19:09:39 +04:00
|
|
|
|
2013-02-18 03:28:47 +04:00
|
|
|
class nsSVGFilterFrame;
|
2014-02-06 02:04:42 +04:00
|
|
|
class nsSVGFilterInstance;
|
2013-02-18 03:28:47 +04:00
|
|
|
|
|
|
|
nsresult NS_NewSVGFilterElement(nsIContent **aResult,
|
2014-06-20 06:01:40 +04:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2013-02-18 03:28:47 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
2013-02-18 06:14:02 +04:00
|
|
|
class SVGAnimatedLength;
|
2013-02-18 03:28:47 +04:00
|
|
|
|
2013-03-28 05:23:10 +04:00
|
|
|
class SVGFilterElement : public SVGFilterElementBase
|
2006-04-14 19:09:39 +04:00
|
|
|
{
|
2013-02-18 03:28:47 +04:00
|
|
|
friend class ::nsSVGFilterFrame;
|
2014-02-06 02:04:42 +04:00
|
|
|
friend class ::nsSVGFilterInstance;
|
2006-04-14 19:09:39 +04:00
|
|
|
|
|
|
|
protected:
|
2013-02-18 03:28:47 +04:00
|
|
|
friend nsresult (::NS_NewSVGFilterElement(nsIContent **aResult,
|
2014-06-20 06:01:40 +04:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
|
2014-09-01 05:08:04 +04:00
|
|
|
explicit SVGFilterElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
|
2006-04-14 19:09:39 +04:00
|
|
|
|
|
|
|
public:
|
|
|
|
// nsIContent
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const override;
|
|
|
|
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const override;
|
2006-09-05 14:22:54 +04:00
|
|
|
|
2008-01-02 23:49:13 +03:00
|
|
|
// Invalidate users of this filter
|
|
|
|
void Invalidate();
|
|
|
|
|
2012-03-03 13:21:09 +04:00
|
|
|
// nsSVGSVGElement methods:
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool HasValidDimensions() const override;
|
2013-02-18 06:14:02 +04:00
|
|
|
|
|
|
|
// WebIDL
|
|
|
|
already_AddRefed<SVGAnimatedLength> X();
|
|
|
|
already_AddRefed<SVGAnimatedLength> Y();
|
|
|
|
already_AddRefed<SVGAnimatedLength> Width();
|
|
|
|
already_AddRefed<SVGAnimatedLength> Height();
|
2013-07-01 11:02:46 +04:00
|
|
|
already_AddRefed<SVGAnimatedEnumeration> FilterUnits();
|
|
|
|
already_AddRefed<SVGAnimatedEnumeration> PrimitiveUnits();
|
2013-06-15 02:37:27 +04:00
|
|
|
already_AddRefed<SVGAnimatedString> Href();
|
2013-02-18 06:14:02 +04:00
|
|
|
|
2006-04-14 19:09:39 +04:00
|
|
|
protected:
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual LengthAttributesInfo GetLengthInfo() override;
|
|
|
|
virtual EnumAttributesInfo GetEnumInfo() override;
|
|
|
|
virtual StringAttributesInfo GetStringInfo() override;
|
2007-08-28 03:11:14 +04:00
|
|
|
|
2013-02-18 06:14:02 +04:00
|
|
|
enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
|
2006-04-14 19:09:39 +04:00
|
|
|
nsSVGLength2 mLengthAttributes[4];
|
|
|
|
static LengthInfo sLengthInfo[4];
|
|
|
|
|
2007-08-28 03:11:14 +04:00
|
|
|
enum { FILTERUNITS, PRIMITIVEUNITS };
|
|
|
|
nsSVGEnum mEnumAttributes[2];
|
|
|
|
static EnumInfo sEnumInfo[2];
|
|
|
|
|
2008-06-14 13:01:02 +04:00
|
|
|
enum { HREF };
|
|
|
|
nsSVGString mStringAttributes[1];
|
|
|
|
static StringInfo sStringInfo[1];
|
2006-04-14 19:09:39 +04:00
|
|
|
};
|
|
|
|
|
2013-02-18 03:28:47 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_SVGFilterElement_h
|