2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07: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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-02-17 15:28:47 -08:00
|
|
|
#ifndef mozilla_dom_SVGFilterElement_h
|
|
|
|
#define mozilla_dom_SVGFilterElement_h
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2007-08-27 16:11:14 -07:00
|
|
|
#include "nsSVGEnum.h"
|
2013-01-02 22:17:03 -08:00
|
|
|
#include "nsSVGElement.h"
|
2012-01-26 01:57:21 -08:00
|
|
|
#include "nsSVGIntegerPair.h"
|
|
|
|
#include "nsSVGLength2.h"
|
2008-06-14 02:01:02 -07:00
|
|
|
#include "nsSVGString.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-02-17 15:28:47 -08:00
|
|
|
typedef nsSVGElement SVGFilterElementBase;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2013-02-17 15:28:47 -08:00
|
|
|
class nsSVGFilterFrame;
|
2014-02-05 14:04:42 -08:00
|
|
|
class nsSVGFilterInstance;
|
2013-02-17 15:28:47 -08:00
|
|
|
|
|
|
|
nsresult NS_NewSVGFilterElement(nsIContent **aResult,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2013-02-17 15:28:47 -08:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
2013-02-17 18:14:02 -08:00
|
|
|
class SVGAnimatedLength;
|
2013-02-17 15:28:47 -08:00
|
|
|
|
2013-03-27 18:23:10 -07:00
|
|
|
class SVGFilterElement : public SVGFilterElementBase
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2013-02-17 15:28:47 -08:00
|
|
|
friend class ::nsSVGFilterFrame;
|
2014-02-05 14:04:42 -08:00
|
|
|
friend class ::nsSVGFilterInstance;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
protected:
|
2013-02-17 15:28:47 -08:00
|
|
|
friend nsresult (::NS_NewSVGFilterElement(nsIContent **aResult,
|
2014-06-19 19:01:40 -07:00
|
|
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
|
2014-08-31 18:08:04 -07:00
|
|
|
explicit SVGFilterElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
|
2014-04-08 15:27:17 -07:00
|
|
|
virtual JSObject* WrapNode(JSContext *cx) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
public:
|
|
|
|
// nsIContent
|
2014-06-19 19:01:40 -07:00
|
|
|
virtual nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
|
2013-05-07 22:11:24 -07:00
|
|
|
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2008-01-02 12:49:13 -08:00
|
|
|
// Invalidate users of this filter
|
|
|
|
void Invalidate();
|
|
|
|
|
2012-03-03 01:21:09 -08:00
|
|
|
// nsSVGSVGElement methods:
|
2013-05-07 22:11:24 -07:00
|
|
|
virtual bool HasValidDimensions() const MOZ_OVERRIDE;
|
2013-02-17 18:14:02 -08:00
|
|
|
|
|
|
|
// WebIDL
|
|
|
|
already_AddRefed<SVGAnimatedLength> X();
|
|
|
|
already_AddRefed<SVGAnimatedLength> Y();
|
|
|
|
already_AddRefed<SVGAnimatedLength> Width();
|
|
|
|
already_AddRefed<SVGAnimatedLength> Height();
|
2013-07-01 00:02:46 -07:00
|
|
|
already_AddRefed<SVGAnimatedEnumeration> FilterUnits();
|
|
|
|
already_AddRefed<SVGAnimatedEnumeration> PrimitiveUnits();
|
2013-06-14 15:37:27 -07:00
|
|
|
already_AddRefed<SVGAnimatedString> Href();
|
2013-02-17 18:14:02 -08:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
protected:
|
|
|
|
|
2013-05-07 22:11:24 -07:00
|
|
|
virtual LengthAttributesInfo GetLengthInfo() MOZ_OVERRIDE;
|
|
|
|
virtual EnumAttributesInfo GetEnumInfo() MOZ_OVERRIDE;
|
|
|
|
virtual StringAttributesInfo GetStringInfo() MOZ_OVERRIDE;
|
2007-08-27 16:11:14 -07:00
|
|
|
|
2013-02-17 18:14:02 -08:00
|
|
|
enum { ATTR_X, ATTR_Y, ATTR_WIDTH, ATTR_HEIGHT };
|
2007-03-22 10:30:00 -07:00
|
|
|
nsSVGLength2 mLengthAttributes[4];
|
|
|
|
static LengthInfo sLengthInfo[4];
|
|
|
|
|
2007-08-27 16:11:14 -07:00
|
|
|
enum { FILTERUNITS, PRIMITIVEUNITS };
|
|
|
|
nsSVGEnum mEnumAttributes[2];
|
|
|
|
static EnumInfo sEnumInfo[2];
|
|
|
|
|
2008-06-14 02:01:02 -07:00
|
|
|
enum { HREF };
|
|
|
|
nsSVGString mStringAttributes[1];
|
|
|
|
static StringInfo sStringInfo[1];
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
2013-02-17 15:28:47 -08:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_SVGFilterElement_h
|