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-03-29 18:29:03 +00:00
|
|
|
|
|
|
|
/* factory functions for rendering object classes */
|
|
|
|
|
1998-04-13 20:24:54 +00:00
|
|
|
#ifndef nsHTMLParts_h___
|
|
|
|
#define nsHTMLParts_h___
|
|
|
|
|
|
|
|
#include "nscore.h"
|
|
|
|
#include "nsISupports.h"
|
2010-06-09 05:28:14 +00:00
|
|
|
#include "nsIFrame.h"
|
1998-04-13 20:24:54 +00:00
|
|
|
class nsIAtom;
|
2005-09-24 18:43:15 +00:00
|
|
|
class nsNodeInfoManager;
|
1998-04-13 20:24:54 +00:00
|
|
|
class nsIContent;
|
2000-03-22 05:55:05 +00:00
|
|
|
class nsIContentIterator;
|
1998-04-13 20:24:54 +00:00
|
|
|
class nsIDocument;
|
2001-12-17 22:39:59 +00:00
|
|
|
class nsIFrame;
|
1998-04-13 20:24:54 +00:00
|
|
|
class nsIHTMLContentSink;
|
2004-09-30 22:27:45 +00:00
|
|
|
class nsIFragmentContentSink;
|
2006-03-26 21:30:36 +00:00
|
|
|
class nsStyleContext;
|
1999-06-23 03:29:44 +00:00
|
|
|
class nsIURI;
|
1998-04-13 20:24:54 +00:00
|
|
|
class nsString;
|
1999-12-04 23:49:50 +00:00
|
|
|
class nsIPresShell;
|
2001-03-03 00:41:02 +00:00
|
|
|
class nsIChannel;
|
2007-11-18 18:56:49 +00:00
|
|
|
class nsTableColFrame;
|
1998-04-13 20:24:54 +00:00
|
|
|
|
2012-03-08 01:57:37 +00:00
|
|
|
// These are all the block specific frame bits, they are copied from
|
|
|
|
// the prev-in-flow to a newly created next-in-flow, except for the
|
|
|
|
// NS_BLOCK_FLAGS_NON_INHERITED_MASK bits below.
|
|
|
|
#define NS_BLOCK_FLAGS_MASK (NS_BLOCK_MARGIN_ROOT | \
|
|
|
|
NS_BLOCK_FLOAT_MGR | \
|
|
|
|
NS_BLOCK_CLIP_PAGINATED_OVERFLOW | \
|
|
|
|
NS_BLOCK_HAS_FIRST_LETTER_STYLE | \
|
|
|
|
NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET | \
|
|
|
|
NS_BLOCK_HAS_FIRST_LETTER_CHILD | \
|
|
|
|
NS_BLOCK_FRAME_HAS_INSIDE_BULLET)
|
|
|
|
|
|
|
|
// This is the subset of NS_BLOCK_FLAGS_MASK that is NOT inherited
|
|
|
|
// by default. They should only be set on the first-in-flow.
|
|
|
|
// See nsBlockFrame::Init.
|
|
|
|
#define NS_BLOCK_FLAGS_NON_INHERITED_MASK \
|
|
|
|
(NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET | \
|
|
|
|
NS_BLOCK_HAS_FIRST_LETTER_CHILD | \
|
|
|
|
NS_BLOCK_FRAME_HAS_INSIDE_BULLET)
|
2001-02-23 12:42:12 +00:00
|
|
|
|
1998-09-01 01:33:19 +00:00
|
|
|
// Factory methods for creating html layout objects
|
|
|
|
|
1999-10-08 04:32:46 +00:00
|
|
|
// Create a frame that supports "display: block" layout behavior
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2014-02-05 01:59:39 +00:00
|
|
|
NS_NewBlockFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrameState aFlags = nsFrameState(0));
|
1999-05-11 22:03:29 +00:00
|
|
|
|
2008-08-18 01:16:42 +00:00
|
|
|
// Special Generated Content Node. It contains text taken from an
|
|
|
|
// attribute of its *grandparent* content node.
|
2003-03-05 15:08:41 +00:00
|
|
|
nsresult
|
2005-09-24 18:43:15 +00:00
|
|
|
NS_NewAttributeContent(nsNodeInfoManager *aNodeInfoManager,
|
2012-08-22 15:56:38 +00:00
|
|
|
int32_t aNameSpaceID, nsIAtom* aAttrName,
|
2005-09-24 18:43:15 +00:00
|
|
|
nsIContent** aResult);
|
1999-08-19 14:32:19 +00:00
|
|
|
|
1999-09-03 14:52:17 +00:00
|
|
|
// Create a basic area frame but the GetFrameForPoint is overridden to always
|
|
|
|
// return the option frame
|
|
|
|
// By default, area frames will extend
|
|
|
|
// their height to cover any children that "stick out".
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2014-02-05 01:59:39 +00:00
|
|
|
NS_NewSelectsAreaFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrameState aFlags);
|
1999-08-19 14:32:19 +00:00
|
|
|
|
2009-02-18 13:25:29 +00:00
|
|
|
// Create a block formatting context blockframe
|
|
|
|
inline nsIFrame* NS_NewBlockFormattingContext(nsIPresShell* aPresShell,
|
|
|
|
nsStyleContext* aStyleContext)
|
|
|
|
{
|
|
|
|
return NS_NewBlockFrame(aPresShell, aStyleContext,
|
|
|
|
NS_BLOCK_FLOAT_MGR | NS_BLOCK_MARGIN_ROOT);
|
1999-05-11 22:03:29 +00:00
|
|
|
}
|
|
|
|
|
2005-11-01 20:40:54 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewBRFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1999-05-11 22:03:29 +00:00
|
|
|
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewCommentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1998-09-06 00:17:30 +00:00
|
|
|
|
1998-09-09 23:30:30 +00:00
|
|
|
// <frame> and <iframe>
|
2005-10-26 21:46:39 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewSubDocumentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1998-09-09 23:30:30 +00:00
|
|
|
// <frameset>
|
2005-11-01 20:40:54 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewHTMLFramesetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2003-03-05 15:08:41 +00:00
|
|
|
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewViewportFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewCanvasFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 20:40:54 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 20:40:54 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewContinuingTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 20:40:54 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewEmptyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 20:40:54 +00:00
|
|
|
inline nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewWBRFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) {
|
|
|
|
return NS_NewEmptyFrame(aPresShell, aContext);
|
1999-05-11 22:03:29 +00:00
|
|
|
}
|
2004-10-08 12:17:10 +00:00
|
|
|
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2014-02-05 01:59:39 +00:00
|
|
|
NS_NewColumnSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrameState aStateFlags);
|
2004-10-08 12:17:10 +00:00
|
|
|
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewPageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewPageBreakFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewFirstLetterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewFirstLineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1998-10-12 22:13:23 +00:00
|
|
|
|
1998-09-23 17:16:51 +00:00
|
|
|
// forms
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewGfxButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewNativeButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 20:40:54 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewImageControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 20:40:54 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewGfxCheckboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewNativeCheckboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewFileControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 20:40:54 +00:00
|
|
|
nsIFrame*
|
2013-07-09 22:25:27 +00:00
|
|
|
NS_NewColorControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewLegendFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewNativeTextControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 20:40:54 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewTextControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewGfxAutoTextControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewGfxRadioControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewNativeRadioControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewNativeSelectControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewListControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2014-02-05 01:59:39 +00:00
|
|
|
NS_NewComboboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrameState aFlags);
|
2005-11-01 20:40:54 +00:00
|
|
|
nsIFrame*
|
2011-05-10 12:59:07 +00:00
|
|
|
NS_NewProgressFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2012-05-16 15:47:10 +00:00
|
|
|
nsIFrame*
|
|
|
|
NS_NewMeterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2013-02-16 17:57:21 +00:00
|
|
|
nsIFrame*
|
|
|
|
NS_NewRangeFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2013-09-04 10:30:36 +00:00
|
|
|
nsIFrame*
|
|
|
|
NS_NewNumberControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1999-05-11 22:03:29 +00:00
|
|
|
|
|
|
|
// Table frame factories
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewTableOuterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewTableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewTableCaptionFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2007-11-18 18:56:49 +00:00
|
|
|
nsTableColFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewTableColFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewTableColGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewTableRowFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2006-03-26 21:30:36 +00:00
|
|
|
NS_NewTableRowGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 02:38:33 +00:00
|
|
|
nsIFrame*
|
2011-09-29 06:19:26 +00:00
|
|
|
NS_NewTableCellFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool aIsBorderCollapse);
|
1998-04-13 20:24:54 +00:00
|
|
|
|
2003-03-05 15:08:41 +00:00
|
|
|
nsresult
|
|
|
|
NS_NewHTMLContentSink(nsIHTMLContentSink** aInstancePtrResult,
|
2003-04-02 11:18:00 +00:00
|
|
|
nsIDocument* aDoc, nsIURI* aURL,
|
|
|
|
nsISupports* aContainer, // e.g. docshell
|
2003-03-05 15:08:41 +00:00
|
|
|
nsIChannel* aChannel);
|
|
|
|
nsresult
|
2004-09-30 22:27:45 +00:00
|
|
|
NS_NewHTMLFragmentContentSink(nsIFragmentContentSink** aInstancePtrResult);
|
2003-03-05 15:08:41 +00:00
|
|
|
nsresult
|
2004-09-30 22:27:45 +00:00
|
|
|
NS_NewHTMLFragmentContentSink2(nsIFragmentContentSink** aInstancePtrResult);
|
1998-04-13 20:24:54 +00:00
|
|
|
|
|
|
|
#endif /* nsHTMLParts_h___ */
|