Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/layout/generic/nsHTMLParts.h
Line
Count
Source (jump to first uncovered line)
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/. */
6
7
/* factory functions for rendering object classes */
8
9
#ifndef nsHTMLParts_h___
10
#define nsHTMLParts_h___
11
12
#include "nscore.h"
13
#include "nsISupports.h"
14
#include "nsIFrame.h"
15
class nsComboboxControlFrame;
16
class nsCheckboxRadioFrame;
17
class nsAtom;
18
class nsNodeInfoManager;
19
class nsIContent;
20
class nsIDocument;
21
class nsIFrame;
22
class nsIHTMLContentSink;
23
class nsIFragmentContentSink;
24
class nsIURI;
25
class nsIPresShell;
26
class nsIChannel;
27
class nsTableColFrame;
28
namespace mozilla {
29
class ViewportFrame;
30
} // namespace mozilla
31
32
// These are all the block specific frame bits, they are copied from
33
// the prev-in-flow to a newly created next-in-flow, except for the
34
// NS_BLOCK_FLAGS_NON_INHERITED_MASK bits below.
35
0
#define NS_BLOCK_FLAGS_MASK (NS_BLOCK_FORMATTING_CONTEXT_STATE_BITS | \
36
0
                             NS_BLOCK_CLIP_PAGINATED_OVERFLOW  | \
37
0
                             NS_BLOCK_HAS_FIRST_LETTER_STYLE   | \
38
0
                             NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET | \
39
0
                             NS_BLOCK_HAS_FIRST_LETTER_CHILD   | \
40
0
                             NS_BLOCK_FRAME_HAS_INSIDE_BULLET)
41
42
// This is the subset of NS_BLOCK_FLAGS_MASK that is NOT inherited
43
// by default.  They should only be set on the first-in-flow.
44
// See nsBlockFrame::Init.
45
#define NS_BLOCK_FLAGS_NON_INHERITED_MASK                        \
46
0
                            (NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET | \
47
0
                             NS_BLOCK_HAS_FIRST_LETTER_CHILD   | \
48
0
                             NS_BLOCK_FRAME_HAS_INSIDE_BULLET)
49
50
// Factory methods for creating html layout objects
51
52
// Create a frame that supports "display: block" layout behavior
53
class nsBlockFrame;
54
nsBlockFrame*
55
NS_NewBlockFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
56
57
// Special Generated Content Node. It contains text taken from an
58
// attribute of its *grandparent* content node.
59
nsresult
60
NS_NewAttributeContent(nsNodeInfoManager *aNodeInfoManager,
61
                       int32_t aNameSpaceID, nsAtom* aAttrName,
62
                       nsIContent** aResult);
63
64
// Create a basic area frame but the GetFrameForPoint is overridden to always
65
// return the option frame
66
// By default, area frames will extend
67
// their height to cover any children that "stick out".
68
nsContainerFrame*
69
NS_NewSelectsAreaFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle, nsFrameState aFlags);
70
71
// Create a block formatting context blockframe
72
nsBlockFrame*
73
NS_NewBlockFormattingContext(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
74
75
nsIFrame*
76
NS_NewBRFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
77
78
nsIFrame*
79
NS_NewCommentFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
80
81
// <frame> and <iframe>
82
nsIFrame*
83
NS_NewSubDocumentFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
84
// <frameset>
85
nsIFrame*
86
NS_NewHTMLFramesetFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
87
88
mozilla::ViewportFrame*
89
NS_NewViewportFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
90
class nsCanvasFrame;
91
nsCanvasFrame*
92
NS_NewCanvasFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
93
nsIFrame*
94
NS_NewImageFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
95
class nsInlineFrame;
96
nsInlineFrame*
97
NS_NewInlineFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
98
nsIFrame*
99
NS_NewObjectFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
100
nsIFrame*
101
NS_NewTextFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
102
nsIFrame*
103
NS_NewContinuingTextFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
104
nsIFrame*
105
NS_NewEmptyFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
106
inline nsIFrame*
107
0
NS_NewWBRFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle) {
108
0
  return NS_NewEmptyFrame(aPresShell, aStyle);
109
0
}
110
111
nsBlockFrame*
112
NS_NewColumnSetWrapperFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle, nsFrameState aStateFlags);
113
nsContainerFrame*
114
NS_NewColumnSetFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle, nsFrameState aStateFlags);
115
116
class nsSimplePageSequenceFrame;
117
nsSimplePageSequenceFrame*
118
NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
119
class nsPageFrame;
120
nsPageFrame*
121
NS_NewPageFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
122
class nsPageContentFrame;
123
nsPageContentFrame*
124
NS_NewPageContentFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
125
nsIFrame*
126
NS_NewPageBreakFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
127
class nsFirstLetterFrame;
128
nsFirstLetterFrame*
129
NS_NewFirstLetterFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
130
class nsFirstLineFrame;
131
nsFirstLineFrame*
132
NS_NewFirstLineFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
133
134
// forms
135
nsContainerFrame*
136
NS_NewGfxButtonControlFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
137
nsCheckboxRadioFrame*
138
NS_NewCheckboxRadioFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
139
nsIFrame*
140
NS_NewImageControlFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
141
nsContainerFrame*
142
NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
143
nsContainerFrame*
144
NS_NewFieldSetFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
145
nsIFrame*
146
NS_NewFileControlFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
147
nsIFrame*
148
NS_NewColorControlFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
149
nsIFrame*
150
NS_NewLegendFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
151
nsIFrame*
152
NS_NewTextControlFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
153
nsContainerFrame*
154
NS_NewListControlFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
155
nsComboboxControlFrame*
156
NS_NewComboboxControlFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle, nsFrameState aFlags);
157
nsIFrame*
158
NS_NewProgressFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
159
nsIFrame*
160
NS_NewMeterFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
161
nsIFrame*
162
NS_NewRangeFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
163
nsIFrame*
164
NS_NewNumberControlFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
165
nsIFrame*
166
NS_NewDateTimeControlFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
167
nsBlockFrame*
168
NS_NewDetailsFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
169
170
// Table frame factories
171
class nsTableWrapperFrame;
172
nsTableWrapperFrame*
173
NS_NewTableWrapperFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
174
class nsTableFrame;
175
nsTableFrame*
176
NS_NewTableFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
177
nsTableColFrame*
178
NS_NewTableColFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
179
class nsTableColGroupFrame;
180
nsTableColGroupFrame*
181
NS_NewTableColGroupFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
182
class nsTableRowFrame;
183
nsTableRowFrame*
184
NS_NewTableRowFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
185
class nsTableRowGroupFrame;
186
nsTableRowGroupFrame*
187
NS_NewTableRowGroupFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
188
class nsTableCellFrame;
189
nsTableCellFrame*
190
NS_NewTableCellFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle, nsTableFrame* aTableFrame);
191
192
nsresult
193
NS_NewHTMLContentSink(nsIHTMLContentSink** aInstancePtrResult,
194
                      nsIDocument* aDoc, nsIURI* aURL,
195
                      nsISupports* aContainer, // e.g. docshell
196
                      nsIChannel* aChannel);
197
nsresult
198
NS_NewHTMLFragmentContentSink(nsIFragmentContentSink** aInstancePtrResult);
199
nsresult
200
NS_NewHTMLFragmentContentSink2(nsIFragmentContentSink** aInstancePtrResult);
201
202
#endif /* nsHTMLParts_h___ */