Backed out changeset 496886cb30a5 (bug 1867152) for bc failures on browser_user_input...
[gecko.git] / layout / generic / nsHTMLParts.h
blobff1de7447f17040c97a868617e99efb0184a956f
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,
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(
116 mozilla::PresShell* aPresShell, mozilla::ComputedStyle* aStyle,
117 already_AddRefed<const nsAtom> aPageName);
118 nsIFrame* NS_NewPageBreakFrame(mozilla::PresShell* aPresShell,
119 mozilla::ComputedStyle* aStyle);
120 class nsFirstLetterFrame;
121 nsFirstLetterFrame* NS_NewFirstLetterFrame(mozilla::PresShell*,
122 mozilla::ComputedStyle*);
123 class nsFirstLetterFrame;
124 nsFirstLetterFrame* NS_NewFloatingFirstLetterFrame(mozilla::PresShell*,
125 mozilla::ComputedStyle*);
126 class nsFirstLineFrame;
127 nsFirstLineFrame* NS_NewFirstLineFrame(mozilla::PresShell* aPresShell,
128 mozilla::ComputedStyle* aStyle);
130 // forms
131 nsContainerFrame* NS_NewGfxButtonControlFrame(mozilla::PresShell* aPresShell,
132 mozilla::ComputedStyle* aStyle);
133 nsCheckboxRadioFrame* NS_NewCheckboxRadioFrame(mozilla::PresShell* aPresShell,
134 mozilla::ComputedStyle* aStyle);
135 nsIFrame* NS_NewImageControlFrame(mozilla::PresShell* aPresShell,
136 mozilla::ComputedStyle* aStyle);
137 nsContainerFrame* NS_NewHTMLButtonControlFrame(mozilla::PresShell* aPresShell,
138 mozilla::ComputedStyle* aStyle);
139 nsContainerFrame* NS_NewFieldSetFrame(mozilla::PresShell* aPresShell,
140 mozilla::ComputedStyle* aStyle);
141 nsIFrame* NS_NewFileControlFrame(mozilla::PresShell* aPresShell,
142 mozilla::ComputedStyle* aStyle);
143 nsIFrame* NS_NewColorControlFrame(mozilla::PresShell* aPresShell,
144 mozilla::ComputedStyle* aStyle);
145 nsIFrame* NS_NewTextControlFrame(mozilla::PresShell* aPresShell,
146 mozilla::ComputedStyle* aStyle);
147 nsListControlFrame* NS_NewListControlFrame(mozilla::PresShell* aPresShell,
148 mozilla::ComputedStyle* aStyle);
149 nsComboboxControlFrame* NS_NewComboboxControlFrame(
150 mozilla::PresShell* aPresShell, mozilla::ComputedStyle* aStyle,
151 nsFrameState aFlags);
152 nsIFrame* NS_NewProgressFrame(mozilla::PresShell* aPresShell,
153 mozilla::ComputedStyle* aStyle);
154 nsIFrame* NS_NewMeterFrame(mozilla::PresShell* aPresShell,
155 mozilla::ComputedStyle* aStyle);
156 nsIFrame* NS_NewRangeFrame(mozilla::PresShell* aPresShell,
157 mozilla::ComputedStyle* aStyle);
158 nsIFrame* NS_NewNumberControlFrame(mozilla::PresShell* aPresShell,
159 mozilla::ComputedStyle* aStyle);
160 nsIFrame* NS_NewDateTimeControlFrame(mozilla::PresShell* aPresShell,
161 mozilla::ComputedStyle* aStyle);
162 nsIFrame* NS_NewSearchControlFrame(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___ */