layout/inspector/src/inLayoutUtils.h
author David Zbarsky <dzbarsky@gmail.com>
Tue, 23 Jul 2013 16:39:17 -0700
changeset 139727 d9dbb5dbb96a60b6c921ef80c955e48a97b2eaa5
parent 138926 d810dcc0726f6516571dfa26657b7add26fe4659
permissions -rw-r--r--
Bug 894646 - Various dom deCOM cleanups r=Ms2ger

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef __inLayoutUtils_h__
#define __inLayoutUtils_h__

class nsIDocument;
class nsIDOMDocument;
class nsIDOMElement;
class nsIDOMNode;
class nsIDOMWindow;
class nsEventStateManager;
class nsIFrame;
class nsIPresShell;
class nsISupports;

class inLayoutUtils
{
public:
  static nsIDOMWindow* GetWindowFor(nsIDOMNode* aNode);
  static nsIDOMWindow* GetWindowFor(nsIDOMDocument* aDoc);
  static nsIPresShell* GetPresShellFor(nsISupports* aThing);
  static nsIFrame* GetFrameFor(nsIDOMElement* aElement);
  static nsEventStateManager* GetEventStateManagerFor(nsIDOMElement *aElement);
  static nsIDOMDocument* GetSubDocumentFor(nsIDOMNode* aNode);
  static nsIDOMNode* GetContainerFor(const nsIDocument& aDoc);
};

#endif // __inLayoutUtils_h__