tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

SVGFEDiffuseLightingElement.h (2079B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef DOM_SVG_SVGFEDIFFUSELIGHTINGELEMENT_H_
      8 #define DOM_SVG_SVGFEDIFFUSELIGHTINGELEMENT_H_
      9 
     10 #include "mozilla/dom/SVGFilters.h"
     11 
     12 nsresult NS_NewSVGFEDiffuseLightingElement(
     13    nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
     14 
     15 namespace mozilla::dom {
     16 
     17 using SVGFEDiffuseLightingElementBase = SVGFELightingElement;
     18 
     19 class SVGFEDiffuseLightingElement final
     20    : public SVGFEDiffuseLightingElementBase {
     21  friend nsresult(::NS_NewSVGFEDiffuseLightingElement(
     22      nsIContent** aResult,
     23      already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
     24 
     25 protected:
     26  explicit SVGFEDiffuseLightingElement(
     27      already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
     28      : SVGFEDiffuseLightingElementBase(std::move(aNodeInfo)) {}
     29  JSObject* WrapNode(JSContext* aCx,
     30                     JS::Handle<JSObject*> aGivenProto) override;
     31 
     32 public:
     33  FilterPrimitiveDescription GetPrimitiveDescription(
     34      SVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
     35      const nsTArray<bool>& aInputsAreTainted,
     36      nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
     37  bool AttributeAffectsRendering(int32_t aNameSpaceID,
     38                                 nsAtom* aAttribute) const override;
     39 
     40  nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
     41 
     42  nsresult BindToTree(BindContext& aCtx, nsINode& aParent) override;
     43 
     44  // WebIDL
     45  already_AddRefed<DOMSVGAnimatedString> In1();
     46  already_AddRefed<DOMSVGAnimatedNumber> SurfaceScale();
     47  already_AddRefed<DOMSVGAnimatedNumber> DiffuseConstant();
     48  already_AddRefed<DOMSVGAnimatedNumber> KernelUnitLengthX();
     49  already_AddRefed<DOMSVGAnimatedNumber> KernelUnitLengthY();
     50 };
     51 
     52 }  // namespace mozilla::dom
     53 
     54 #endif  // DOM_SVG_SVGFEDIFFUSELIGHTINGELEMENT_H_