2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
#ifndef nsBoxObject_h_
|
|
|
|
#define nsBoxObject_h_
|
|
|
|
|
2012-09-14 09:10:08 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsIBoxObject.h"
|
|
|
|
#include "nsPIBoxObject.h"
|
|
|
|
#include "nsPoint.h"
|
|
|
|
#include "nsAutoPtr.h"
|
|
|
|
#include "nsHashKeys.h"
|
|
|
|
#include "nsInterfaceHashtable.h"
|
2009-08-21 05:50:15 -07:00
|
|
|
#include "nsCycleCollectionParticipant.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsIFrame;
|
|
|
|
class nsIDocShell;
|
2009-01-14 19:27:09 -08:00
|
|
|
struct nsIntRect;
|
2010-04-10 13:09:38 -07:00
|
|
|
class nsIPresShell;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
class nsBoxObject : public nsPIBoxObject
|
|
|
|
{
|
2009-08-21 05:50:15 -07:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS(nsBoxObject)
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_DECL_NSIBOXOBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
nsBoxObject();
|
|
|
|
|
|
|
|
// nsPIBoxObject
|
2013-05-14 09:33:23 -07:00
|
|
|
virtual nsresult Init(nsIContent* aContent) MOZ_OVERRIDE;
|
2012-09-14 09:10:08 -07:00
|
|
|
virtual void Clear() MOZ_OVERRIDE;
|
|
|
|
virtual void ClearCachedValues() MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
nsIFrame* GetFrame(bool aFlushLayout);
|
|
|
|
nsIPresShell* GetPresShell(bool aFlushLayout);
|
2009-01-14 19:27:09 -08:00
|
|
|
nsresult GetOffsetRect(nsIntRect& aRect);
|
2007-03-22 10:30:00 -07:00
|
|
|
nsresult GetScreenPosition(nsIntPoint& aPoint);
|
|
|
|
|
|
|
|
// Given a parent frame and a child frame, find the frame whose
|
|
|
|
// next sibling is the given child frame and return its element
|
|
|
|
static nsresult GetPreviousSibling(nsIFrame* aParentFrame, nsIFrame* aFrame,
|
|
|
|
nsIDOMElement** aResult);
|
|
|
|
|
|
|
|
protected:
|
2014-06-23 15:40:01 -07:00
|
|
|
virtual ~nsBoxObject();
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
nsAutoPtr<nsInterfaceHashtable<nsStringHashKey,nsISupports> > mPropertyTable; //[OWNER]
|
|
|
|
|
|
|
|
nsIContent* mContent; // [WEAK]
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|