tor-browser

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

SVGAnimatedRect.cpp (1319B)


      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 #include "SVGAnimatedRect.h"
      8 
      9 #include "SVGAnimatedViewBox.h"
     10 #include "mozilla/dom/SVGAnimatedRectBinding.h"
     11 #include "mozilla/dom/SVGElement.h"
     12 #include "mozilla/dom/SVGRect.h"
     13 
     14 namespace mozilla::dom {
     15 
     16 NS_SVG_VAL_IMPL_CYCLE_COLLECTION_WRAPPERCACHED(SVGAnimatedRect, mSVGElement)
     17 
     18 SVGAnimatedRect::SVGAnimatedRect(SVGAnimatedViewBox* aVal,
     19                                 SVGElement* aSVGElement)
     20    : mVal(aVal), mSVGElement(aSVGElement) {}
     21 
     22 SVGAnimatedRect::~SVGAnimatedRect() {
     23  SVGAnimatedViewBox::sSVGAnimatedRectTearoffTable.RemoveTearoff(mVal);
     24 }
     25 
     26 already_AddRefed<SVGRect> SVGAnimatedRect::GetBaseVal() {
     27  return mVal->ToDOMBaseVal(mSVGElement);
     28 }
     29 
     30 already_AddRefed<SVGRect> SVGAnimatedRect::GetAnimVal() {
     31  return mVal->ToDOMAnimVal(mSVGElement);
     32 }
     33 
     34 JSObject* SVGAnimatedRect::WrapObject(JSContext* aCx,
     35                                      JS::Handle<JSObject*> aGivenProto) {
     36  return SVGAnimatedRect_Binding::Wrap(aCx, this, aGivenProto);
     37 }
     38 
     39 }  // namespace mozilla::dom