CSSPerspective.cpp (1566B)
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/CSSPerspective.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/CSSPerspectiveBinding.h" 14 #include "nsReadableUtils.h" 15 16 namespace mozilla::dom { 17 18 CSSPerspective::CSSPerspective(nsCOMPtr<nsISupports> aParent) 19 : CSSTransformComponent(std::move(aParent)) {} 20 21 JSObject* CSSPerspective::WrapObject(JSContext* aCx, 22 JS::Handle<JSObject*> aGivenProto) { 23 return CSSPerspective_Binding::Wrap(aCx, this, aGivenProto); 24 } 25 26 // start of CSSPerspective Web IDL implementation 27 28 // static 29 already_AddRefed<CSSPerspective> CSSPerspective::Constructor( 30 const GlobalObject& aGlobal, const CSSPerspectiveValue& aLength, 31 ErrorResult& aRv) { 32 return MakeAndAddRef<CSSPerspective>(aGlobal.GetAsSupports()); 33 } 34 35 void CSSPerspective::GetLength(OwningCSSPerspectiveValue& aRetVal) const { 36 aRetVal.SetAsUTF8String() = EmptyCString(); 37 } 38 39 void CSSPerspective::SetLength(const CSSPerspectiveValue& aArg, 40 ErrorResult& aRv) { 41 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); 42 } 43 44 // end of CSSPerspective Web IDL implementation 45 46 } // namespace mozilla::dom