tor-browser

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

CSSTransformValue.cpp (2068B)


      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/CSSTransformValue.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/CSSTransformValueBinding.h"
     14 
     15 namespace mozilla::dom {
     16 
     17 CSSTransformValue::CSSTransformValue(nsCOMPtr<nsISupports> aParent)
     18    : CSSStyleValue(std::move(aParent)) {}
     19 
     20 JSObject* CSSTransformValue::WrapObject(JSContext* aCx,
     21                                        JS::Handle<JSObject*> aGivenProto) {
     22  return CSSTransformValue_Binding::Wrap(aCx, this, aGivenProto);
     23 }
     24 
     25 // start of CSSTransformValue Web IDL implementation
     26 
     27 // static
     28 already_AddRefed<CSSTransformValue> CSSTransformValue::Constructor(
     29    const GlobalObject& aGlobal,
     30    const Sequence<OwningNonNull<CSSTransformComponent>>& aTransforms,
     31    ErrorResult& aRv) {
     32  return MakeAndAddRef<CSSTransformValue>(aGlobal.GetAsSupports());
     33 }
     34 
     35 uint32_t CSSTransformValue::Length() const { return 0; }
     36 
     37 bool CSSTransformValue::Is2D() const { return true; }
     38 
     39 already_AddRefed<DOMMatrix> CSSTransformValue::ToMatrix(ErrorResult& aRv) {
     40  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     41  return nullptr;
     42 }
     43 
     44 CSSTransformComponent* CSSTransformValue::IndexedGetter(uint32_t aIndex,
     45                                                        bool& aFound,
     46                                                        ErrorResult& aRv) {
     47  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     48  return nullptr;
     49 }
     50 
     51 void CSSTransformValue::IndexedSetter(uint32_t aIndex,
     52                                      CSSTransformComponent& aVal,
     53                                      ErrorResult& aRv) {
     54  aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
     55 }
     56 
     57 // end of CSSTransformValue Web IDL implementation
     58 
     59 }  // namespace mozilla::dom