Bug 835065 - Part c: Move SVGComponentTransferFunctionElement and subclasses to Paris bindings; r=bz
authorMs2ger <ms2ger@gmail.com>
Tue, 12 Feb 2013 11:10:24 +0100
changeset 121514 7dcd291142be2940f8e1dfc63d0cec83494e3af2
parent 121513 845249dfa19df804f26483f0bd0867ada70ea28f
child 121515 8892ac17e3dfc94a486cbd622ededa3ee10311b0
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-esr52@cc37417e2c28 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs835065
milestone21.0a1
Bug 835065 - Part c: Move SVGComponentTransferFunctionElement and subclasses to Paris bindings; r=bz
content/svg/content/src/SVGComponentTransferFunctionElement.h
content/svg/content/src/nsSVGFilters.cpp
content/svg/content/src/nsSVGNumber2.cpp
content/svg/content/src/nsSVGNumber2.h
dom/bindings/Bindings.conf
dom/webidl/SVGComponentTransferFunctionElement.webidl
dom/webidl/SVGFEFuncAElement.webidl
dom/webidl/SVGFEFuncBElement.webidl
dom/webidl/SVGFEFuncGElement.webidl
dom/webidl/SVGFEFuncRElement.webidl
dom/webidl/WebIDL.mk
--- a/content/svg/content/src/SVGComponentTransferFunctionElement.h
+++ b/content/svg/content/src/SVGComponentTransferFunctionElement.h
@@ -1,85 +1,72 @@
 /* -*- Mode: C++; 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/. */
 
 #ifndef mozilla_dom_SVGComponentTransferFunctionElement_h
 #define mozilla_dom_SVGComponentTransferFunctionElement_h
 
-#include "mozilla/Util.h"
-
-#include "nsSVGElement.h"
-#include "nsGkAtoms.h"
-#include "nsSVGNumber2.h"
-#include "nsSVGNumberPair.h"
-#include "nsSVGInteger.h"
-#include "nsSVGIntegerPair.h"
-#include "nsSVGBoolean.h"
-#include "nsIDOMSVGFilters.h"
-#include "nsCOMPtr.h"
-#include "nsSVGFilterInstance.h"
-#include "nsIDOMSVGFilterElement.h"
 #include "nsSVGEnum.h"
-#include "SVGNumberList.h"
-#include "SVGAnimatedNumberList.h"
-#include "DOMSVGAnimatedNumberList.h"
 #include "nsSVGFilters.h"
