CSSTransformComponent.cpp (1829B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 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/CSSTransformComponent.h" 8 9 #include "mozilla/AlreadyAddRefed.h" 10 #include "mozilla/Assertions.h" 11 #include "mozilla/ErrorResult.h" 12 #include "mozilla/dom/CSSTransformComponentBinding.h" 13 #include "nsCycleCollectionParticipant.h" 14 15 namespace mozilla::dom { 16 17 CSSTransformComponent::CSSTransformComponent(nsCOMPtr<nsISupports> aParent) 18 : mParent(std::move(aParent)) { 19 MOZ_ASSERT(mParent); 20 } 21 22 NS_IMPL_CYCLE_COLLECTING_ADDREF(CSSTransformComponent) 23 NS_IMPL_CYCLE_COLLECTING_RELEASE(CSSTransformComponent) 24 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CSSTransformComponent) 25 NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY 26 NS_INTERFACE_MAP_ENTRY(nsISupports) 27 NS_INTERFACE_MAP_END 28 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(CSSTransformComponent, mParent) 29 30 nsISupports* CSSTransformComponent::GetParentObject() const { return mParent; } 31 32 JSObject* CSSTransformComponent::WrapObject(JSContext* aCx, 33 JS::Handle<JSObject*> aGivenProto) { 34 return CSSTransformComponent_Binding::Wrap(aCx, this, aGivenProto); 35 } 36 37 // start of CSSTransformComponent Web IDL implementation 38 bool CSSTransformComponent::Is2D() const { return false; } 39 40 void CSSTransformComponent::SetIs2D(bool aArg) {} 41 42 already_AddRefed<DOMMatrix> CSSTransformComponent::ToMatrix(ErrorResult& aRv) { 43 aRv.Throw(NS_ERROR_NOT_INITIALIZED); 44 return nullptr; 45 } 46 47 void CSSTransformComponent::Stringify(nsString& aRetVal) {} 48 49 // end of CSSTransformComponent Web IDL implementation 50 51 } // namespace mozilla::dom