CSSLCH.cpp (2287B)
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/CSSLCH.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/CSSColorValueBinding.h" 14 #include "mozilla/dom/CSSLCHBinding.h" 15 16 namespace mozilla::dom { 17 18 CSSLCH::CSSLCH(nsCOMPtr<nsISupports> aParent) 19 : CSSColorValue(std::move(aParent)) {} 20 21 JSObject* CSSLCH::WrapObject(JSContext* aCx, 22 JS::Handle<JSObject*> aGivenProto) { 23 return CSSLCH_Binding::Wrap(aCx, this, aGivenProto); 24 } 25 26 // start of CSSLCH Web IDL implementation 27 28 // static 29 already_AddRefed<CSSLCH> CSSLCH::Constructor(const GlobalObject& aGlobal, 30 const CSSColorPercent& aL, 31 const CSSColorPercent& aC, 32 const CSSColorAngle& aH, 33 const CSSColorPercent& aAlpha, 34 ErrorResult& aRv) { 35 return MakeAndAddRef<CSSLCH>(aGlobal.GetAsSupports()); 36 } 37 38 void CSSLCH::GetL(OwningCSSColorPercent& aRetVal) const { 39 aRetVal.SetAsDouble() = 0; 40 } 41 42 void CSSLCH::SetL(const CSSColorPercent& aArg, ErrorResult& aRv) { 43 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); 44 } 45 46 void CSSLCH::GetC(OwningCSSColorPercent& aRetVal) const { 47 aRetVal.SetAsDouble() = 0; 48 } 49 50 void CSSLCH::SetC(const CSSColorPercent& aArg, ErrorResult& aRv) { 51 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); 52 } 53 54 void CSSLCH::GetH(OwningCSSColorAngle& aRetVal) const { 55 aRetVal.SetAsDouble() = 0; 56 } 57 58 void CSSLCH::SetH(const CSSColorAngle& aArg, ErrorResult& aRv) { 59 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); 60 } 61 62 void CSSLCH::GetAlpha(OwningCSSColorPercent& aRetVal) const { 63 aRetVal.SetAsDouble() = 0; 64 } 65 66 void CSSLCH::SetAlpha(const CSSColorPercent& aArg, ErrorResult& aRv) { 67 aRv.Throw(NS_ERROR_NOT_IMPLEMENTED); 68 } 69 70 // end of CSSLCH Web IDL implementation 71 72 } // namespace mozilla::dom