/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef MOZILLA_DOMSVGANIMATEDLENGTHLIST_H__ #define MOZILLA_DOMSVGANIMATEDLENGTHLIST_H__ #include "nsCOMPtr.h" #include "nsCycleCollectionParticipant.h" #include "SVGElement.h" #include "mozilla/Attributes.h" namespace mozilla { class SVGAnimatedLengthList; class SVGLengthList; namespace dom { class DOMSVGLengthList; /** * Class DOMSVGAnimatedLengthList * * This class is used to create the DOM tearoff objects that wrap internal * SVGAnimatedLengthList objects. We have this internal-DOM split because DOM * classes are relatively heavy-weight objects with non-optimal interfaces for * internal code, and they're relatively infrequently used. Having separate * internal and DOM classes does add complexity - especially for lists where * the internal list and DOM lists (and their items) need to be kept in sync - * but it keeps the internal classes light and fast, and in 99% of cases * they're all that's used. DOM wrappers are only instantiated when script * demands it. * * Ownership model: * * The diagram below shows the ownership model between the various DOM objects * in the tree of DOM objects that correspond to an SVG length list attribute. * The angled brackets ">" and "<" denote a reference from one object to * another, where the "!" character denotes a strong reference, and the "~" * character denotes a weak reference. * * .----