tor-browser

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

DOMSVGAnimatedAngle.h (1379B)


      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_DOMSVGANIMATEDANGLE_H_
      8 #define DOM_SVG_DOMSVGANIMATEDANGLE_H_
      9 
     10 #include "SVGElement.h"
     11 #include "nsWrapperCache.h"
     12 
     13 namespace mozilla {
     14 
     15 class SVGAnimatedOrient;
     16 
     17 namespace dom {
     18 
     19 class DOMSVGAngle;
     20 
     21 class DOMSVGAnimatedAngle final : public nsWrapperCache {
     22 public:
     23  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(DOMSVGAnimatedAngle)
     24  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(DOMSVGAnimatedAngle)
     25 
     26  DOMSVGAnimatedAngle(SVGAnimatedOrient* aVal, SVGElement* aSVGElement)
     27      : mVal(aVal), mSVGElement(aSVGElement) {}
     28 
     29  // WebIDL
     30  SVGElement* GetParentObject() { return mSVGElement; }
     31  JSObject* WrapObject(JSContext* aCx,
     32                       JS::Handle<JSObject*> aGivenProto) override;
     33  already_AddRefed<DOMSVGAngle> BaseVal();
     34  already_AddRefed<DOMSVGAngle> AnimVal();
     35 
     36 protected:
     37  ~DOMSVGAnimatedAngle();
     38 
     39  SVGAnimatedOrient* mVal;  // kept alive because it belongs to content
     40  RefPtr<SVGElement> mSVGElement;
     41 };
     42 
     43 }  // namespace dom
     44 }  // namespace mozilla
     45 
     46 #endif  // DOM_SVG_DOMSVGANIMATEDANGLE_H_