/* 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 LAYOUT_STYLE_TYPEDOM_CSSTRANSFORMVALUE_H_ #define LAYOUT_STYLE_TYPEDOM_CSSTRANSFORMVALUE_H_ #include #include "js/TypeDecls.h" #include "mozilla/RefPtr.h" #include "mozilla/dom/CSSStyleValue.h" #include "mozilla/dom/CSSTransformComponentBindingFwd.h" #include "mozilla/dom/DOMMatrixBindingFwd.h" #include "nsCycleCollectionParticipant.h" #include "nsISupportsImpl.h" #include "nsTArray.h" template struct already_AddRefed; template class nsCOMPtr; class nsISupports; namespace mozilla { class ErrorResult; template class OwningNonNull; namespace dom { class GlobalObject; template class Sequence; class CSSTransformValue final : public CSSStyleValue { public: CSSTransformValue(nsCOMPtr aParent, nsTArray> aValues); NS_DECL_ISUPPORTS_INHERITED NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(CSSTransformValue, CSSStyleValue) JSObject* WrapObject(JSContext* aCx, JS::Handle aGivenProto) override; // start of CSSTransformValue Web IDL declarations // https://drafts.css-houdini.org/css-typed-om-1/#dom-csstransformvalue-csstransformvalue static already_AddRefed Constructor( const GlobalObject& aGlobal, const Sequence>& aTransforms, ErrorResult& aRv); // https://drafts.css-houdini.org/css-typed-om-1/#dom-csstransformvalue-length uint32_t Length() const; bool Is2D() const; already_AddRefed ToMatrix(ErrorResult& aRv); CSSTransformComponent* IndexedGetter(uint32_t aIndex, bool& aFound); void IndexedSetter(uint32_t aIndex, CSSTransformComponent& aVal, ErrorResult& aRv); // end of CSSTransformValue Web IDL declarations void ToCssTextWithProperty(const CSSPropertyId& aPropertyId, nsACString& aDest) const; private: virtual ~CSSTransformValue() = default; // https://drafts.css-houdini.org/css-typed-om-1/#dom-csstransformvalue-values-slot nsTArray> mValues; }; } // namespace dom } // namespace mozilla #endif // LAYOUT_STYLE_TYPEDOM_CSSTRANSFORMVALUE_H_