2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00: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/. */
|
2006-11-06 16:08:20 +00:00
|
|
|
#ifndef nsBoxObject_h_
|
|
|
|
#define nsBoxObject_h_
|
|
|
|
|
2012-09-14 16:10:08 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2000-05-30 07:59:13 +00:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsIBoxObject.h"
|
|
|
|
#include "nsPIBoxObject.h"
|
2004-11-23 17:26:19 +00:00
|
|
|
#include "nsPoint.h"
|
2005-01-27 22:52:53 +00:00
|
|
|
#include "nsAutoPtr.h"
|
2006-11-06 16:08:20 +00:00
|
|
|
#include "nsHashKeys.h"
|
|
|
|
#include "nsInterfaceHashtable.h"
|
2009-08-21 12:50:15 +00:00
|
|
|
#include "nsCycleCollectionParticipant.h"
|
2000-05-30 07:59:13 +00:00
|
|
|
|
|
|
|
class nsIFrame;
|
2002-04-25 23:04:52 +00:00
|
|
|
class nsIDocShell;
|
2009-01-15 03:27:09 +00:00
|
|
|
struct nsIntRect;
|
2010-04-10 20:09:38 +00:00
|
|
|
class nsIPresShell;
|
2000-05-30 07:59:13 +00:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
class nsBoxObject : public nsPIBoxObject
|
2000-05-30 07:59:13 +00:00
|
|
|
{
|
2009-08-21 12:50:15 +00:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS(nsBoxObject)
|
2000-05-30 07:59:13 +00:00
|
|
|
NS_DECL_NSIBOXOBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
nsBoxObject();
|
|
|
|
|
|
|
|
// nsPIBoxObject
|
2013-05-14 16:33:23 +00:00
|
|
|
virtual nsresult Init(nsIContent* aContent) MOZ_OVERRIDE;
|
2012-09-14 16:10:08 +00:00
|
|
|
virtual void Clear() MOZ_OVERRIDE;
|
|
|
|
virtual void ClearCachedValues() MOZ_OVERRIDE;
|
2000-05-30 07:59:13 +00:00
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
nsIFrame* GetFrame(bool aFlushLayout);
|
|
|
|
nsIPresShell* GetPresShell(bool aFlushLayout);
|
2009-01-15 03:27:09 +00:00
|
|
|
nsresult GetOffsetRect(nsIntRect& aRect);
|
2004-11-23 17:26:19 +00:00
|
|
|
nsresult GetScreenPosition(nsIntPoint& aPoint);
|
2005-02-18 09:22:33 +00:00
|
|
|
|
|
|
|
// 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);
|
2000-05-30 07:59:13 +00:00
|
|
|
|
2002-04-25 23:04:52 +00:00
|
|
|
protected:
|
2014-06-23 22:40:01 +00:00
|
|
|
virtual ~nsBoxObject();
|
2002-04-25 23:04:52 +00:00
|
|
|
|
2006-11-06 16:08:20 +00:00
|
|
|
nsAutoPtr<nsInterfaceHashtable<nsStringHashKey,nsISupports> > mPropertyTable; //[OWNER]
|
2000-10-02 23:23:55 +00:00
|
|
|
|
2000-05-30 07:59:13 +00:00
|
|
|
nsIContent* mContent; // [WEAK]
|
|
|
|
};
|
2006-11-06 16:08:20 +00:00
|
|
|
|
|
|
|
#endif
|