2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04: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 22:29:03 +04:00
|
|
|
|
|
|
|
/* factory functions for rendering object classes */
|
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
#ifndef nsHTMLParts_h___
|
|
|
|
#define nsHTMLParts_h___
|
|
|
|
|
|
|
|
#include "nscore.h"
|
|
|
|
#include "nsISupports.h"
|
2010-06-09 09:28:14 +04:00
|
|
|
#include "nsIFrame.h"
|
1998-04-14 00:24:54 +04:00
|
|
|
class nsIAtom;
|
2005-09-24 22:43:15 +04:00
|
|
|
class nsNodeInfoManager;
|
1998-04-14 00:24:54 +04:00
|
|
|
class nsIContent;
|
|
|
|
class nsIDocument;
|
2001-12-18 01:39:59 +03:00
|
|
|
class nsIFrame;
|
1998-04-14 00:24:54 +04:00
|
|
|
class nsIHTMLContentSink;
|
2004-10-01 02:27:45 +04:00
|
|
|
class nsIFragmentContentSink;
|
2006-03-27 01:30:36 +04:00
|
|
|
class nsStyleContext;
|
1999-06-23 07:29:44 +04:00
|
|
|
class nsIURI;
|
1999-12-05 02:49:50 +03:00
|
|
|
class nsIPresShell;
|
2001-03-03 03:41:02 +03:00
|
|
|
class nsIChannel;
|
2007-11-18 21:56:49 +03:00
|
|
|
class nsTableColFrame;
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2012-03-08 05:57:37 +04: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 15:42:12 +03:00
|
|
|
|
1998-09-01 05:33:19 +04:00
|
|
|
// Factory methods for creating html layout objects
|
|
|
|
|
1999-10-08 08:32:46 +04:00
|
|
|
// Create a frame that supports "display: block" layout behavior
|
2014-05-25 02:20:39 +04:00
|
|
|
class nsBlockFrame;
|
|
|
|
nsBlockFrame*
|
2016-09-07 09:45:42 +03:00
|
|
|
NS_NewBlockFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1999-05-12 02:03:29 +04:00
|
|
|
|
2008-08-18 05:16:42 +04:00
|
|
|
// Special Generated Content Node. It contains text taken from an
|
|
|
|
// attribute of its *grandparent* content node.
|
2003-03-05 18:08:41 +03:00
|
|
|
nsresult
|
2005-09-24 22:43:15 +04:00
|
|
|
NS_NewAttributeContent(nsNodeInfoManager *aNodeInfoManager,
|
2012-08-22 19:56:38 +04:00
|
|
|
int32_t aNameSpaceID, nsIAtom* aAttrName,
|
2005-09-24 22:43:15 +04:00
|
|
|
nsIContent** aResult);
|
1999-08-19 18:32:19 +04:00
|
|
|
|
1999-09-03 18:52:17 +04: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".
|
2014-05-25 02:20:40 +04:00
|
|
|
nsContainerFrame*
|
2014-02-05 05:59:39 +04:00
|
|
|
NS_NewSelectsAreaFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrameState aFlags);
|
1999-08-19 18:32:19 +04:00
|
|
|
|
2009-02-18 16:25:29 +03:00
|
|
|
// Create a block formatting context blockframe
|
2016-09-07 09:45:42 +03:00
|
|
|
nsBlockFrame*
|
|
|
|
NS_NewBlockFormattingContext(nsIPresShell* aPresShell, nsStyleContext* aStyleContext);
|
1999-05-12 02:03:29 +04:00
|
|
|
|
2005-11-01 23:40:54 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewBRFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1999-05-12 02:03:29 +04:00
|
|
|
|
2005-11-04 05:38:33 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewCommentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1998-09-06 04:17:30 +04:00
|
|
|
|
1998-09-10 03:30:30 +04:00
|
|
|
// <frame> and <iframe>
|
2005-10-27 01:46:39 +04:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewSubDocumentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1998-09-10 03:30:30 +04:00
|
|
|
// <frameset>
|
2005-11-01 23:40:54 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewHTMLFramesetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2003-03-05 18:08:41 +03:00
|
|
|
|
2014-05-25 02:20:40 +04:00
|
|
|
class ViewportFrame;
|
|
|
|
ViewportFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewViewportFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
class nsCanvasFrame;
|
|
|
|
nsCanvasFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewCanvasFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 23:40:54 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
class nsInlineFrame;
|
|
|
|
nsInlineFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewInlineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 05:38:33 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewObjectFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 23:40:54 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 05:38:33 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewContinuingTextFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 23:40:54 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewEmptyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 23:40:54 +03:00
|
|
|
inline nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewWBRFrame(nsIPresShell* aPresShell, nsStyleContext* aContext) {
|
|
|
|
return NS_NewEmptyFrame(aPresShell, aContext);
|
1999-05-12 02:03:29 +04:00
|
|
|
}
|
2004-10-08 16:17:10 +04:00
|
|
|
|
2014-05-25 02:20:40 +04:00
|
|
|
nsContainerFrame*
|
2014-02-05 05:59:39 +04:00
|
|
|
NS_NewColumnSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrameState aStateFlags);
|
2004-10-08 16:17:10 +04:00
|
|
|
|
2014-05-25 02:20:40 +04:00
|
|
|
class nsSimplePageSequenceFrame;
|
|
|
|
nsSimplePageSequenceFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
class nsPageFrame;
|
|
|
|
nsPageFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewPageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
class nsPageContentFrame;
|
|
|
|
nsPageContentFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewPageContentFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 05:38:33 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewPageBreakFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
class nsFirstLetterFrame;
|
|
|
|
nsFirstLetterFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewFirstLetterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:39 +04:00
|
|
|
class nsFirstLineFrame;
|
|
|
|
nsFirstLineFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewFirstLineFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1998-10-13 02:13:23 +04:00
|
|
|
|
1998-09-23 21:16:51 +04:00
|
|
|
// forms
|
2014-05-25 02:20:40 +04:00
|
|
|
nsContainerFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewGfxButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 05:38:33 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewNativeButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 23:40:54 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewImageControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
nsContainerFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 05:38:33 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewGfxCheckboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 05:38:33 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewNativeCheckboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
nsContainerFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 05:38:33 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewFileControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 23:40:54 +03:00
|
|
|
nsIFrame*
|
2013-07-10 02:25:27 +04:00
|
|
|
NS_NewColorControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewLegendFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 05:38:33 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewNativeTextControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-01 23:40:54 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewTextControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 05:38:33 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewGfxAutoTextControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 05:38:33 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewGfxRadioControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 05:38:33 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewNativeRadioControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2005-11-04 05:38:33 +03:00
|
|
|
nsIFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewNativeSelectControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
nsContainerFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewListControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
nsContainerFrame*
|
2014-02-05 05:59:39 +04:00
|
|
|
NS_NewComboboxControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrameState aFlags);
|
2005-11-01 23:40:54 +03:00
|
|
|
nsIFrame*
|
2011-05-10 16:59:07 +04:00
|
|
|
NS_NewProgressFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2012-05-16 19:47:10 +04:00
|
|
|
nsIFrame*
|
|
|
|
NS_NewMeterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2013-02-16 21:57:21 +04:00
|
|
|
nsIFrame*
|
|
|
|
NS_NewRangeFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2013-09-04 14:30:36 +04:00
|
|
|
nsIFrame*
|
|
|
|
NS_NewNumberControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2016-10-06 07:17:00 +03:00
|
|
|
nsIFrame*
|
|
|
|
NS_NewDateTimeControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2016-09-07 09:45:42 +03:00
|
|
|
nsBlockFrame*
|
2016-01-20 18:20:41 +03:00
|
|
|
NS_NewDetailsFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
1999-05-12 02:03:29 +04:00
|
|
|
|
|
|
|
// Table frame factories
|
2016-06-16 15:14:08 +03:00
|
|
|
class nsTableWrapperFrame;
|
|
|
|
nsTableWrapperFrame*
|
|
|
|
NS_NewTableWrapperFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
class nsTableFrame;
|
|
|
|
nsTableFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewTableFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2007-11-18 21:56:49 +03:00
|
|
|
nsTableColFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewTableColFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
class nsTableColGroupFrame;
|
|
|
|
nsTableColGroupFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewTableColGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
class nsTableRowFrame;
|
|
|
|
nsTableRowFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewTableRowFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
class nsTableRowGroupFrame;
|
|
|
|
nsTableRowGroupFrame*
|
2006-03-27 01:30:36 +04:00
|
|
|
NS_NewTableRowGroupFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
2014-05-25 02:20:40 +04:00
|
|
|
class nsTableCellFrame;
|
|
|
|
nsTableCellFrame*
|
2015-04-30 09:27:54 +03:00
|
|
|
NS_NewTableCellFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsTableFrame* aTableFrame);
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2003-03-05 18:08:41 +03:00
|
|
|
nsresult
|
|
|
|
NS_NewHTMLContentSink(nsIHTMLContentSink** aInstancePtrResult,
|
2003-04-02 15:18:00 +04:00
|
|
|
nsIDocument* aDoc, nsIURI* aURL,
|
|
|
|
nsISupports* aContainer, // e.g. docshell
|
2003-03-05 18:08:41 +03:00
|
|
|
nsIChannel* aChannel);
|
|
|
|
nsresult
|
2004-10-01 02:27:45 +04:00
|
|
|
NS_NewHTMLFragmentContentSink(nsIFragmentContentSink** aInstancePtrResult);
|
2003-03-05 18:08:41 +03:00
|
|
|
nsresult
|
2004-10-01 02:27:45 +04:00
|
|
|
NS_NewHTMLFragmentContentSink2(nsIFragmentContentSink** aInstancePtrResult);
|
1998-04-14 00:24:54 +04:00
|
|
|
|
|
|
|
#endif /* nsHTMLParts_h___ */
|