mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 847120: Convert SVGFEColorMatrixElement to WebIDL r=Ms2ger
This commit is contained in:
parent
d6265808f0
commit
9da42b90e4
@ -3,95 +3,99 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* 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/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
#include "DOMSVGAnimatedNumberList.h"
|
||||||
#include "mozilla/dom/SVGFEColorMatrixElement.h"
|
#include "mozilla/dom/SVGFEColorMatrixElement.h"
|
||||||
|
#include "mozilla/dom/SVGFEColorMatrixElementBinding.h"
|
||||||
|
#include "nsSVGUtils.h"
|
||||||
|
|
||||||
|
#define NUM_ENTRIES_IN_4x5_MATRIX 20
|
||||||
|
|
||||||
|
NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEColorMatrix)
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
nsSVGEnumMapping nsSVGFEColorMatrixElement::sTypeMap[] = {
|
JSObject*
|
||||||
{&nsGkAtoms::matrix, nsSVGFEColorMatrixElement::SVG_FECOLORMATRIX_TYPE_MATRIX},
|
SVGFEColorMatrixElement::WrapNode(JSContext* aCx, JSObject* aScope)
|
||||||
{&nsGkAtoms::saturate, nsSVGFEColorMatrixElement::SVG_FECOLORMATRIX_TYPE_SATURATE},
|
{
|
||||||
{&nsGkAtoms::hueRotate, nsSVGFEColorMatrixElement::SVG_FECOLORMATRIX_TYPE_HUE_ROTATE},
|
return SVGFEColorMatrixElementBinding::Wrap(aCx, aScope, this);
|
||||||
{&nsGkAtoms::luminanceToAlpha, nsSVGFEColorMatrixElement::SVG_FECOLORMATRIX_TYPE_LUMINANCE_TO_ALPHA},
|
}
|
||||||
|
|
||||||
|
nsSVGEnumMapping SVGFEColorMatrixElement::sTypeMap[] = {
|
||||||
|
{&nsGkAtoms::matrix, SVG_FECOLORMATRIX_TYPE_MATRIX},
|
||||||
|
{&nsGkAtoms::saturate, SVG_FECOLORMATRIX_TYPE_SATURATE},
|
||||||
|
{&nsGkAtoms::hueRotate, SVG_FECOLORMATRIX_TYPE_HUE_ROTATE},
|
||||||
|
{&nsGkAtoms::luminanceToAlpha, SVG_FECOLORMATRIX_TYPE_LUMINANCE_TO_ALPHA},
|
||||||
{nullptr, 0}
|
{nullptr, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
nsSVGElement::EnumInfo nsSVGFEColorMatrixElement::sEnumInfo[1] =
|
nsSVGElement::EnumInfo SVGFEColorMatrixElement::sEnumInfo[1] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::type,
|
{ &nsGkAtoms::type,
|
||||||
sTypeMap,
|
sTypeMap,
|
||||||
nsSVGFEColorMatrixElement::SVG_FECOLORMATRIX_TYPE_MATRIX
|
SVG_FECOLORMATRIX_TYPE_MATRIX
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
nsSVGElement::StringInfo nsSVGFEColorMatrixElement::sStringInfo[2] =
|
nsSVGElement::StringInfo SVGFEColorMatrixElement::sStringInfo[2] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::result, kNameSpaceID_None, true },
|
{ &nsGkAtoms::result, kNameSpaceID_None, true },
|
||||||
{ &nsGkAtoms::in, kNameSpaceID_None, true }
|
{ &nsGkAtoms::in, kNameSpaceID_None, true }
|
||||||
};
|
};
|
||||||
|
|
||||||
nsSVGElement::NumberListInfo nsSVGFEColorMatrixElement::sNumberListInfo[1] =
|
nsSVGElement::NumberListInfo SVGFEColorMatrixElement::sNumberListInfo[1] =
|
||||||
{
|
{
|
||||||
{ &nsGkAtoms::values }
|
{ &nsGkAtoms::values }
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_IMPL_NS_NEW_SVG_ELEMENT(FEColorMatrix)
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsISupports methods
|
// nsISupports methods
|
||||||
|
|
||||||
NS_IMPL_ADDREF_INHERITED(nsSVGFEColorMatrixElement,nsSVGFEColorMatrixElementBase)
|
NS_IMPL_ADDREF_INHERITED(SVGFEColorMatrixElement,SVGFEColorMatrixElementBase)
|
||||||
NS_IMPL_RELEASE_INHERITED(nsSVGFEColorMatrixElement,nsSVGFEColorMatrixElementBase)
|
NS_IMPL_RELEASE_INHERITED(SVGFEColorMatrixElement,SVGFEColorMatrixElementBase)
|
||||||
|
|
||||||
DOMCI_NODE_DATA(SVGFEColorMatrixElement, nsSVGFEColorMatrixElement)
|
NS_INTERFACE_TABLE_HEAD(SVGFEColorMatrixElement)
|
||||||
|
NS_NODE_INTERFACE_TABLE3(SVGFEColorMatrixElement, nsIDOMNode, nsIDOMElement,
|
||||||
NS_INTERFACE_TABLE_HEAD(nsSVGFEColorMatrixElement)
|
nsIDOMSVGElement)
|
||||||
NS_NODE_INTERFACE_TABLE5(nsSVGFEColorMatrixElement, nsIDOMNode, nsIDOMElement,
|
NS_INTERFACE_MAP_END_INHERITING(SVGFEColorMatrixElementBase)
|
||||||
nsIDOMSVGElement,
|
|
||||||
nsIDOMSVGFilterPrimitiveStandardAttributes,
|
|
||||||
nsIDOMSVGFEColorMatrixElement)
|
|
||||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGFEColorMatrixElement)
|
|
||||||
NS_INTERFACE_MAP_END_INHERITING(nsSVGFEColorMatrixElementBase)
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsIDOMNode methods
|
// nsIDOMNode methods
|
||||||
|
|
||||||
|
|
||||||
NS_IMPL_ELEMENT_CLONE_WITH_INIT(nsSVGFEColorMatrixElement)
|
NS_IMPL_ELEMENT_CLONE_WITH_INIT(SVGFEColorMatrixElement)
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// nsSVGFEColorMatrixElement methods
|
|
||||||
|
|
||||||
/* readonly attribute nsIDOMSVGAnimatedString in1; */
|
already_AddRefed<nsIDOMSVGAnimatedString>
|
||||||
NS_IMETHODIMP nsSVGFEColorMatrixElement::GetIn1(nsIDOMSVGAnimatedString * *aIn)
|
SVGFEColorMatrixElement::In1()
|
||||||
{
|
{
|
||||||
return mStringAttributes[IN1].ToDOMAnimatedString(aIn, this);
|
return mStringAttributes[IN1].ToDOMAnimatedString(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* readonly attribute nsIDOMSVGAnimatedEnumeration type; */
|
already_AddRefed<nsIDOMSVGAnimatedEnumeration>
|
||||||
NS_IMETHODIMP nsSVGFEColorMatrixElement::GetType(nsIDOMSVGAnimatedEnumeration * *aType)
|
SVGFEColorMatrixElement::Type()
|
||||||
{
|
{
|
||||||
return mEnumAttributes[TYPE].ToDOMAnimatedEnum(aType, this);
|
return mEnumAttributes[TYPE].ToDOMAnimatedEnum(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* readonly attribute DOMSVGAnimatedNumberList values; */
|
already_AddRefed<DOMSVGAnimatedNumberList>
|
||||||
NS_IMETHODIMP nsSVGFEColorMatrixElement::GetValues(nsISupports * *aValues)
|
SVGFEColorMatrixElement::Values()
|
||||||
{
|
{
|
||||||
*aValues = DOMSVGAnimatedNumberList::GetDOMWrapper(&mNumberListAttributes[VALUES],
|
return DOMSVGAnimatedNumberList::GetDOMWrapper(&mNumberListAttributes[VALUES],
|
||||||
this, VALUES).get();
|
this, VALUES);
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsSVGFEColorMatrixElement::GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources)
|
SVGFEColorMatrixElement::GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources)
|
||||||
{
|
{
|
||||||
aSources.AppendElement(nsSVGStringInfo(&mStringAttributes[IN1], this));
|
aSources.AppendElement(nsSVGStringInfo(&mStringAttributes[IN1], this));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsSVGFEColorMatrixElement::Filter(nsSVGFilterInstance *instance,
|
SVGFEColorMatrixElement::Filter(nsSVGFilterInstance* instance,
|
||||||
const nsTArray<const Image*>& aSources,
|
const nsTArray<const Image*>& aSources,
|
||||||
const Image* aTarget,
|
const Image* aTarget,
|
||||||
const nsIntRect& rect)
|
const nsIntRect& rect)
|
||||||
@ -104,9 +108,9 @@ nsSVGFEColorMatrixElement::Filter(nsSVGFilterInstance *instance,
|
|||||||
const SVGNumberList &values = mNumberListAttributes[VALUES].GetAnimValue();
|
const SVGNumberList &values = mNumberListAttributes[VALUES].GetAnimValue();
|
||||||
|
|
||||||
if (!mNumberListAttributes[VALUES].IsExplicitlySet() &&
|
if (!mNumberListAttributes[VALUES].IsExplicitlySet() &&
|
||||||
(type == nsSVGFEColorMatrixElement::SVG_FECOLORMATRIX_TYPE_MATRIX ||
|
(type == SVG_FECOLORMATRIX_TYPE_MATRIX ||
|
||||||
type == nsSVGFEColorMatrixElement::SVG_FECOLORMATRIX_TYPE_SATURATE ||
|
type == SVG_FECOLORMATRIX_TYPE_SATURATE ||
|
||||||
type == nsSVGFEColorMatrixElement::SVG_FECOLORMATRIX_TYPE_HUE_ROTATE)) {
|
type == SVG_FECOLORMATRIX_TYPE_HUE_ROTATE)) {
|
||||||
// identity matrix filter
|
// identity matrix filter
|
||||||
CopyRect(aTarget, aSources[0], rect);
|
CopyRect(aTarget, aSources[0], rect);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
@ -128,7 +132,7 @@ nsSVGFEColorMatrixElement::Filter(nsSVGFilterInstance *instance,
|
|||||||
float s, c;
|
float s, c;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case nsSVGFEColorMatrixElement::SVG_FECOLORMATRIX_TYPE_MATRIX:
|
case SVG_FECOLORMATRIX_TYPE_MATRIX:
|
||||||
|
|
||||||
if (values.Length() != NUM_ENTRIES_IN_4x5_MATRIX)
|
if (values.Length() != NUM_ENTRIES_IN_4x5_MATRIX)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
@ -137,7 +141,7 @@ nsSVGFEColorMatrixElement::Filter(nsSVGFilterInstance *instance,
|
|||||||
colorMatrix[j] = values[j];
|
colorMatrix[j] = values[j];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case nsSVGFEColorMatrixElement::SVG_FECOLORMATRIX_TYPE_SATURATE:
|
case SVG_FECOLORMATRIX_TYPE_SATURATE:
|
||||||
|
|
||||||
if (values.Length() != 1)
|
if (values.Length() != 1)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
@ -163,7 +167,7 @@ nsSVGFEColorMatrixElement::Filter(nsSVGFilterInstance *instance,
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nsSVGFEColorMatrixElement::SVG_FECOLORMATRIX_TYPE_HUE_ROTATE:
|
case SVG_FECOLORMATRIX_TYPE_HUE_ROTATE:
|
||||||
{
|
{
|
||||||
memcpy(colorMatrix, identityMatrix, sizeof(colorMatrix));
|
memcpy(colorMatrix, identityMatrix, sizeof(colorMatrix));
|
||||||
|
|
||||||
@ -192,7 +196,7 @@ nsSVGFEColorMatrixElement::Filter(nsSVGFilterInstance *instance,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case nsSVGFEColorMatrixElement::SVG_FECOLORMATRIX_TYPE_LUMINANCE_TO_ALPHA:
|
case SVG_FECOLORMATRIX_TYPE_LUMINANCE_TO_ALPHA:
|
||||||
|
|
||||||
memcpy(colorMatrix, luminanceToAlphaMatrix, sizeof(colorMatrix));
|
memcpy(colorMatrix, luminanceToAlphaMatrix, sizeof(colorMatrix));
|
||||||
break;
|
break;
|
||||||
@ -229,10 +233,10 @@ nsSVGFEColorMatrixElement::Filter(nsSVGFilterInstance *instance,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
nsSVGFEColorMatrixElement::AttributeAffectsRendering(int32_t aNameSpaceID,
|
SVGFEColorMatrixElement::AttributeAffectsRendering(int32_t aNameSpaceID,
|
||||||
nsIAtom* aAttribute) const
|
nsIAtom* aAttribute) const
|
||||||
{
|
{
|
||||||
return nsSVGFEColorMatrixElementBase::AttributeAffectsRendering(aNameSpaceID, aAttribute) ||
|
return SVGFEColorMatrixElementBase::AttributeAffectsRendering(aNameSpaceID, aAttribute) ||
|
||||||
(aNameSpaceID == kNameSpaceID_None &&
|
(aNameSpaceID == kNameSpaceID_None &&
|
||||||
(aAttribute == nsGkAtoms::in ||
|
(aAttribute == nsGkAtoms::in ||
|
||||||
aAttribute == nsGkAtoms::type ||
|
aAttribute == nsGkAtoms::type ||
|
||||||
@ -243,21 +247,21 @@ nsSVGFEColorMatrixElement::AttributeAffectsRendering(int32_t aNameSpaceID,
|
|||||||
// nsSVGElement methods
|
// nsSVGElement methods
|
||||||
|
|
||||||
nsSVGElement::EnumAttributesInfo
|
nsSVGElement::EnumAttributesInfo
|
||||||
nsSVGFEColorMatrixElement::GetEnumInfo()
|
SVGFEColorMatrixElement::GetEnumInfo()
|
||||||
{
|
{
|
||||||
return EnumAttributesInfo(mEnumAttributes, sEnumInfo,
|
return EnumAttributesInfo(mEnumAttributes, sEnumInfo,
|
||||||
ArrayLength(sEnumInfo));
|
ArrayLength(sEnumInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsSVGElement::StringAttributesInfo
|
nsSVGElement::StringAttributesInfo
|
||||||
nsSVGFEColorMatrixElement::GetStringInfo()
|
SVGFEColorMatrixElement::GetStringInfo()
|
||||||
{
|
{
|
||||||
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
return StringAttributesInfo(mStringAttributes, sStringInfo,
|
||||||
ArrayLength(sStringInfo));
|
ArrayLength(sStringInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
nsSVGElement::NumberListAttributesInfo
|
nsSVGElement::NumberListAttributesInfo
|
||||||
nsSVGFEColorMatrixElement::GetNumberListInfo()
|
SVGFEColorMatrixElement::GetNumberListInfo()
|
||||||
{
|
{
|
||||||
return NumberListAttributesInfo(mNumberListAttributes, sNumberListInfo,
|
return NumberListAttributesInfo(mNumberListAttributes, sNumberListInfo,
|
||||||
ArrayLength(sNumberListInfo));
|
ArrayLength(sNumberListInfo));
|
||||||
|
@ -6,27 +6,41 @@
|
|||||||
#ifndef mozilla_dom_SVGFEColorMatrixElement_h
|
#ifndef mozilla_dom_SVGFEColorMatrixElement_h
|
||||||
#define mozilla_dom_SVGFEColorMatrixElement_h
|
#define mozilla_dom_SVGFEColorMatrixElement_h
|
||||||
|
|
||||||
typedef nsSVGFE nsSVGFEColorMatrixElementBase;
|
#include "nsSVGEnum.h"
|
||||||
|
#include "nsSVGFilters.h"
|
||||||
|
#include "SVGAnimatedNumberList.h"
|
||||||
|
|
||||||
|
nsresult NS_NewSVGFEColorMatrixElement(nsIContent **aResult,
|
||||||
|
already_AddRefed<nsINodeInfo> aNodeInfo);
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class nsSVGFEColorMatrixElement : public nsSVGFEColorMatrixElementBase,
|
typedef nsSVGFE SVGFEColorMatrixElementBase;
|
||||||
public nsIDOMSVGFEColorMatrixElement
|
|
||||||
|
static const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
|
||||||
|
static const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
|
||||||
|
static const unsigned short SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
|
||||||
|
static const unsigned short SVG_FECOLORMATRIX_TYPE_HUE_ROTATE = 3;
|
||||||
|
static const unsigned short SVG_FECOLORMATRIX_TYPE_LUMINANCE_TO_ALPHA = 4;
|
||||||
|
|
||||||
|
class SVGFEColorMatrixElement : public SVGFEColorMatrixElementBase,
|
||||||
|
public nsIDOMSVGElement
|
||||||
{
|
{
|
||||||
friend nsresult NS_NewSVGFEColorMatrixElement(nsIContent **aResult,
|
friend nsresult (::NS_NewSVGFEColorMatrixElement(nsIContent **aResult,
|
||||||
already_AddRefed<nsINodeInfo> aNodeInfo);
|
already_AddRefed<nsINodeInfo> aNodeInfo));
|
||||||
protected:
|
protected:
|
||||||
nsSVGFEColorMatrixElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
SVGFEColorMatrixElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
||||||
: nsSVGFEColorMatrixElementBase(aNodeInfo) {}
|
: SVGFEColorMatrixElementBase(aNodeInfo)
|
||||||
|
{
|
||||||
|
SetIsDOMBinding();
|
||||||
|
}
|
||||||
|
virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// interfaces:
|
// interfaces:
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
|
|
||||||
// FE Base
|
|
||||||
NS_FORWARD_NSIDOMSVGFILTERPRIMITIVESTANDARDATTRIBUTES(nsSVGFEColorMatrixElementBase::)
|
|
||||||
|
|
||||||
virtual nsresult Filter(nsSVGFilterInstance* aInstance,
|
virtual nsresult Filter(nsSVGFilterInstance* aInstance,
|
||||||
const nsTArray<const Image*>& aSources,
|
const nsTArray<const Image*>& aSources,
|
||||||
const Image* aTarget,
|
const Image* aTarget,
|
||||||
@ -36,19 +50,20 @@ public:
|
|||||||
virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; }
|
virtual nsSVGString& GetResultImageName() { return mStringAttributes[RESULT]; }
|
||||||
virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources);
|
virtual void GetSourceImageNames(nsTArray<nsSVGStringInfo>& aSources);
|
||||||
|
|
||||||
// Color Matrix
|
NS_FORWARD_NSIDOMSVGELEMENT(SVGFEColorMatrixElementBase::)
|
||||||
NS_DECL_NSIDOMSVGFECOLORMATRIXELEMENT
|
|
||||||
|
|
||||||
NS_FORWARD_NSIDOMSVGELEMENT(nsSVGFEColorMatrixElementBase::)
|
|
||||||
|
|
||||||
NS_FORWARD_NSIDOMNODE_TO_NSINODE
|
NS_FORWARD_NSIDOMNODE_TO_NSINODE
|
||||||
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
||||||
|
|
||||||
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
||||||
|
|
||||||
virtual nsXPCClassInfo* GetClassInfo();
|
|
||||||
|
|
||||||
virtual nsIDOMNode* AsDOMNode() { return this; }
|
virtual nsIDOMNode* AsDOMNode() { return this; }
|
||||||
|
|
||||||
|
// WebIDL
|
||||||
|
already_AddRefed<nsIDOMSVGAnimatedString> In1();
|
||||||
|
already_AddRefed<nsIDOMSVGAnimatedEnumeration> Type();
|
||||||
|
already_AddRefed<DOMSVGAnimatedNumberList> Values();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool OperatesOnPremultipledAlpha(int32_t) { return false; }
|
virtual bool OperatesOnPremultipledAlpha(int32_t) { return false; }
|
||||||
|
|
||||||
|
@ -48,8 +48,6 @@
|
|||||||
#undef LoadImage
|
#undef LoadImage
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define NUM_ENTRIES_IN_4x5_MATRIX 20
|
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
|
|
||||||
|
@ -809,8 +809,6 @@ static nsDOMClassInfoData sClassInfoData[] = {
|
|||||||
// SVG element classes
|
// SVG element classes
|
||||||
NS_DEFINE_CLASSINFO_DATA(TimeEvent, nsEventSH,
|
NS_DEFINE_CLASSINFO_DATA(TimeEvent, nsEventSH,
|
||||||
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
DOM_DEFAULT_SCRIPTABLE_FLAGS)
|
||||||
NS_DEFINE_CLASSINFO_DATA(SVGFEColorMatrixElement, nsElementSH,
|
|
||||||
ELEMENT_SCRIPTABLE_FLAGS)
|
|
||||||
NS_DEFINE_CLASSINFO_DATA(SVGFECompositeElement, nsElementSH,
|
NS_DEFINE_CLASSINFO_DATA(SVGFECompositeElement, nsElementSH,
|
||||||
ELEMENT_SCRIPTABLE_FLAGS)
|
ELEMENT_SCRIPTABLE_FLAGS)
|
||||||
NS_DEFINE_CLASSINFO_DATA(SVGFEConvolveMatrixElement, nsElementSH,
|
NS_DEFINE_CLASSINFO_DATA(SVGFEConvolveMatrixElement, nsElementSH,
|
||||||
@ -2236,12 +2234,6 @@ nsDOMClassInfo::Init()
|
|||||||
DOM_CLASSINFO_EVENT_MAP_ENTRIES
|
DOM_CLASSINFO_EVENT_MAP_ENTRIES
|
||||||
DOM_CLASSINFO_MAP_END
|
DOM_CLASSINFO_MAP_END
|
||||||
|
|
||||||
DOM_CLASSINFO_MAP_BEGIN(SVGFEColorMatrixElement, nsIDOMSVGFEColorMatrixElement)
|
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFEColorMatrixElement)
|
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFilterPrimitiveStandardAttributes)
|
|
||||||
DOM_CLASSINFO_SVG_ELEMENT_MAP_ENTRIES
|
|
||||||
DOM_CLASSINFO_MAP_END
|
|
||||||
|
|
||||||
DOM_CLASSINFO_MAP_BEGIN(SVGFECompositeElement, nsIDOMSVGFECompositeElement)
|
DOM_CLASSINFO_MAP_BEGIN(SVGFECompositeElement, nsIDOMSVGFECompositeElement)
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFECompositeElement)
|
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFECompositeElement)
|
||||||
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFilterPrimitiveStandardAttributes)
|
DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGFilterPrimitiveStandardAttributes)
|
||||||
|
@ -122,7 +122,6 @@ DOMCI_CLASS(SVGDocument)
|
|||||||
|
|
||||||
// SVG element classes
|
// SVG element classes
|
||||||
DOMCI_CLASS(TimeEvent)
|
DOMCI_CLASS(TimeEvent)
|
||||||
DOMCI_CLASS(SVGFEColorMatrixElement)
|
|
||||||
DOMCI_CLASS(SVGFECompositeElement)
|
DOMCI_CLASS(SVGFECompositeElement)
|
||||||
DOMCI_CLASS(SVGFEConvolveMatrixElement)
|
DOMCI_CLASS(SVGFEConvolveMatrixElement)
|
||||||
DOMCI_CLASS(SVGFEDiffuseLightingElement)
|
DOMCI_CLASS(SVGFEDiffuseLightingElement)
|
||||||
|
@ -21,22 +21,6 @@ interface nsIDOMSVGFilterPrimitiveStandardAttributes : nsIDOMSVGElement
|
|||||||
readonly attribute nsIDOMSVGAnimatedString result;
|
readonly attribute nsIDOMSVGAnimatedString result;
|
||||||
};
|
};
|
||||||
|
|
||||||
[scriptable, uuid(a73ab3fb-05fa-4153-95e7-b2194b90e57c)]
|
|
||||||
interface nsIDOMSVGFEColorMatrixElement : nsIDOMSVGFilterPrimitiveStandardAttributes
|
|
||||||
{
|
|
||||||
// Color Matrix Types
|
|
||||||
const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
|
|
||||||
const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
|
|
||||||
const unsigned short SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
|
|
||||||
const unsigned short SVG_FECOLORMATRIX_TYPE_HUE_ROTATE = 3;
|
|
||||||
const unsigned short SVG_FECOLORMATRIX_TYPE_LUMINANCE_TO_ALPHA = 4;
|
|
||||||
|
|
||||||
readonly attribute nsIDOMSVGAnimatedString in1;
|
|
||||||
readonly attribute nsIDOMSVGAnimatedEnumeration type;
|
|
||||||
// SVGAnimatedNumberList
|
|
||||||
readonly attribute nsISupports values;
|
|
||||||
};
|
|
||||||
|
|
||||||
[scriptable, uuid(f264fd1f-b272-4796-99b5-68c90cbd030c)]
|
[scriptable, uuid(f264fd1f-b272-4796-99b5-68c90cbd030c)]
|
||||||
interface nsIDOMSVGFECompositeElement : nsIDOMSVGFilterPrimitiveStandardAttributes
|
interface nsIDOMSVGFECompositeElement : nsIDOMSVGFilterPrimitiveStandardAttributes
|
||||||
{
|
{
|
||||||
|
30
dom/webidl/SVGFEColorMatrixElement.webidl
Normal file
30
dom/webidl/SVGFEColorMatrixElement.webidl
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||||
|
/* 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/.
|
||||||
|
*
|
||||||
|
* The origin of this IDL file is
|
||||||
|
* http://www.w3.org/TR/SVG2/
|
||||||
|
*
|
||||||
|
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
||||||
|
* liability, trademark and document use rules apply.
|
||||||
|
*/
|
||||||
|
|
||||||
|
interface SVGAnimatedEnumeration;
|
||||||
|
interface SVGAnimatedString;
|
||||||
|
|
||||||
|
interface SVGFEColorMatrixElement : SVGElement {
|
||||||
|
|
||||||
|
// Color Matrix Types
|
||||||
|
const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
|
||||||
|
const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
|
||||||
|
const unsigned short SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
|
||||||
|
const unsigned short SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3;
|
||||||
|
const unsigned short SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4;
|
||||||
|
|
||||||
|
readonly attribute SVGAnimatedString in1;
|
||||||
|
readonly attribute SVGAnimatedEnumeration type;
|
||||||
|
readonly attribute SVGAnimatedNumberList values;
|
||||||
|
};
|
||||||
|
|
||||||
|
SVGFEColorMatrixElement implements SVGFilterPrimitiveStandardAttributes;
|
@ -182,6 +182,7 @@ webidl_files = \
|
|||||||
SVGFilterElement.webidl \
|
SVGFilterElement.webidl \
|
||||||
SVGFilterPrimitiveStandardAttributes.webidl \
|
SVGFilterPrimitiveStandardAttributes.webidl \
|
||||||
SVGFEBlendElement.webidl \
|
SVGFEBlendElement.webidl \
|
||||||
|
SVGFEColorMatrixElement.webidl \
|
||||||
SVGFEComponentTransferElement.webidl \
|
SVGFEComponentTransferElement.webidl \
|
||||||
SVGFEDistantLightElement.webidl \
|
SVGFEDistantLightElement.webidl \
|
||||||
SVGFEFloodElement.webidl \
|
SVGFEFloodElement.webidl \
|
||||||
|
Loading…
Reference in New Issue
Block a user