tor-browser

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

DOMSVGAnimatedNumber.h (1218B)


      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_DOMSVGANIMATEDNUMBER_H_
      8 #define DOM_SVG_DOMSVGANIMATEDNUMBER_H_
      9 
     10 #include "SVGElement.h"
     11 #include "nsWrapperCache.h"
     12 
     13 namespace mozilla::dom {
     14 
     15 class DOMSVGAnimatedNumber : public nsWrapperCache {
     16 public:
     17  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMSVGAnimatedNumber)
     18  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMSVGAnimatedNumber)
     19 
     20  SVGElement* GetParentObject() const { return mSVGElement; }
     21 
     22  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
     23 
     24  virtual float BaseVal() = 0;
     25  virtual void SetBaseVal(float aBaseVal) = 0;
     26  virtual float AnimVal() = 0;
     27 
     28 protected:
     29  explicit DOMSVGAnimatedNumber(SVGElement* aSVGElement)
     30      : mSVGElement(aSVGElement) {}
     31  virtual ~DOMSVGAnimatedNumber() = default;
     32 
     33  RefPtr<SVGElement> mSVGElement;
     34 };
     35 
     36 }  // namespace mozilla::dom
     37 
     38 #endif  // DOM_SVG_DOMSVGANIMATEDNUMBER_H_