tor-browser

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

SVGAnimatedClassOrString.h (1812B)


      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_SVGANIMATEDCLASSORSTRING_H_
      8 #define DOM_SVG_SVGANIMATEDCLASSORSTRING_H_
      9 
     10 #include "mozilla/AlreadyAddRefed.h"
     11 #include "nsStringFwd.h"
     12 
     13 class nsIPrincipal;
     14 
     15 namespace mozilla {
     16 
     17 class ErrorResult;
     18 
     19 namespace dom {
     20 class DOMSVGAnimatedString;
     21 class SVGElement;
     22 class OwningTrustedScriptURLOrString;
     23 class TrustedScriptURLOrString;
     24 }  // namespace dom
     25 
     26 class SVGAnimatedClassOrString {
     27 public:
     28  using SVGElement = dom::SVGElement;
     29  using OwningTrustedScriptURLOrString = dom::OwningTrustedScriptURLOrString;
     30  using TrustedScriptURLOrString = dom::TrustedScriptURLOrString;
     31 
     32  virtual void SetBaseValue(const nsAString& aValue, SVGElement* aSVGElement,
     33                            bool aDoSetAttr) = 0;
     34  MOZ_CAN_RUN_SCRIPT virtual void SetBaseValue(
     35      const TrustedScriptURLOrString& aValue, SVGElement* aSVGElement,
     36      bool aDoSetAttr, nsIPrincipal* aSubjectPrincipal, ErrorResult& aRv);
     37  virtual void GetBaseValue(nsAString& aValue,
     38                            const SVGElement* aSVGElement) const = 0;
     39  virtual void GetBaseValue(OwningTrustedScriptURLOrString& aValue,
     40                            const SVGElement* aSVGElement) const;
     41 
     42  virtual void GetAnimValue(nsAString& aResult,
     43                            const SVGElement* aSVGElement) const = 0;
     44 
     45  already_AddRefed<dom::DOMSVGAnimatedString> ToDOMAnimatedString(
     46      SVGElement* aSVGElement);
     47 
     48  void RemoveTearoff();
     49 };
     50 
     51 }  // namespace mozilla
     52 
     53 #endif  // DOM_SVG_SVGANIMATEDCLASSORSTRING_H_