CSSUnparsedValue.cpp (1692B)
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 #include "mozilla/dom/CSSUnparsedValue.h" 8 9 #include "mozilla/AlreadyAddRefed.h" 10 #include "mozilla/ErrorResult.h" 11 #include "mozilla/RefPtr.h" 12 #include "mozilla/dom/BindingDeclarations.h" 13 #include "mozilla/dom/CSSUnparsedValueBinding.h" 14 15 namespace mozilla::dom { 16 17 CSSUnparsedValue::CSSUnparsedValue(nsCOMPtr<nsISupports> aParent) 18 : CSSStyleValue(std::move(aParent)) {} 19 20 JSObject* CSSUnparsedValue::WrapObject(JSContext* aCx, 21 JS::Handle<JSObject*> aGivenProto) { 22 return CSSUnparsedValue_Binding::Wrap(aCx, this, aGivenProto); 23 } 24 25 // start of CSSUnparsedValue Web IDL implementation 26 27 // static 28 already_AddRefed<CSSUnparsedValue> CSSUnparsedValue::Constructor( 29 const GlobalObject& aGlobal, 30 const Sequence<OwningCSSUnparsedSegment>& aMembers) { 31 return MakeAndAddRef<CSSUnparsedValue>(aGlobal.GetAsSupports()); 32 } 33 34 uint32_t CSSUnparsedValue::Length() const { return 0; } 35 36 void CSSUnparsedValue::IndexedGetter(uint32_t aIndex, bool& aFound, 37 OwningCSSUnparsedSegment& aRetVal) {} 38 39 void CSSUnparsedValue::IndexedSetter(uint32_t aIndex, 40 const CSSUnparsedSegment& aVal, 41 ErrorResult& aRv) { 42 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); 43 } 44 45 // end of CSSUnparsedValue Web IDL implementation 46 47 } // namespace mozilla::dom