tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

CSSHWB.cpp (2066B)


      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/CSSHWB.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/CSSHWBBinding.h"
     14 #include "mozilla/dom/CSSNumericValueBinding.h"
     15 
     16 namespace mozilla::dom {
     17 
     18 CSSHWB::CSSHWB(nsCOMPtr<nsISupports> aParent)
     19    : CSSColorValue(std::move(aParent)) {}
     20 
     21 JSObject* CSSHWB::WrapObject(JSContext* aCx,
     22                             JS::Handle<JSObject*> aGivenProto) {
     23  return CSSHWB_Binding::Wrap(aCx, this, aGivenProto);
     24 }
     25 
     26 // start of CSSHWB Web IDL implementation
     27 
     28 // static
     29 already_AddRefed<CSSHWB> CSSHWB::Constructor(
     30    const GlobalObject& aGlobal, CSSNumericValue& aH, const CSSNumberish& aW,
     31    const CSSNumberish& aB, const CSSNumberish& aAlpha, ErrorResult& aRv) {
     32  return MakeAndAddRef<CSSHWB>(aGlobal.GetAsSupports());
     33 }
     34 
     35 CSSNumericValue* CSSHWB::GetH(ErrorResult& aRv) const {
     36  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     37  return nullptr;
     38 }
     39 
     40 void CSSHWB::SetH(CSSNumericValue& aArg, ErrorResult& aRv) {
     41  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     42 }
     43 
     44 void CSSHWB::GetW(OwningCSSNumberish& aRetVal) const {
     45  aRetVal.SetAsDouble() = 0;
     46 }
     47 
     48 void CSSHWB::SetW(const CSSNumberish& aArg, ErrorResult& aRv) {
     49  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     50 }
     51 
     52 void CSSHWB::GetB(OwningCSSNumberish& aRetVal) const {
     53  aRetVal.SetAsDouble() = 0;
     54 }
     55 
     56 void CSSHWB::SetB(const CSSNumberish& aArg, ErrorResult& aRv) {
     57  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     58 }
     59 
     60 void CSSHWB::GetAlpha(OwningCSSNumberish& aRetVal) const {
     61  aRetVal.SetAsDouble() = 0;
     62 }
     63 
     64 void CSSHWB::SetAlpha(const CSSNumberish& aArg, ErrorResult& aRv) {
     65  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     66 }
     67 
     68 // end of CSSHWB Web IDL implementation
     69 
     70 }  // namespace mozilla::dom