tor-browser

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

CSSMathSum.h (1888B)


      1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim:set ts=2 sw=2 sts=2 et cindent: */
      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 LAYOUT_STYLE_TYPEDOM_CSSMATHSUM_H_
      8 #define LAYOUT_STYLE_TYPEDOM_CSSMATHSUM_H_
      9 
     10 #include "js/TypeDecls.h"
     11 #include "mozilla/RefPtr.h"
     12 #include "mozilla/dom/CSSMathValue.h"
     13 #include "mozilla/dom/CSSNumericArrayBindingFwd.h"
     14 #include "mozilla/dom/CSSNumericValueBindingFwd.h"
     15 #include "nsCycleCollectionParticipant.h"
     16 #include "nsISupportsImpl.h"
     17 
     18 template <class T>
     19 class nsCOMPtr;
     20 class nsISupports;
     21 
     22 namespace mozilla {
     23 
     24 struct CSSPropertyId;
     25 class ErrorResult;
     26 
     27 namespace dom {
     28 
     29 class CSSNumericArray;
     30 class GlobalObject;
     31 template <typename T>
     32 class Sequence;
     33 
     34 class CSSMathSum final : public CSSMathValue {
     35 public:
     36  CSSMathSum(nsCOMPtr<nsISupports> aParent, RefPtr<CSSNumericArray> aValues);
     37 
     38  NS_DECL_ISUPPORTS_INHERITED
     39  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CSSMathSum, CSSMathValue)
     40 
     41  JSObject* WrapObject(JSContext* aCx,
     42                       JS::Handle<JSObject*> aGivenProto) override;
     43 
     44  // start of CSSMathSum Web IDL declarations
     45 
     46  // https://www.w3.org/TR/css-typed-om-1/#dom-cssmathsum-cssmathsum
     47  static already_AddRefed<CSSMathSum> Constructor(
     48      const GlobalObject& aGlobal, const Sequence<OwningCSSNumberish>& aArgs,
     49      ErrorResult& aRv);
     50 
     51  CSSNumericArray* Values() const;
     52 
     53  // end of CSSMathSum Web IDL declarations
     54 
     55  void ToCssTextWithProperty(const CSSPropertyId& aPropertyId,
     56                             nsACString& aDest) const;
     57 
     58 private:
     59  virtual ~CSSMathSum() = default;
     60 
     61  RefPtr<CSSNumericArray> mValues;
     62 };
     63 
     64 }  // namespace dom
     65 }  // namespace mozilla
     66 
     67 #endif  // LAYOUT_STYLE_TYPEDOM_CSSMATHSUM_H_