CSSMathClamp.h (1731B)
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_CSSMATHCLAMP_H_ 8 #define LAYOUT_STYLE_TYPEDOM_CSSMATHCLAMP_H_ 9 10 #include "js/TypeDecls.h" 11 #include "mozilla/dom/CSSMathValue.h" 12 #include "mozilla/dom/CSSNumericValueBindingFwd.h" 13 14 template <class T> 15 struct already_AddRefed; 16 template <class T> 17 class nsCOMPtr; 18 class nsISupports; 19 20 namespace mozilla { 21 22 class ErrorResult; 23 24 namespace dom { 25 26 class GlobalObject; 27 28 class CSSMathClamp final : public CSSMathValue { 29 public: 30 explicit CSSMathClamp(nsCOMPtr<nsISupports> aParent); 31 32 JSObject* WrapObject(JSContext* aCx, 33 JS::Handle<JSObject*> aGivenProto) override; 34 35 // start of CSSMathClamp Web IDL declarations 36 37 static already_AddRefed<CSSMathClamp> Constructor(const GlobalObject& aGlobal, 38 const CSSNumberish& aLower, 39 const CSSNumberish& aValue, 40 const CSSNumberish& aUpper, 41 ErrorResult& aRv); 42 43 CSSNumericValue* GetLower(ErrorResult& aRv) const; 44 45 CSSNumericValue* GetValue(ErrorResult& aRv) const; 46 47 CSSNumericValue* GetUpper(ErrorResult& aRv) const; 48 49 // end of CSSMathClamp Web IDL declarations 50 51 private: 52 virtual ~CSSMathClamp() = default; 53 }; 54 55 } // namespace dom 56 } // namespace mozilla 57 58 #endif // LAYOUT_STYLE_TYPEDOM_CSSMATHCLAMP_H_