michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: #ifndef nsBoxObject_h_ michael@0: #define nsBoxObject_h_ michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: #include "nsCOMPtr.h" michael@0: #include "nsIBoxObject.h" michael@0: #include "nsPIBoxObject.h" michael@0: #include "nsPoint.h" michael@0: #include "nsAutoPtr.h" michael@0: #include "nsHashKeys.h" michael@0: #include "nsInterfaceHashtable.h" michael@0: #include "nsCycleCollectionParticipant.h" michael@0: michael@0: class nsIFrame; michael@0: class nsIDocShell; michael@0: struct nsIntRect; michael@0: class nsIPresShell; michael@0: michael@0: class nsBoxObject : public nsPIBoxObject michael@0: { michael@0: NS_DECL_CYCLE_COLLECTING_ISUPPORTS michael@0: NS_DECL_CYCLE_COLLECTION_CLASS(nsBoxObject) michael@0: NS_DECL_NSIBOXOBJECT michael@0: michael@0: public: michael@0: nsBoxObject(); michael@0: virtual ~nsBoxObject(); michael@0: michael@0: // nsPIBoxObject michael@0: virtual nsresult Init(nsIContent* aContent) MOZ_OVERRIDE; michael@0: virtual void Clear() MOZ_OVERRIDE; michael@0: virtual void ClearCachedValues() MOZ_OVERRIDE; michael@0: michael@0: nsIFrame* GetFrame(bool aFlushLayout); michael@0: nsIPresShell* GetPresShell(bool aFlushLayout); michael@0: nsresult GetOffsetRect(nsIntRect& aRect); michael@0: nsresult GetScreenPosition(nsIntPoint& aPoint); michael@0: michael@0: // Given a parent frame and a child frame, find the frame whose michael@0: // next sibling is the given child frame and return its element michael@0: static nsresult GetPreviousSibling(nsIFrame* aParentFrame, nsIFrame* aFrame, michael@0: nsIDOMElement** aResult); michael@0: michael@0: protected: michael@0: michael@0: nsAutoPtr > mPropertyTable; //[OWNER] michael@0: michael@0: nsIContent* mContent; // [WEAK] michael@0: }; michael@0: michael@0: #endif