CSSUnparsedValue.h (1671B)
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_CSSUNPARSEDVALUE_H_ 8 #define LAYOUT_STYLE_TYPEDOM_CSSUNPARSEDVALUE_H_ 9 10 #include <stdint.h> 11 12 #include "js/TypeDecls.h" 13 #include "mozilla/dom/CSSStyleValue.h" 14 #include "mozilla/dom/CSSUnparsedValueBindingFwd.h" 15 16 template <class T> 17 struct already_AddRefed; 18 template <class T> 19 class nsCOMPtr; 20 class nsISupports; 21 22 namespace mozilla { 23 24 class ErrorResult; 25 26 namespace dom { 27 28 class GlobalObject; 29 template <typename T> 30 class Sequence; 31 32 class CSSUnparsedValue final : public CSSStyleValue { 33 public: 34 explicit CSSUnparsedValue(nsCOMPtr<nsISupports> aParent); 35 36 JSObject* WrapObject(JSContext* aCx, 37 JS::Handle<JSObject*> aGivenProto) override; 38 39 // start of CSSUnparsedValue Web IDL declarations 40 41 static already_AddRefed<CSSUnparsedValue> Constructor( 42 const GlobalObject& aGlobal, 43 const Sequence<OwningCSSUnparsedSegment>& aMembers); 44 45 uint32_t Length() const; 46 47 void IndexedGetter(uint32_t aIndex, bool& aFound, 48 OwningCSSUnparsedSegment& aRetVal); 49 50 void IndexedSetter(uint32_t aIndex, const CSSUnparsedSegment& aVal, 51 ErrorResult& aRv); 52 53 // end of CSSUnparsedValue Web IDL declarations 54 55 private: 56 virtual ~CSSUnparsedValue() = default; 57 }; 58 59 } // namespace dom 60 } // namespace mozilla 61 62 #endif // LAYOUT_STYLE_TYPEDOM_CSSUNPARSEDVALUE_H_