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