CSSRotate.cpp (2436B)
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/CSSRotate.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/CSSNumericValueBinding.h" 14 #include "mozilla/dom/CSSRotateBinding.h" 15 16 namespace mozilla::dom { 17 18 CSSRotate::CSSRotate(nsCOMPtr<nsISupports> aParent) 19 : CSSTransformComponent(std::move(aParent)) {} 20 21 JSObject* CSSRotate::WrapObject(JSContext* aCx, 22 JS::Handle<JSObject*> aGivenProto) { 23 return CSSRotate_Binding::Wrap(aCx, this, aGivenProto); 24 } 25 26 // start of CSSRotate Web IDL implementation 27 28 // static 29 already_AddRefed<CSSRotate> CSSRotate::Constructor(const GlobalObject& aGlobal, 30 CSSNumericValue& aAngle, 31 ErrorResult& aRv) { 32 return MakeAndAddRef<CSSRotate>(aGlobal.GetAsSupports()); 33 } 34 35 // static 36 already_AddRefed<CSSRotate> CSSRotate::Constructor( 37 const GlobalObject& aGlobal, const CSSNumberish& aX, const CSSNumberish& aY, 38 const CSSNumberish& aZ, CSSNumericValue& aAngle, ErrorResult& aRv) { 39 return MakeAndAddRef<CSSRotate>(aGlobal.GetAsSupports()); 40 } 41 42 void CSSRotate::GetX(OwningCSSNumberish& aRetVal) const { 43 aRetVal.SetAsDouble() = 0; 44 } 45 46 void CSSRotate::SetX(const CSSNumberish& aArg, ErrorResult& aRv) { 47 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); 48 } 49 50 void CSSRotate::GetY(OwningCSSNumberish& aRetVal) const { 51 aRetVal.SetAsDouble() = 0; 52 } 53 54 void CSSRotate::SetY(const CSSNumberish& aArg, ErrorResult& aRv) { 55 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); 56 } 57 58 void CSSRotate::GetZ(OwningCSSNumberish& aRetVal) const { 59 aRetVal.SetAsDouble() = 0; 60 } 61 62 void CSSRotate::SetZ(const CSSNumberish& aArg, ErrorResult& aRv) { 63 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); 64 } 65 66 CSSNumericValue* CSSRotate::GetAngle(ErrorResult& aRv) const { 67 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); 68 return nullptr; 69 } 70 71 void CSSRotate::SetAngle(CSSNumericValue& aArg, ErrorResult& aRv) { 72 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); 73 } 74 75 // end of CSSRotate Web IDL implementation 76 77 } // namespace mozilla::dom