Bug 1842999 - Part 25: Support testing elements are present in resizable typed arrays...
[gecko.git] / layout / generic / nsHTMLParts.h
blobe1d7ef4d2ddc02b8dae13a323cabdddaef7af854
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /* factory functions for rendering object classes */
9 #ifndef nsHTMLParts_h___
10 #define nsHTMLParts_h___
12 #include "nscore.h"
13 #include "nsFrameState.h"
14 #include "nsISupports.h"
16 class nsAtom;
17 class nsCheckboxRadioFrame;
18 class nsComboboxControlFrame;
19 class nsContainerFrame;
20 class nsIChannel;
21 class nsIContent;
22 class nsIFragmentContentSink;
23 class nsIFrame;
24 class nsIHTMLContentSink;
25 class nsIURI;
26 class nsListControlFrame;
27 class nsNodeInfoManager;
28 class nsTableColFrame;
29 namespace mozilla {
30 class ComputedStyle;
31 class PresShell;
32 class PrintedSheetFrame;
33 class ViewportFrame;
35 namespace dom {
36 class Document;
38 } // namespace mozilla
40 // Factory methods for creating html layout objects
42 // Create a frame that supports "display: block" layout behavior
43 class nsBlockFrame;
44 nsBlockFrame* NS_NewBlockFrame(mozilla::PresShell* aPresShell,
45 mozilla::ComputedStyle* aStyle);
47 // Special Generated Content Node. It contains text taken from an
48 // attribute of its *grandparent* content node.
49 nsresult NS_NewAttributeContent(nsNodeInfoManager* aNodeInfoManager,
50 int32_t aNameSpaceID, nsAtom* aAttrName,
51 nsAtom* aFallback, nsIContent** aResult);
53 // Create a basic area frame but the GetFrameForPoint is overridden to always
54 // return the option frame
55 // By default, area frames will extend
56 // their height to cover any children that "stick out".
57 nsContainerFrame* NS_NewSelectsAreaFrame(mozilla::PresShell* aPresShell,
58 mozilla::ComputedStyle* aStyle);
60 // Create a block formatting context blockframe
61 nsBlockFrame* NS_NewBlockFormattingContext(mozilla::PresShell* aPresShell,
62 mozilla::ComputedStyle* aStyle);
64 nsIFrame* NS_NewBRFrame(mozilla::PresShell* aPresShell,
65 mozilla::ComputedStyle* aStyle);
67 nsIFrame* NS_NewCommentFrame(mozilla::PresShell* aPresShell,
68 mozilla::ComputedStyle* aStyle);
70 // <frame> and <iframe>
71 nsIFrame* NS_NewSubDocumentFrame(mozilla::PresShell* aPresShell,
72 mozilla::ComputedStyle* aStyle);
73 // <frameset>
74 nsIFrame* NS_NewHTMLFramesetFrame(mozilla::PresShell* aPresShell,
75 mozilla::ComputedStyle* aStyle);
77 mozilla::ViewportFrame* NS_NewViewportFrame(mozilla::PresShell* aPresShell,
78 mozilla::ComputedStyle* aStyle);
79 class nsCanvasFrame;
80 nsCanvasFrame* NS_NewCanvasFrame(mozilla::PresShell* aPresShell,
81 mozilla::ComputedStyle* aStyle);
82 nsIFrame* NS_NewImageFrame(mozilla::PresShell* aPresShell,
83 mozilla::ComputedStyle* aStyle);
84 class nsInlineFrame;
85 nsInlineFrame* NS_NewInlineFrame(mozilla::PresShell* aPresShell,
86 mozilla::ComputedStyle* aStyle);
87 nsIFrame* NS_NewTextFrame(mozilla::PresShell* aPresShell,
88 mozilla::ComputedStyle* aStyle);
89 nsIFrame* NS_NewContinuingTextFrame(mozilla::PresShell* aPresShell,
90 mozilla::ComputedStyle* aStyle);
91 nsIFrame* NS_NewEmptyFrame(mozilla::PresShell* aPresShell,
92 mozilla::ComputedStyle* aStyle);
93 nsIFrame* NS_NewWBRFrame(mozilla::PresShell* aPresShell,
94 mozilla::ComputedStyle* aStyle);
96 nsBlockFrame* NS_NewColumnSetWrapperFrame(mozilla::PresShell* aPresShell,
97 mozilla::ComputedStyle* aStyle,
98 nsFrameState aStateFlags);
99 nsContainerFrame* NS_NewColumnSetFrame(mozilla::PresShell* aPresShell,
100 mozilla::ComputedStyle* aStyle,
101 nsFrameState aStateFlags);
103 class nsPageSequenceFrame;
104 nsPageSequenceFrame* NS_NewPageSequenceFrame(mozilla::PresShell* aPresShell,
105 mozilla::ComputedStyle* aStyle);
107 mozilla::PrintedSheetFrame* NS_NewPrintedSheetFrame(
108 mozilla::PresShell* aPresShell, mozilla::ComputedStyle* aStyle);
110 class nsPageFrame;
111 nsPageFrame* NS_NewPageFrame(mozilla::PresShell* aPresShell,
112 mozilla::ComputedStyle* aStyle);
113 class nsPageContentFrame;
114 nsPageContentFrame* NS_NewPageContentFrame(
115 mozilla::PresShell* aPresShell, mozilla::ComputedStyle* aStyle,
116 already_AddRefed<const nsAtom> aPageName);
117 nsIFrame* NS_NewPageBreakFrame(mozilla::PresShell* aPresShell,
118 mozilla::ComputedStyle* aStyle);
119 class nsFirstLetterFrame;
120 nsFirstLetterFrame* NS_NewFirstLetterFrame(mozilla::PresShell*,
121 mozilla::ComputedStyle*);
122 class nsFirstLetterFrame;
123 nsFirstLetterFrame* NS_NewFloatingFirstLetterFrame(mozilla::PresShell*,
124 mozilla::ComputedStyle*);
125 class nsFirstLineFrame;
126 nsFirstLineFrame* NS_NewFirstLineFrame(mozilla::PresShell* aPresShell,
127 mozilla::ComputedStyle* aStyle);
129 // forms
130 nsContainerFrame* NS_NewGfxButtonControlFrame(mozilla::PresShell* aPresShell,
131 mozilla::ComputedStyle* aStyle);
132 nsCheckboxRadioFrame* NS_NewCheckboxRadioFrame(mozilla::PresShell* aPresShell,
133 mozilla::ComputedStyle* aStyle);
134 nsIFrame* NS_NewImageControlFrame(mozilla::PresShell* aPresShell,
135 mozilla::ComputedStyle* aStyle);
136 nsContainerFrame* NS_NewHTMLButtonControlFrame(mozilla::PresShell* aPresShell,
137 mozilla::ComputedStyle* aStyle);
138 nsContainerFrame* NS_NewFieldSetFrame(mozilla::PresShell* aPresShell,
139 mozilla::ComputedStyle* aStyle);
140 nsIFrame* NS_NewFileControlFrame(mozilla::PresShell* aPresShell,
141 mozilla::ComputedStyle* aStyle);
142 nsIFrame* NS_NewColorControlFrame(mozilla::PresShell* aPresShell,
143 mozilla::ComputedStyle* aStyle);
144 nsIFrame* NS_NewTextControlFrame(mozilla::PresShell* aPresShell,
145 mozilla::ComputedStyle* aStyle);
146 nsListControlFrame* NS_NewListControlFrame(mozilla::PresShell* aPresShell,
147 mozilla::ComputedStyle* aStyle);
148 nsComboboxControlFrame* NS_NewComboboxControlFrame(
149 mozilla::PresShell* aPresShell, mozilla::ComputedStyle* aStyle);
150 nsIFrame* NS_NewProgressFrame(mozilla::PresShell* aPresShell,
151 mozilla::ComputedStyle* aStyle);
152 nsIFrame* NS_NewMeterFrame(mozilla::PresShell* aPresShell,
153 mozilla::ComputedStyle* aStyle);
154 nsIFrame* NS_NewRangeFrame(mozilla::PresShell* aPresShell,
155 mozilla::ComputedStyle* aStyle);
156 nsIFrame* NS_NewNumberControlFrame(mozilla::PresShell* aPresShell,
157 mozilla::ComputedStyle* aStyle);
158 nsIFrame* NS_NewDateTimeControlFrame(mozilla::PresShell* aPresShell,
159 mozilla::ComputedStyle* aStyle);
160 nsIFrame* NS_NewSearchControlFrame(mozilla::PresShell* aPresShell,
161 mozilla::ComputedStyle* aStyle);
163 // Table frame factories
164 class nsTableWrapperFrame;
165 nsTableWrapperFrame* NS_NewTableWrapperFrame(mozilla::PresShell* aPresShell,
166 mozilla::ComputedStyle* aStyle);
167 class nsTableFrame;
168 nsTableFrame* NS_NewTableFrame(mozilla::PresShell* aPresShell,
169 mozilla::ComputedStyle* aStyle);
170 nsTableColFrame* NS_NewTableColFrame(mozilla::PresShell* aPresShell,
171 mozilla::ComputedStyle* aStyle);
172 class nsTableColGroupFrame;
173 nsTableColGroupFrame* NS_NewTableColGroupFrame(mozilla::PresShell* aPresShell,
174 mozilla::ComputedStyle* aStyle);
175 class nsTableRowFrame;
176 nsTableRowFrame* NS_NewTableRowFrame(mozilla::PresShell* aPresShell,
177 mozilla::ComputedStyle* aStyle);
178 class nsTableRowGroupFrame;
179 nsTableRowGroupFrame* NS_NewTableRowGroupFrame(mozilla::PresShell* aPresShell,
180 mozilla::ComputedStyle* aStyle);
181 class nsTableCellFrame;
182 nsTableCellFrame* NS_NewTableCellFrame(mozilla::PresShell* aPresShell,
183 mozilla::ComputedStyle* aStyle,
184 nsTableFrame* aTableFrame);
186 nsresult NS_NewHTMLContentSink(nsIHTMLContentSink** aInstancePtrResult,
187 mozilla::dom::Document* aDoc, nsIURI* aURL,
188 nsISupports* aContainer, // e.g. docshell
189 nsIChannel* aChannel);
190 nsresult NS_NewHTMLFragmentContentSink(
191 nsIFragmentContentSink** aInstancePtrResult);
192 nsresult NS_NewHTMLFragmentContentSink2(
193 nsIFragmentContentSink** aInstancePtrResult);
195 #endif /* nsHTMLParts_h___ */