Bug 1632310 [wpt PR 23186] - Add test for computed versus resolved style., a=testonly
[gecko.git] / gfx / layers / client / ClientContainerLayer.cpp
blob3bcb75419700f396be9bbddbae9932736c4047fb
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/. */
7 #include "ClientContainerLayer.h"
8 #include "ClientLayerManager.h" // for ClientLayerManager, etc
9 #include "mozilla/mozalloc.h" // for operator new
10 #include "nsCOMPtr.h" // for already_AddRefed
11 #include "nsISupportsImpl.h" // for Layer::AddRef, etc
13 namespace mozilla {
14 namespace layers {
16 already_AddRefed<ContainerLayer> ClientLayerManager::CreateContainerLayer() {
17 NS_ASSERTION(InConstruction(), "Only allowed in construction phase");
18 RefPtr<ClientContainerLayer> layer = new ClientContainerLayer(this);
19 CREATE_SHADOW(Container);
20 return layer.forget();
23 already_AddRefed<RefLayer> ClientLayerManager::CreateRefLayer() {
24 NS_ASSERTION(InConstruction(), "Only allowed in construction phase");
25 RefPtr<ClientRefLayer> layer = new ClientRefLayer(this);
26 CREATE_SHADOW(Ref);
27 return layer.forget();
30 } // namespace layers
31 } // namespace mozilla