-#include "nsLayoutUtils.h"
-#include "nsSVGUtils.h"
-#include "nsStyleContext.h"
-#include "nsIDocument.h"
-#include "nsIFrame.h"
-#include "gfxContext.h"
-#include "gfxMatrix.h"
-#include "imgIContainer.h"
-#include "nsNetUtil.h"
-#include "nsIInterfaceRequestorUtils.h"
-#include "nsSVGFilterElement.h"
-#include "nsSVGString.h"
-#include "nsSVGEffects.h"
-#include "gfxUtils.h"
-#include "SVGContentUtils.h"
-#include <algorithm>
-#include "nsContentUtils.h"
+#include "nsSVGNumber2.h"
+#include "SVGAnimatedNumberList.h"
+
 
 #define NS_SVG_FE_COMPONENT_TRANSFER_FUNCTION_ELEMENT_CID \
 { 0xafab106d, 0xbc18, 0x4f7f, \
   { 0x9e, 0x29, 0xfe, 0xb4, 0xb0, 0x16, 0x5f, 0xf4 } }
 
 nsresult NS_NewSVGComponentTransferFunctionElement(
   nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
 
 namespace mozilla {
+
+class DOMSVGAnimatedNumberList;
+
 namespace dom {
 
 typedef SVGFEUnstyledElement SVGComponentTransferFunctionElementBase;
 
 class SVGComponentTransferFunctionElement : public SVGComponentTransferFunctionElementBase
 {
   friend nsresult (::NS_NewSVGComponentTransferFunctionElement(
     nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo));
 protected:
   SVGComponentTransferFunctionElement(already_AddRefed<nsINodeInfo> aNodeInfo)
-    : SVGComponentTransferFunctionElementBase(aNodeInfo) {}
+    : SVGComponentTransferFunctionElementBase(aNodeInfo)
+  {
+    SetIsDOMBinding();
+  }
 
 public:
   // interfaces:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_SVG_FE_COMPONENT_TRANSFER_FUNCTION_ELEMENT_CID)
 
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_NSIDOMSVGCOMPONENTTRANSFERFUNCTIONELEMENT
 
   virtual bool AttributeAffectsRendering(
           int32_t aNameSpaceID, nsIAtom* aAttribute) const;
 
   virtual int32_t GetChannel() = 0;
   void GenerateLookupTable(uint8_t* aTable);
 
+  // WebIDL
+  virtual JSObject*
+  WrapNode(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) MOZ_OVERRIDE = 0;
+  already_AddRefed<nsIDOMSVGAnimatedEnumeration> Type();
+  already_AddRefed<DOMSVGAnimatedNumberList> TableValues();
+  already_AddRefed<nsIDOMSVGAnimatedNumber> Slope();
+  already_AddRefed<nsIDOMSVGAnimatedNumber> Intercept();
+  already_AddRefed<nsIDOMSVGAnimatedNumber> Amplitude();
+  already_AddRefed<nsIDOMSVGAnimatedNumber> Exponent();
+  already_AddRefed<nsIDOMSVGAnimatedNumber> Offset();
+
 protected:
   virtual NumberAttributesInfo GetNumberInfo();
   virtual EnumAttributesInfo GetEnumInfo();
   virtual NumberListAttributesInfo GetNumberListInfo();
 
   // nsIDOMSVGComponentTransferFunctionElement properties:
   enum { TABLEVALUES };
   SVGAnimatedNumberList mNumberListAttributes[1];
@@ -127,16 +114,19 @@ public:
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
   NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   virtual nsXPCClassInfo* GetClassInfo();
 
   virtual nsIDOMNode* AsDOMNode() { return this; }
+
+  virtual JSObject*
+  WrapNode(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) MOZ_OVERRIDE;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 nsresult NS_NewSVGFEFuncGElement(
   nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
 
@@ -166,16 +156,19 @@ public:
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
   NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   virtual nsXPCClassInfo* GetClassInfo();
 
   virtual nsIDOMNode* AsDOMNode() { return this; }
+
+  virtual JSObject*
+  WrapNode(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) MOZ_OVERRIDE;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 nsresult NS_NewSVGFEFuncBElement(
   nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
 
@@ -205,16 +198,19 @@ public:
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
   NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   virtual nsXPCClassInfo* GetClassInfo();
 
   virtual nsIDOMNode* AsDOMNode() { return this; }
+
+  virtual JSObject*
+  WrapNode(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) MOZ_OVERRIDE;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 nsresult NS_NewSVGFEFuncAElement(
   nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo);
 
@@ -244,14 +240,17 @@ public:
   NS_FORWARD_NSIDOMNODE_TO_NSINODE
   NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
 
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
 
   virtual nsXPCClassInfo* GetClassInfo();
 
   virtual nsIDOMNode* AsDOMNode() { return this; }
+
+  virtual JSObject*
+  WrapNode(JSContext* aCx, JSObject* aScope, bool* aTriedToWrap) MOZ_OVERRIDE;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_SVGComponentTransferFunctionElement_h
--- a/content/svg/content/src/nsSVGFilters.cpp
+++ b/content/svg/content/src/nsSVGFilters.cpp
@@ -34,16 +34,20 @@
 #include "nsSVGFilterElement.h"
 #include "nsSVGString.h"
 #include "nsSVGEffects.h"
 #include "gfxUtils.h"
 #include "SVGContentUtils.h"
 #include <algorithm>
 #include "nsContentUtils.h"
 #include "mozilla/dom/SVGComponentTransferFunctionElement.h"
+#include "mozilla/dom/SVGFEFuncAElementBinding.h"
+#include "mozilla/dom/SVGFEFuncBElementBinding.h"
+#include "mozilla/dom/SVGFEFuncGElementBinding.h"
+#include "mozilla/dom/SVGFEFuncRElementBinding.h"
 
 #if defined(XP_WIN) 
 // Prevent Windows redefining LoadImage
 #undef LoadImage
 #endif
 
 #define NUM_ENTRIES_IN_4x5_MATRIX 20
 
@@ -1884,57 +1888,98 @@ SVGComponentTransferFunctionElement::Att
           aAttribute == nsGkAtoms::offset ||
           aAttribute == nsGkAtoms::type);
 }
 
 //----------------------------------------------------------------------
 // nsIDOMSVGComponentTransferFunctionElement methods
 
 /* readonly attribute nsIDOMSVGAnimatedEnumeration type; */
+already_AddRefed<nsIDOMSVGAnimatedEnumeration>
+SVGComponentTransferFunctionElement::Type()
+{
+  return mEnumAttributes[TYPE].ToDOMAnimatedEnum(this);
+}
 NS_IMETHODIMP SVGComponentTransferFunctionElement::GetType(nsIDOMSVGAnimatedEnumeration * *aType)
 {
-  return mEnumAttributes[TYPE].ToDOMAnimatedEnum(aType, this);
+  *aType = Type().get();
+  return NS_OK;
 }
 
 /* readonly attribute DOMSVGAnimatedNumberList tableValues; */
+already_AddRefed<DOMSVGAnimatedNumberList>
+SVGComponentTransferFunctionElement::TableValues()
+{
+  return DOMSVGAnimatedNumberList::GetDOMWrapper(
+    &mNumberListAttributes[TABLEVALUES], this, TABLEVALUES);
+}
 NS_IMETHODIMP SVGComponentTransferFunctionElement::GetTableValues(nsISupports * *aTableValues)
 {
-  *aTableValues = DOMSVGAnimatedNumberList::GetDOMWrapper(&mNumberListAttributes[TABLEVALUES],
-                                                          this, TABLEVALUES).get();
+  *aTableValues = TableValues().get();
   return NS_OK;
 }
 
 /* readonly attribute nsIDOMSVGAnimatedNumber slope; */
+already_AddRefed<nsIDOMSVGAnimatedNumber>
+SVGComponentTransferFunctionElement::Slope()
+{
+  return mNumberAttributes[SLOPE].ToDOMAnimatedNumber(this);
+}
 NS_IMETHODIMP SVGComponentTransferFunctionElement::GetSlope(nsIDOMSVGAnimatedNumber * *aSlope)
 {
-  return mNumberAttributes[SLOPE].ToDOMAnimatedNumber(aSlope, this);
+  *aSlope = Slope().get();
+  return NS_OK;
 }
 
 /* readonly attribute nsIDOMSVGAnimatedNumber intercept; */
+already_AddRefed<nsIDOMSVGAnimatedNumber>
+SVGComponentTransferFunctionElement::Intercept()
+{
+  return mNumberAttributes[INTERCEPT].ToDOMAnimatedNumber(this);
+}
 NS_IMETHODIMP SVGComponentTransferFunctionElement::GetIntercept(nsIDOMSVGAnimatedNumber * *aIntercept)
 {
-  return mNumberAttributes[INTERCEPT].ToDOMAnimatedNumber(aIntercept, this);
+  *aIntercept = Intercept().get();
+  return NS_OK;
 }
 
 /* readonly attribute nsIDOMSVGAnimatedNumber amplitude; */
+already_AddRefed<nsIDOMSVGAnimatedNumber>
+SVGComponentTransferFunctionElement::Amplitude()
+{
+  return mNumberAttributes[AMPLITUDE].ToDOMAnimatedNumber(this);
+}
 NS_IMETHODIMP SVGComponentTransferFunctionElement::GetAmplitude(nsIDOMSVGAnimatedNumber * *aAmplitude)
 {
-  return mNumberAttributes[AMPLITUDE].ToDOMAnimatedNumber(aAmplitude, this);
+  *aAmplitude = Amplitude().get();
+  return NS_OK;
 }
 
 /* readonly attribute nsIDOMSVGAnimatedNumber exponent; */
+already_AddRefed<nsIDOMSVGAnimatedNumber>
+SVGComponentTransferFunctionElement::Exponent()
+{
+  return mNumberAttributes[EXPONENT].ToDOMAnimatedNumber(this);
+}
 NS_IMETHODIMP SVGComponentTransferFunctionElement::GetExponent(nsIDOMSVGAnimatedNumber * *aExponent)
 {
-  return mNumberAttributes[EXPONENT].ToDOMAnimatedNumber(aExponent, this);
+  *aExponent = Exponent().get();
+  return NS_OK;
 }
 
 /* readonly attribute nsIDOMSVGAnimatedNumber offset; */
+already_AddRefed<nsIDOMSVGAnimatedNumber>
+SVGComponentTransferFunctionElement::Offset()
+{
+  return mNumberAttributes[OFFSET].ToDOMAnimatedNumber(this);
+}
 NS_IMETHODIMP SVGComponentTransferFunctionElement::GetOffset(nsIDOMSVGAnimatedNumber * *aOffset)
 {
-  return mNumberAttributes[OFFSET].ToDOMAnimatedNumber(aOffset, this);
+  *aOffset = Offset().get();
+  return NS_OK;
 }
 
 void
 SVGComponentTransferFunctionElement::GenerateLookupTable(uint8_t *aTable)
 {
   uint16_t type = mEnumAttributes[TYPE].GetAnimValue();
 
   float slope, intercept, amplitude, exponent, offset;
@@ -2050,16 +2095,23 @@ namespace dom {
 NS_INTERFACE_TABLE_HEAD(SVGFEFuncRElement)
   NS_NODE_INTERFACE_TABLE5(SVGFEFuncRElement, nsIDOMNode, nsIDOMElement,
                            nsIDOMSVGElement,
                            nsIDOMSVGComponentTransferFunctionElement,
                            nsIDOMSVGFEFuncRElement)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGFEFuncRElement)
 NS_INTERFACE_MAP_END_INHERITING(SVGComponentTransferFunctionElement)
 
+/* virtual */ JSObject*
+SVGFEFuncRElement::WrapNode(JSContext* aCx, JSObject* aScope,
+                            bool* aTriedToWrap)
+{
+  return SVGFEFuncRElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
+}
+
 } // namespace dom
 } // namespace mozilla
 
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEFuncR)
 
 namespace mozilla {
 namespace dom {
 
@@ -2080,16 +2132,23 @@ namespace dom {
 NS_INTERFACE_TABLE_HEAD(SVGFEFuncGElement)
   NS_NODE_INTERFACE_TABLE5(SVGFEFuncGElement, nsIDOMNode, nsIDOMElement,
                            nsIDOMSVGElement,
                            nsIDOMSVGComponentTransferFunctionElement,
                            nsIDOMSVGFEFuncGElement)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGFEFuncGElement)
 NS_INTERFACE_MAP_END_INHERITING(SVGComponentTransferFunctionElement)
 
+/* virtual */ JSObject*
+SVGFEFuncGElement::WrapNode(JSContext* aCx, JSObject* aScope,
+                            bool* aTriedToWrap)
+{
+  return SVGFEFuncGElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
+}
+
 } // namespace dom
 } // namespace mozilla
 
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEFuncG)
 
 namespace mozilla {
 namespace dom {
 
@@ -2110,16 +2169,23 @@ namespace dom {
 NS_INTERFACE_TABLE_HEAD(SVGFEFuncBElement)
   NS_NODE_INTERFACE_TABLE5(SVGFEFuncBElement, nsIDOMNode, nsIDOMElement,
                            nsIDOMSVGElement,
                            nsIDOMSVGComponentTransferFunctionElement,
                            nsIDOMSVGFEFuncBElement)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGFEFuncBElement)
 NS_INTERFACE_MAP_END_INHERITING(SVGComponentTransferFunctionElement)
 
+/* virtual */ JSObject*
+SVGFEFuncBElement::WrapNode(JSContext* aCx, JSObject* aScope,
+                            bool* aTriedToWrap)
+{
+  return SVGFEFuncBElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
+}
+
 } // namespace dom
 } // namespace mozilla
 
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEFuncB)
 
 namespace mozilla {
 namespace dom {
 
@@ -2140,16 +2206,23 @@ namespace dom {
 NS_INTERFACE_TABLE_HEAD(SVGFEFuncAElement)
   NS_NODE_INTERFACE_TABLE5(SVGFEFuncAElement, nsIDOMNode, nsIDOMElement,
                            nsIDOMSVGElement,
                            nsIDOMSVGComponentTransferFunctionElement,
                            nsIDOMSVGFEFuncAElement)
   NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(SVGFEFuncAElement)
 NS_INTERFACE_MAP_END_INHERITING(SVGComponentTransferFunctionElement)
 
+/* virtual */ JSObject*
+SVGFEFuncAElement::WrapNode(JSContext* aCx, JSObject* aScope,
+                            bool* aTriedToWrap)
+{
+  return SVGFEFuncAElementBinding::Wrap(aCx, aScope, this, aTriedToWrap);
+}
+
 } // namespace dom
 } // namespace mozilla
 
 NS_IMPL_NS_NEW_NAMESPACED_SVG_ELEMENT(FEFuncA)
 
 namespace mozilla {
 namespace dom {
 
--- a/content/svg/content/src/nsSVGNumber2.cpp
+++ b/content/svg/content/src/nsSVGNumber2.cpp
@@ -146,28 +146,34 @@ nsSVGNumber2::SetAnimValue(float aValue,
   if (mIsAnimated && aValue == mAnimVal) {
     return;
   }
   mAnimVal = aValue;
   mIsAnimated = true;
   aSVGElement->DidAnimateNumber(mAttrEnum);
 }
 
-nsresult
-nsSVGNumber2::ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber **aResult,
-                                  nsSVGElement *aSVGElement)
+already_AddRefed<nsIDOMSVGAnimatedNumber>
+nsSVGNumber2::ToDOMAnimatedNumber(nsSVGElement* aSVGElement)
 {
   nsRefPtr<DOMAnimatedNumber> domAnimatedNumber =
     sSVGAnimatedNumberTearoffTable.GetTearoff(this);
   if (!domAnimatedNumber) {
     domAnimatedNumber = new DOMAnimatedNumber(this, aSVGElement);
     sSVGAnimatedNumberTearoffTable.AddTearoff(this, domAnimatedNumber);
   }
 
-  domAnimatedNumber.forget(aResult);
+  return domAnimatedNumber.forget();
+}
+
+nsresult
+nsSVGNumber2::ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber **aResult,
+                                  nsSVGElement *aSVGElement)
+{
+  *aResult = ToDOMAnimatedNumber(aSVGElement).get();
   return NS_OK;
 }
 
 nsSVGNumber2::DOMAnimatedNumber::~DOMAnimatedNumber()
 {
   sSVGAnimatedNumberTearoffTable.RemoveTearoff(mVal);
 }
 
--- a/content/svg/content/src/nsSVGNumber2.h
+++ b/content/svg/content/src/nsSVGNumber2.h
@@ -43,16 +43,18 @@ public:
   // Returns true if the animated value of this number has been explicitly
   // set (either by animation, or by taking on the base value which has been
   // explicitly set by markup or a DOM call), false otherwise.
   // If this returns false, the animated value is still valid, that is,
   // useable, and represents the default base value of the attribute.
   bool IsExplicitlySet() const
     { return mIsAnimated || mIsBaseSet; }
 
+  already_AddRefed<nsIDOMSVGAnimatedNumber>
+  ToDOMAnimatedNumber(nsSVGElement* aSVGElement);
   nsresult ToDOMAnimatedNumber(nsIDOMSVGAnimatedNumber **aResult,
                                nsSVGElement* aSVGElement);
   // Returns a new nsISMILAttr object that the caller must delete
   nsISMILAttr* ToSMILAttr(nsSVGElement* aSVGElement);
 
 private:
 
   float mAnimVal;
--- a/dom/bindings/Bindings.conf
+++ b/dom/bindings/Bindings.conf
@@ -731,23 +731,43 @@ DOMInterfaces = {
     'headerFile': 'DOMSVGAnimatedTransformList.h'
 },
 
 'SVGAnimationElement': {
     'resultNotAddRefed': ['targetElement'],
     'concrete': False
 },
 
+'SVGComponentTransferFunctionElement': {
+    'concrete': False,
+},
+
 'SVGElement': {
     'nativeType': 'nsSVGElement',
     'hasXPConnectImpls': True,
     'hasInstanceInterface': 'nsIDOMSVGElement',
     'resultNotAddRefed': ['ownerSVGElement', 'viewportElement', 'style']
 },
 
+'SVGFEFuncAElement': {
+    'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h',
+},
+
+'SVGFEFuncBElement': {
+    'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h',
+},
+
+'SVGFEFuncGElement': {
+    'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h',
+},
+
+'SVGFEFuncRElement': {
+    'headerFile': 'mozilla/dom/SVGComponentTransferFunctionElement.h',
+},
+
 'SVGGraphicsElement': {
     'concrete': False,
     'resultNotAddRefed': ['nearestViewportElement', 'farthestViewportElement']
 },
 
 'SVGGradientElement': {
     'concrete': False,
 },
new file mode 100644
--- /dev/null
+++ b/dom/webidl/SVGComponentTransferFunctionElement.webidl
@@ -0,0 +1,29 @@
+/* -*- 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
+ * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGComponentTransferFunctionElement : SVGElement {
+  // Component Transfer Types
+  const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
+  const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
+  const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2;
+  const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3;
+  const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4;
+  const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5;
+
+  readonly attribute SVGAnimatedEnumeration type;
+  readonly attribute SVGAnimatedNumberList tableValues;
+  readonly attribute SVGAnimatedNumber slope;
+  readonly attribute SVGAnimatedNumber intercept;
+  readonly attribute SVGAnimatedNumber amplitude;
+  readonly attribute SVGAnimatedNumber exponent;
+  readonly attribute SVGAnimatedNumber offset;
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/SVGFEFuncAElement.webidl
@@ -0,0 +1,14 @@
+/* -*- 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
+ * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEFuncAElement : SVGComponentTransferFunctionElement {
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/SVGFEFuncBElement.webidl
@@ -0,0 +1,14 @@
+/* -*- 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
+ * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEFuncBElement : SVGComponentTransferFunctionElement {
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/SVGFEFuncGElement.webidl
@@ -0,0 +1,14 @@
+/* -*- 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
+ * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEFuncGElement : SVGComponentTransferFunctionElement {
+};
new file mode 100644
--- /dev/null
+++ b/dom/webidl/SVGFEFuncRElement.webidl
@@ -0,0 +1,14 @@
+/* -*- 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
+ * https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html
+ *
+ * Copyright © 2013 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
+ * liability, trademark and document use rules apply.
+ */
+
+interface SVGFEFuncRElement : SVGComponentTransferFunctionElement {
+};
--- a/dom/webidl/WebIDL.mk
+++ b/dom/webidl/WebIDL.mk
@@ -134,20 +134,25 @@ webidl_files = \
   SVGAnimatedPreserveAspectRatio.webidl \
   SVGAnimatedTransformList.webidl \
   SVGAnimateElement.webidl \
   SVGAnimateMotionElement.webidl \
   SVGAnimateTransformElement.webidl \
   SVGAnimationElement.webidl \
   SVGCircleElement.webidl \
   SVGClipPathElement.webidl \
+  SVGComponentTransferFunctionElement.webidl \
   SVGDefsElement.webidl \
   SVGDescElement.webidl \
   SVGElement.webidl \
   SVGEllipseElement.webidl \
+  SVGFEFuncAElement.webidl \
+  SVGFEFuncBElement.webidl \
+  SVGFEFuncGElement.webidl \
+  SVGFEFuncRElement.webidl \
   SVGFitToViewBox.webidl \
   SVGForeignObjectElement.webidl \
   SVGGElement.webidl \
   SVGGradientElement.webidl \
   SVGGraphicsElement.webidl \
   SVGImageElement.webidl \
   SVGLengthList.webidl \
   SVGLinearGradientElement.webidl \