tor-browser

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

CSSTranslate.cpp (1976B)


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