tor-browser

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

SVGFESpecularLightingElement.h (2211B)


      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_SVGFESPECULARLIGHTINGELEMENT_H_
      8 #define DOM_SVG_SVGFESPECULARLIGHTINGELEMENT_H_
      9 
     10 #include "mozilla/dom/SVGFilters.h"
     11 
     12 nsresult NS_NewSVGFESpecularLightingElement(
     13    nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
     14 
     15 namespace mozilla::dom {
     16 
     17 //---------------------SpecularLighting------------------------
     18 
     19 using SVGFESpecularLightingElementBase = SVGFELightingElement;
     20 
     21 class SVGFESpecularLightingElement final
     22    : public SVGFESpecularLightingElementBase {
     23  friend nsresult(::NS_NewSVGFESpecularLightingElement(
     24      nsIContent** aResult,
     25      already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
     26 
     27 protected:
     28  explicit SVGFESpecularLightingElement(
     29      already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
     30      : SVGFESpecularLightingElementBase(std::move(aNodeInfo)) {}
     31  JSObject* WrapNode(JSContext* aCx,
     32                     JS::Handle<JSObject*> aGivenProto) override;
     33 
     34 public:
     35  nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
     36 
     37  nsresult BindToTree(BindContext&, nsINode& aParent) override;
     38 
     39  FilterPrimitiveDescription GetPrimitiveDescription(
     40      SVGFilterInstance* aInstance, const IntRect& aFilterSubregion,
     41      const nsTArray<bool>& aInputsAreTainted,
     42      nsTArray<RefPtr<SourceSurface>>& aInputImages) override;
     43  bool AttributeAffectsRendering(int32_t aNameSpaceID,
     44                                 nsAtom* aAttribute) const override;
     45 
     46  // WebIDL
     47  already_AddRefed<DOMSVGAnimatedString> In1();
     48  already_AddRefed<DOMSVGAnimatedNumber> SurfaceScale();
     49  already_AddRefed<DOMSVGAnimatedNumber> SpecularConstant();
     50  already_AddRefed<DOMSVGAnimatedNumber> SpecularExponent();
     51  already_AddRefed<DOMSVGAnimatedNumber> KernelUnitLengthX();
     52  already_AddRefed<DOMSVGAnimatedNumber> KernelUnitLengthY();
     53 };
     54 
     55 }  // namespace mozilla::dom
     56 
     57 #endif  // DOM_SVG_SVGFESPECULARLIGHTINGELEMENT_H_