Bug 1692937 [wpt PR 27636] - new parameter --include-file for wptrunner, a=testonly
[gecko.git] / layout / generic / nsHTMLParts.h
blob881b52a361dfa459369c8a83869cf6364a884812
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 nsContainerFrame;
17 class nsComboboxControlFrame;
18 class nsCheckboxRadioFrame;
19 class nsAtom;
20 class nsNodeInfoManager;
21 class nsIContent;
23 class nsIFrame;
24 class nsIHTMLContentSink;
25 class nsIFragmentContentSink;
26 class nsIURI;
27 class nsIChannel;
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 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,
59 nsFrameState aFlags);
61 // Create a block formatting context blockframe
62 nsBlockFrame* NS_NewBlockFormattingContext(mozilla::PresShell* aPresShell,
63 mozilla::ComputedStyle* aStyle);
65 nsIFrame* NS_NewBRFrame(mozilla::PresShell* aPresShell,
66 mozilla::ComputedStyle* aStyle);
68 nsIFrame* NS_NewCommentFrame(mozilla::PresShell* aPresShell,
69 mozilla::ComputedStyle* aStyle);
71 // <frame> and <iframe>
72 nsIFrame* NS_NewSubDocumentFrame(mozilla::PresShell* aPresShell,
73 mozilla::ComputedStyle* aStyle);
74 // <frameset>
75 nsIFrame* NS_NewHTMLFramesetFrame(mozilla::PresShell* aPresShell,
76 mozilla::ComputedStyle* aStyle);
78 mozilla::ViewportFrame* NS_NewViewportFrame(mozilla::PresShell* aPresShell,
79 mozilla::ComputedStyle* aStyle);
80 class nsCanvasFrame;
81 nsCanvasFrame* NS_NewCanvasFrame(mozilla::PresShell* aPresShell,
82 mozilla::ComputedStyle* aStyle);
83 nsIFrame* NS_NewImageFrame(mozilla::PresShell* aPresShell,
84 mozilla::ComputedStyle* aStyle);
85 class nsInlineFrame;
86 nsInlineFrame* NS_NewInlineFrame(mozilla::PresShell* aPresShell,
87 mozilla::ComputedStyle* aStyle);
88 nsIFrame* NS_NewTextFrame(mozilla::PresShell* aPresShell,
89 mozilla::ComputedStyle* aStyle);
90 nsIFrame* NS_NewContinuingTextFrame(mozilla::PresShell* aPresShell,
91 mozilla::ComputedStyle* aStyle);
92 nsIFrame* NS_NewEmptyFrame(mozilla::PresShell* aPresShell,
93 mozilla::ComputedStyle* aStyle);
94 nsIFrame* NS_NewWBRFrame(mozilla::PresShell* aPresShell,
95 mozilla::ComputedStyle* aStyle);
97 nsBlockFrame* NS_NewColumnSetWrapperFrame(mozilla::PresShell* aPresShell,
98 mozilla::ComputedStyle* aStyle,
99 nsFrameState aStateFlags);
100 nsContainerFrame* NS_NewColumnSetFrame(mozilla::PresShell* aPresShell,
101 mozilla::ComputedStyle* aStyle,
102 nsFrameState aStateFlags);
104 class nsPageSequenceFrame;
105 nsPageSequenceFrame* NS_NewPageSequenceFrame(mozilla::PresShell* aPresShell,
106 mozilla::ComputedStyle* aStyle);
108 mozilla::PrintedSheetFrame* NS_NewPrintedSheetFrame(
109 mozilla::PresShell* aPresShell, mozilla::ComputedStyle* aStyle);
111 class nsPageFrame;
112 nsPageFrame* NS_NewPageFrame(mozilla::PresShell* aPresShell,
113 mozilla::ComputedStyle* aStyle);
114 class nsPageContentFrame;
115 nsPageContentFrame* NS_NewPageContentFrame(mozilla::PresShell* aPresShell,
116 mozilla::ComputedStyle* aStyle);
117 nsIFrame* NS_NewPageBreakFrame(mozilla::PresShell* aPresShell,
118 mozilla::ComputedStyle* aStyle);
119 class nsFirstLetterFrame;
120 nsFirstLetterFrame* NS_NewFirstLetterFrame(mozilla::PresShell* aPresShell,
121 mozilla::ComputedStyle* aStyle);
122 class nsFirstLineFrame;
123 nsFirstLineFrame* NS_NewFirstLineFrame(mozilla::PresShell* aPresShell,
124 mozilla::ComputedStyle* aStyle);
126 // forms
127 nsContainerFrame* NS_NewGfxButtonControlFrame(mozilla::PresShell* aPresShell,
128 mozilla::ComputedStyle* aStyle);
129 nsCheckboxRadioFrame* NS_NewCheckboxRadioFrame(mozilla::PresShell* aPresShell,
130 mozilla::ComputedStyle* aStyle);
131 nsIFrame* NS_NewImageControlFrame(mozilla::PresShell* aPresShell,
132 mozilla::ComputedStyle* aStyle);
133 nsContainerFrame* NS_NewHTMLButtonControlFrame(mozilla::PresShell* aPresShell,
134 mozilla::ComputedStyle* aStyle);
135 nsContainerFrame* NS_NewFieldSetFrame(mozilla::PresShell* aPresShell,
136 mozilla::ComputedStyle* aStyle);
137 nsIFrame* NS_NewFileControlFrame(mozilla::PresShell* aPresShell,
138 mozilla::ComputedStyle* aStyle);
139 nsIFrame* NS_NewColorControlFrame(mozilla::PresShell* aPresShell,
140 mozilla::ComputedStyle* aStyle);
141 nsIFrame* NS_NewTextControlFrame(mozilla::PresShell* aPresShell,
142 mozilla::ComputedStyle* aStyle);
143 nsContainerFrame* NS_NewListControlFrame(mozilla::PresShell* aPresShell,
144 mozilla::ComputedStyle* aStyle);
145 nsComboboxControlFrame* NS_NewComboboxControlFrame(
146 mozilla::PresShell* aPresShell, mozilla::ComputedStyle* aStyle,
147 nsFrameState aFlags);
148 nsIFrame* NS_NewProgressFrame(mozilla::PresShell* aPresShell,
149 mozilla::ComputedStyle* aStyle);
150 nsIFrame* NS_NewMeterFrame(mozilla::PresShell* aPresShell,
151 mozilla::ComputedStyle* aStyle);
152 nsIFrame* NS_NewRangeFrame(mozilla::PresShell* aPresShell,
153 mozilla::ComputedStyle* aStyle);
154 nsIFrame* NS_NewNumberControlFrame(mozilla::PresShell* aPresShell,
155 mozilla::ComputedStyle* aStyle);
156 nsIFrame* NS_NewDateTimeControlFrame(mozilla::PresShell* aPresShell,
157 mozilla::ComputedStyle* aStyle);
158 nsIFrame* NS_NewSearchControlFrame(mozilla::PresShell* aPresShell,
159 mozilla::ComputedStyle* aStyle);
160 nsBlockFrame* NS_NewDetailsFrame(mozilla::PresShell* aPresShell,
161 mozilla::ComputedStyle* aStyle);
162 nsIFrame* NS_NewBulletFrame(mozilla::PresShell* aPresShell,
163 mozilla::ComputedStyle* aStyle);
165 // Table frame factories
166 class nsTableWrapperFrame;
167 nsTableWrapperFrame* NS_NewTableWrapperFrame(mozilla::PresShell* aPresShell,
168 mozilla::ComputedStyle* aStyle);
169 class nsTableFrame;
170 nsTableFrame* NS_NewTableFrame(mozilla::PresShell* aPresShell,
171 mozilla::ComputedStyle* aStyle);
172 nsTableColFrame* NS_NewTableColFrame(mozilla::PresShell* aPresShell,
173 mozilla::ComputedStyle* aStyle);
174 class nsTableColGroupFrame;
175 nsTableColGroupFrame* NS_NewTableColGroupFrame(mozilla::PresShell* aPresShell,
176 mozilla::ComputedStyle* aStyle);
177 class nsTableRowFrame;
178 nsTableRowFrame* NS_NewTableRowFrame(mozilla::PresShell* aPresShell,
179 mozilla::ComputedStyle* aStyle);
180 class nsTableRowGroupFrame;
181 nsTableRowGroupFrame* NS_NewTableRowGroupFrame(mozilla::PresShell* aPresShell,
182 mozilla::ComputedStyle* aStyle);
183 class nsTableCellFrame;
184 nsTableCellFrame* NS_NewTableCellFrame(mozilla::PresShell* aPresShell,
185 mozilla::ComputedStyle* aStyle,
186 nsTableFrame* aTableFrame);
188 nsresult NS_NewHTMLContentSink(nsIHTMLContentSink** aInstancePtrResult,
189 mozilla::dom::Document* aDoc, nsIURI* aURL,
190 nsISupports* aContainer, // e.g. docshell
191 nsIChannel* aChannel);
192 nsresult NS_NewHTMLFragmentContentSink(
193 nsIFragmentContentSink** aInstancePtrResult);
194 nsresult NS_NewHTMLFragmentContentSink2(
195 nsIFragmentContentSink** aInstancePtrResult);
197 #endif /* nsHTMLParts_h___ */