tor-browser

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

CSSScale.cpp (1869B)


      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/CSSScale.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/CSSScaleBinding.h"
     15 
     16 namespace mozilla::dom {
     17 
     18 CSSScale::CSSScale(nsCOMPtr<nsISupports> aParent)
     19    : CSSTransformComponent(std::move(aParent)) {}
     20 
     21 JSObject* CSSScale::WrapObject(JSContext* aCx,
     22                               JS::Handle<JSObject*> aGivenProto) {
     23  return CSSScale_Binding::Wrap(aCx, this, aGivenProto);
     24 }
     25 
     26 // start of CSSScale Web IDL implementation
     27 
     28 //  static
     29 already_AddRefed<CSSScale> CSSScale::Constructor(
     30    const GlobalObject& aGlobal, const CSSNumberish& aX, const CSSNumberish& aY,
     31    const Optional<CSSNumberish>& aZ, ErrorResult& aRv) {
     32  return MakeAndAddRef<CSSScale>(aGlobal.GetAsSupports());
     33 }
     34 
     35 void CSSScale::GetX(OwningCSSNumberish& aRetVal) const {
     36  aRetVal.SetAsDouble() = 0;
     37 }
     38 
     39 void CSSScale::SetX(const CSSNumberish& aArg, ErrorResult& aRv) {
     40  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     41 }
     42 
     43 void CSSScale::GetY(OwningCSSNumberish& aRetVal) const {
     44  aRetVal.SetAsDouble() = 0;
     45 }
     46 
     47 void CSSScale::SetY(const CSSNumberish& aArg, ErrorResult& aRv) {
     48  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     49 }
     50 
     51 void CSSScale::GetZ(OwningCSSNumberish& aRetVal) const {
     52  aRetVal.SetAsDouble() = 0;
     53 }
     54 
     55 void CSSScale::SetZ(const CSSNumberish& aArg, ErrorResult& aRv) {
     56  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     57 }
     58 
     59 // end of CSSScale Web IDL implementation
     60 
     61 }  // namespace mozilla::dom