1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /* a list of all frame state bits, for preprocessing */
10 This file contains definitions for frame state bits -- values used
11 in nsIFrame::mState -- and groups of frame state bits and which
12 classes they apply to.
14 There are two macros that can be defined before #including this
17 FRAME_STATE_GROUP(name_, class_)
19 This denotes the existence of a named group of frame state bits.
20 name_ is the name of the group and class_ is the name of a frame
21 class that uses the frame state bits that are a part of the group.
23 The main group of frame state bits is named "Generic" and is
24 defined to apply to nsIFrame, i.e. all frames. All of the global
25 frame state bits -- bits 0..19 and 32..59 -- are in this group.
27 FRAME_STATE_BIT(group_, value_, name_)
29 This denotes the existence of a frame state bit. group_ indicates
30 which group the bit belongs to, value_ is the bit number (0..63),
31 and name_ is the name of the frame state bit constant.
33 Note that if you add a new frame state group, you'll need to #include
34 the header for its frame classes in nsFrameState.cpp and, if they don't
35 already, add nsQueryFrame implementations (which can be DEBUG-only) to
40 #ifndef FRAME_STATE_GROUP
41 #define FRAME_STATE_GROUP(name_, class_) /* nothing */
42 #define DEFINED_FRAME_STATE_GROUP
45 #ifndef FRAME_STATE_BIT
46 #define FRAME_STATE_BIT(group_, value_, name_) /* nothing */
47 #define DEFINED_FRAME_STATE_BIT
50 // == Frame state bits that apply to all frames ===============================
52 FRAME_STATE_GROUP(Generic
, nsIFrame
)
54 FRAME_STATE_BIT(Generic
, 0, NS_FRAME_IN_REFLOW
)
56 // This bit is set when a frame is created. After it has been reflowed
57 // once (during the DidReflow with a finished state) the bit is
59 FRAME_STATE_BIT(Generic
, 1, NS_FRAME_FIRST_REFLOW
)
61 // For a continuation frame, if this bit is set, then this a "fluid"
62 // continuation, i.e., across a line boundary. Otherwise it's a "hard"
63 // continuation, e.g. a bidi continuation.
64 FRAME_STATE_BIT(Generic
, 2, NS_FRAME_IS_FLUID_CONTINUATION
)
66 // For nsIAnonymousContentCreator content that's created using ContentInfo.
67 FRAME_STATE_BIT(Generic
, 3, NS_FRAME_ANONYMOUSCONTENTCREATOR_CONTENT
)
69 // If this bit is set, then a reference to the frame is being held
70 // elsewhere. The frame may want to send a notification when it is
71 // destroyed to allow these references to be cleared.
72 FRAME_STATE_BIT(Generic
, 4, NS_FRAME_EXTERNAL_REFERENCE
)
74 // If this bit is set, this frame or one of its descendants has a
75 // percentage height that depends on an ancestor of this frame.
76 // (Or it did at one point in the past, since we don't necessarily clear
77 // the bit when it's no longer needed; it's an optimization.)
78 FRAME_STATE_BIT(Generic
, 5, NS_FRAME_CONTAINS_RELATIVE_HEIGHT
)
80 // If this bit is set, then the frame corresponds to generated content
81 FRAME_STATE_BIT(Generic
, 6, NS_FRAME_GENERATED_CONTENT
)
83 // If this bit is set the frame is a continuation that is holding overflow,
84 // i.e. it is a next-in-flow created to hold overflow after the box's
85 // height has ended. This means the frame should be a) at the top of the
86 // page and b) invisible: no borders, zero height, ignored in margin
87 // collapsing, etc. See nsContainerFrame.h
88 FRAME_STATE_BIT(Generic
, 7, NS_FRAME_IS_OVERFLOW_CONTAINER
)
90 // If this bit is set, then the frame has been moved out of the flow,
91 // e.g., it is absolutely positioned or floated
92 FRAME_STATE_BIT(Generic
, 8, NS_FRAME_OUT_OF_FLOW
)
94 // Frame can be an abs/fixed pos. container, if its style says so.
95 // MarkAs[Not]AbsoluteContainingBlock will assert that this bit is set.
96 // NS_FRAME_HAS_ABSPOS_CHILDREN must not be set when this bit is unset.
97 FRAME_STATE_BIT(Generic
, 9, NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN
)
99 // If this bit is set, then the frame and _all_ of its descendant frames need
101 // This bit is set when the frame is first created.
102 // This bit is cleared by DidReflow after the required call to Reflow has
104 // Do not set this bit yourself if you plan to pass the frame to
105 // nsIPresShell::FrameNeedsReflow. Pass the right arguments instead.
106 FRAME_STATE_BIT(Generic
, 10, NS_FRAME_IS_DIRTY
)
108 // If this bit is set then the frame is too deep in the frame tree, and
109 // we'll stop updating it and its children, to prevent stack overflow
111 FRAME_STATE_BIT(Generic
, 11, NS_FRAME_TOO_DEEP_IN_FRAME_TREE
)
113 // If this bit is set, then either:
114 // 1. the frame has at least one child that has the NS_FRAME_IS_DIRTY bit or
115 // NS_FRAME_HAS_DIRTY_CHILDREN bit set, or
116 // 2. the frame has had at least one child removed since the last reflow, or
117 // 3. the frame has had a style change that requires the frame to be reflowed
118 // but does not _necessarily_ require its descendants to be reflowed (e.g.,
119 // for a 'height', 'width', 'margin', etc. change, it's up to the
120 // applicable Reflow methods to decide whether the frame's children
121 // _actually_ need to be reflowed).
122 // If this bit is set but the NS_FRAME_IS_DIRTY is not set, then Reflow still
123 // needs to be called on the frame, but Reflow will likely not do as much work
124 // as it would if NS_FRAME_IS_DIRTY were set. See the comment documenting
125 // nsFrame::Reflow for more.
126 // This bit is cleared by DidReflow after the required call to Reflow has
128 // Do not set this bit yourself if you plan to pass the frame to
129 // nsIPresShell::FrameNeedsReflow. Pass the right arguments instead.
130 FRAME_STATE_BIT(Generic
, 12, NS_FRAME_HAS_DIRTY_CHILDREN
)
132 // If this bit is set, the frame has an associated view
133 FRAME_STATE_BIT(Generic
, 13, NS_FRAME_HAS_VIEW
)
135 // If this bit is set, the frame was created from anonymous content.
136 FRAME_STATE_BIT(Generic
, 14, NS_FRAME_INDEPENDENT_SELECTION
)
138 // If this bit is set, the frame is part of the mangled frame hierarchy
139 // that results when an inline has been split because of a nested block.
140 // See the comments in nsCSSFrameConstructor::ConstructInline for
142 FRAME_STATE_BIT(Generic
, 15, NS_FRAME_PART_OF_IBSPLIT
)
144 // If this bit is set, then transforms (e.g. CSS or SVG transforms) are allowed
145 // to affect the frame, and a transform may currently be in affect. If this bit
146 // is not set, then any transforms on the frame will be ignored.
147 // This is used primarily in GetTransformMatrix to optimize for the
149 FRAME_STATE_BIT(Generic
, 16, NS_FRAME_MAY_BE_TRANSFORMED
)
151 // If this bit is set, the frame itself is a bidi continuation,
152 // or is incomplete (its next sibling is a bidi continuation)
153 FRAME_STATE_BIT(Generic
, 17, NS_FRAME_IS_BIDI
)
155 // If this bit is set the frame has descendant with a view
156 FRAME_STATE_BIT(Generic
, 18, NS_FRAME_HAS_CHILD_WITH_VIEW
)
158 // If this bit is set, then reflow may be dispatched from the current
159 // frame instead of the root frame.
160 FRAME_STATE_BIT(Generic
, 19, NS_FRAME_REFLOW_ROOT
)
162 // NOTE: Bits 20-31 and 60-63 of the frame state are reserved for specific
165 // This bit is set on floats whose parent does not contain their
166 // placeholder. This can happen for two reasons: (1) the float was
167 // split, and this piece is the continuation, or (2) the entire float
168 // didn't fit on the page.
169 // Note that this bit is also shared by text frames for
170 // TEXT_IS_IN_TOKEN_MATHML. That's OK because we only check the
171 // NS_FRAME_IS_PUSHED_FLOAT bit on frames which we already know are
173 FRAME_STATE_BIT(Generic
, 32, NS_FRAME_IS_PUSHED_FLOAT
)
175 // This bit acts as a loop flag for recursive paint server drawing.
176 FRAME_STATE_BIT(Generic
, 33, NS_FRAME_DRAWING_AS_PAINTSERVER
)
178 // Frame is a display root and the retained layer tree needs to be updated
179 // at the next paint via display list construction.
180 // Only meaningful for display roots, so we don't really need a global state
181 // bit; we could free up this bit with a little extra complexity.
182 FRAME_STATE_BIT(Generic
, 36, NS_FRAME_UPDATE_LAYER_TREE
)
184 // Frame can accept absolutely positioned children.
185 FRAME_STATE_BIT(Generic
, 37, NS_FRAME_HAS_ABSPOS_CHILDREN
)
187 // A display item for this frame has been painted as part of a ThebesLayer.
188 FRAME_STATE_BIT(Generic
, 38, NS_FRAME_PAINTED_THEBES
)
190 // Frame is or is a descendant of something with a fixed height, unless that
191 // ancestor is a body or html element, and has no closer ancestor that is
192 // overflow:auto or overflow:scroll.
193 FRAME_STATE_BIT(Generic
, 39, NS_FRAME_IN_CONSTRAINED_HEIGHT
)
195 // This is only set during painting
196 FRAME_STATE_BIT(Generic
, 40, NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO
)
198 // Is this frame a container for font size inflation, i.e., is it a
199 // frame whose width is used to determine the inflation factor for
200 // everything whose nearest ancestor container for this frame?
201 FRAME_STATE_BIT(Generic
, 41, NS_FRAME_FONT_INFLATION_CONTAINER
)
203 // Does this frame manage a region in which we do font size inflation,
204 // i.e., roughly, is it an element establishing a new block formatting
206 FRAME_STATE_BIT(Generic
, 42, NS_FRAME_FONT_INFLATION_FLOW_ROOT
)
208 // This bit is set on SVG frames that are laid out using SVG's coordinate
209 // system based layout (as opposed to any of the CSS layout models). Note that
210 // this does not include nsSVGOuterSVGFrame since it takes part is CSS layout.
211 FRAME_STATE_BIT(Generic
, 43, NS_FRAME_SVG_LAYOUT
)
213 // Is this frame allowed to have generated (::before/::after) content?
214 FRAME_STATE_BIT(Generic
, 44, NS_FRAME_MAY_HAVE_GENERATED_CONTENT
)
216 // This bit is set on frames that create ContainerLayers with component
217 // alpha children. With BasicLayers we avoid creating these, so we mark
218 // the frames for future reference.
219 FRAME_STATE_BIT(Generic
, 45, NS_FRAME_NO_COMPONENT_ALPHA
)
221 // The frame is a descendant of SVGTextFrame and is thus used for SVG
223 FRAME_STATE_BIT(Generic
, 47, NS_FRAME_IS_SVG_TEXT
)
225 // Frame is marked as needing painting
226 FRAME_STATE_BIT(Generic
, 48, NS_FRAME_NEEDS_PAINT
)
228 // Frame has a descendant frame that needs painting - This includes
229 // cross-doc children.
230 FRAME_STATE_BIT(Generic
, 49, NS_FRAME_DESCENDANT_NEEDS_PAINT
)
232 // Frame is a descendant of a popup
233 FRAME_STATE_BIT(Generic
, 50, NS_FRAME_IN_POPUP
)
235 // Frame has only descendant frames that needs painting - This includes
236 // cross-doc children. This guarantees that all descendents have
237 // NS_FRAME_NEEDS_PAINT and NS_FRAME_ALL_DESCENDANTS_NEED_PAINT, or they
238 // have no display items.
239 FRAME_STATE_BIT(Generic
, 51, NS_FRAME_ALL_DESCENDANTS_NEED_PAINT
)
241 // Frame is marked as NS_FRAME_NEEDS_PAINT and also has an explicit
242 // rect stored to invalidate.
243 FRAME_STATE_BIT(Generic
, 52, NS_FRAME_HAS_INVALID_RECT
)
245 // Frame is not displayed directly due to it being, or being under, an SVG
246 // <defs> element or an SVG resource element (<mask>, <pattern>, etc.)
247 FRAME_STATE_BIT(Generic
, 53, NS_FRAME_IS_NONDISPLAY
)
249 // Frame has a LayerActivityProperty property
250 FRAME_STATE_BIT(Generic
, 54, NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY
)
252 // Set for all descendants of MathML sub/supscript elements (other than the
253 // base frame) to indicate that the SSTY font feature should be used.
254 FRAME_STATE_BIT(Generic
, 58, NS_FRAME_MATHML_SCRIPT_DESCENDANT
)
256 // This state bit is set on frames within token MathML elements if the
257 // token represents an <mi> tag whose inner HTML consists of a single
258 // non-whitespace character to allow special rendering behaviour.
259 FRAME_STATE_BIT(Generic
, 59, NS_FRAME_IS_IN_SINGLE_CHAR_MI
)
261 // NOTE: Bits 20-31 and 60-63 of the frame state are reserved for specific
265 // == Frame state bits that apply to box frames ===============================
267 FRAME_STATE_GROUP(Box
, nsBoxFrame
)
269 FRAME_STATE_BIT(Box
, 20, NS_STATE_BOX_CHILD_RESERVED
)
270 FRAME_STATE_BIT(Box
, 21, NS_STATE_STACK_NOT_POSITIONED
)
271 FRAME_STATE_BIT(Box
, 22, NS_STATE_IS_HORIZONTAL
)
272 FRAME_STATE_BIT(Box
, 23, NS_STATE_AUTO_STRETCH
)
273 FRAME_STATE_BIT(Box
, 24, NS_STATE_IS_ROOT
)
274 FRAME_STATE_BIT(Box
, 25, NS_STATE_CURRENTLY_IN_DEBUG
)
275 FRAME_STATE_BIT(Box
, 26, NS_STATE_SET_TO_DEBUG
)
276 FRAME_STATE_BIT(Box
, 27, NS_STATE_DEBUG_WAS_SET
)
277 FRAME_STATE_BIT(Box
, 28, NS_STATE_MENU_HAS_POPUP_LIST
)
278 FRAME_STATE_BIT(Box
, 29, NS_STATE_BOX_WRAPS_KIDS_IN_BLOCK
)
279 FRAME_STATE_BIT(Box
, 30, NS_STATE_EQUAL_SIZE
)
280 FRAME_STATE_BIT(Box
, 31, NS_STATE_IS_DIRECTION_NORMAL
)
281 FRAME_STATE_BIT(Box
, 60, NS_FRAME_MOUSE_THROUGH_ALWAYS
)
282 FRAME_STATE_BIT(Box
, 61, NS_FRAME_MOUSE_THROUGH_NEVER
)
285 // == Frame state bits that apply to flex container frames ====================
287 FRAME_STATE_GROUP(FlexContainer
, nsFlexContainerFrame
)
289 // Set for a flex container whose children have been reordered due to 'order'.
290 // (Means that we have to be more thorough about checking them for sortedness.)
291 FRAME_STATE_BIT(FlexContainer
, 20, NS_STATE_FLEX_CHILDREN_REORDERED
)
293 // == Frame state bits that apply to SVG frames ===============================
295 FRAME_STATE_GROUP(SVG
, nsISVGChildFrame
)
296 FRAME_STATE_GROUP(SVG
, nsSVGContainerFrame
)
298 FRAME_STATE_BIT(SVG
, 20, NS_STATE_IS_OUTER_SVG
)
300 // If this bit is set, we are a <clipPath> element or descendant.
301 FRAME_STATE_BIT(SVG
, 21, NS_STATE_SVG_CLIPPATH_CHILD
)
303 // For SVG text, the NS_FRAME_IS_DIRTY and NS_FRAME_HAS_DIRTY_CHILDREN bits
304 // indicate that our anonymous block child needs to be reflowed, and that
305 // mPositions will likely need to be updated as a consequence. These are set,
306 // for example, when the font-family changes. Sometimes we only need to
307 // update mPositions though. For example if the x/y attributes change.
308 // mPositioningDirty is used to indicate this latter "things are dirty" case
309 // to allow us to avoid reflowing the anonymous block when it is not
311 FRAME_STATE_BIT(SVG
, 22, NS_STATE_SVG_POSITIONING_DIRTY
)
313 // For text, whether the values from x/y/dx/dy attributes have any percentage
314 // values that are used in determining the positions of glyphs. The value will
315 // be true even if a positioning value is overridden by a descendant element's
316 // attribute with a non-percentage length. For example,
317 // NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES would be set for:
319 // <text x="10%"><tspan x="0">abc</tspan></text>
321 // Percentage values beyond the number of addressable characters, however, do
322 // not influence NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES. For example,
323 // NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES would be false for:
325 // <text x="10 20 30 40%">abc</text>
327 // NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES is used to determine whether
328 // to recompute mPositions when the viewport size changes. So although the
329 // first example above shows that NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES
330 // can be true even if a viewport size change will not affect mPositions,
331 // determining a completley accurate value for
332 // NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES would require extra work that is
333 // probably not worth it.
334 FRAME_STATE_BIT(SVG
, 23, NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES
)
336 FRAME_STATE_BIT(SVG
, 24, NS_STATE_SVG_TEXT_IN_REFLOW
)
339 // == Frame state bits that apply to text frames ==============================
341 FRAME_STATE_GROUP(Text
, nsTextFrame
)
343 // -- Flags set during reflow -------------------------------------------------
345 // nsTextFrame.cpp defines TEXT_REFLOW_FLAGS to be all of these bits.
347 // This bit is set on the first frame in a continuation indicating
348 // that it was chopped short because of :first-letter style.
349 FRAME_STATE_BIT(Text
, 20, TEXT_FIRST_LETTER
)
351 // This bit is set on frames that are logically adjacent to the start of the
352 // line (i.e. no prior frame on line with actual displayed in-flow content).
353 FRAME_STATE_BIT(Text
, 21, TEXT_START_OF_LINE
)
355 // This bit is set on frames that are logically adjacent to the end of the
356 // line (i.e. no following on line with actual displayed in-flow content).
357 FRAME_STATE_BIT(Text
, 22, TEXT_END_OF_LINE
)
359 // This bit is set on frames that end with a hyphenated break.
360 FRAME_STATE_BIT(Text
, 23, TEXT_HYPHEN_BREAK
)
362 // This bit is set on frames that trimmed trailing whitespace characters when
363 // calculating their width during reflow.
364 FRAME_STATE_BIT(Text
, 24, TEXT_TRIMMED_TRAILING_WHITESPACE
)
366 // This bit is set on frames that have justification enabled. We record
367 // this in a state bit because we don't always have the containing block
368 // easily available to check text-align on.
369 FRAME_STATE_BIT(Text
, 25, TEXT_JUSTIFICATION_ENABLED
)
371 // Set this bit if the textframe has overflow area for IME/spellcheck underline.
372 FRAME_STATE_BIT(Text
, 26, TEXT_SELECTION_UNDERLINE_OVERFLOWED
)
374 // -- Cache bits for IsEmpty() ------------------------------------------------
376 // nsTextFrame.cpp defines TEXT_WHITESPACE_FLAGS to be both of these bits.
378 // Set this bit if the textframe is known to be only collapsible whitespace.
379 FRAME_STATE_BIT(Text
, 27, TEXT_IS_ONLY_WHITESPACE
)
381 // Set this bit if the textframe is known to be not only collapsible whitespace.
382 FRAME_STATE_BIT(Text
, 28, TEXT_ISNOT_ONLY_WHITESPACE
)
384 // -- Other state bits --------------------------------------------------------
386 // Set when this text frame is mentioned in the userdata for mTextRun
387 FRAME_STATE_BIT(Text
, 29, TEXT_IN_TEXTRUN_USER_DATA
)
389 // This state bit is set on frames whose character data offsets need to be
391 FRAME_STATE_BIT(Text
, 30, TEXT_OFFSETS_NEED_FIXING
)
393 // This state bit is set on frames that have some non-collapsed characters after
395 FRAME_STATE_BIT(Text
, 31, TEXT_HAS_NONCOLLAPSED_CHARACTERS
)
397 // This state bit is set on children of token MathML elements.
398 // NOTE: TEXT_IS_IN_TOKEN_MATHML has a global state bit value that is shared
399 // with NS_FRAME_IS_PUSHED_FLOAT.
400 FRAME_STATE_BIT(Text
, 32, TEXT_IS_IN_TOKEN_MATHML
)
402 // Set when this text frame is mentioned in the userdata for the
403 // uninflated textrun property
404 FRAME_STATE_BIT(Text
, 60, TEXT_IN_UNINFLATED_TEXTRUN_USER_DATA
)
406 FRAME_STATE_BIT(Text
, 61, TEXT_HAS_FONT_INFLATION
)
408 // Whether this frame is cached in the Offset Frame Cache
409 // (OffsetToFrameProperty)
410 FRAME_STATE_BIT(Text
, 63, TEXT_IN_OFFSET_CACHE
)
413 // == Frame state bits that apply to block frames =============================
415 FRAME_STATE_GROUP(Block
, nsBlockFrame
)
417 // See the meanings at http://www.mozilla.org/newlayout/doc/block-and-line.html
419 // Something in the block has changed that requires Bidi resolution to be
420 // performed on the block. This flag must be either set on all blocks in a
421 // continuation chain or none of them.
422 FRAME_STATE_BIT(Block
, 20, NS_BLOCK_NEEDS_BIDI_RESOLUTION
)
424 FRAME_STATE_BIT(Block
, 21, NS_BLOCK_HAS_PUSHED_FLOATS
)
425 FRAME_STATE_BIT(Block
, 22, NS_BLOCK_MARGIN_ROOT
)
426 FRAME_STATE_BIT(Block
, 23, NS_BLOCK_FLOAT_MGR
)
427 FRAME_STATE_BIT(Block
, 24, NS_BLOCK_HAS_LINE_CURSOR
)
428 FRAME_STATE_BIT(Block
, 25, NS_BLOCK_HAS_OVERFLOW_LINES
)
429 FRAME_STATE_BIT(Block
, 26, NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS
)
431 // Set on any block that has descendant frames in the normal
432 // flow with 'clear' set to something other than 'none'
433 // (including <BR CLEAR="..."> frames)
434 FRAME_STATE_BIT(Block
, 27, NS_BLOCK_HAS_CLEAR_CHILDREN
)
436 // NS_BLOCK_CLIP_PAGINATED_OVERFLOW is only set in paginated prescontexts, on
437 // blocks which were forced to not have scrollframes but still need to clip
438 // the display of their kids.
439 FRAME_STATE_BIT(Block
, 28, NS_BLOCK_CLIP_PAGINATED_OVERFLOW
)
441 // NS_BLOCK_HAS_FIRST_LETTER_STYLE means that the block has first-letter style,
442 // even if it has no actual first-letter frame among its descendants.
443 FRAME_STATE_BIT(Block
, 29, NS_BLOCK_HAS_FIRST_LETTER_STYLE
)
445 // NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET and NS_BLOCK_FRAME_HAS_INSIDE_BULLET
446 // means the block has an associated bullet frame, they are mutually exclusive.
447 FRAME_STATE_BIT(Block
, 30, NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET
)
448 FRAME_STATE_BIT(Block
, 31, NS_BLOCK_FRAME_HAS_INSIDE_BULLET
)
450 // This block has had a child marked dirty, so before we reflow we need
451 // to look through the lines to find any such children and mark
452 // appropriate lines dirty.
453 FRAME_STATE_BIT(Block
, 61, NS_BLOCK_LOOK_FOR_DIRTY_FRAMES
)
455 // Are our cached intrinsic widths intrinsic widths for font size
456 // inflation? i.e., what was the current state of
457 // GetPresContext()->mInflationDisabledForShrinkWrap at the time they
459 // nsBlockFrame is the only thing that caches intrinsic widths that
460 // needs to track this because it's the only thing that caches intrinsic
461 // widths that lives inside of things (form controls) that do intrinsic
462 // sizing with font inflation enabled.
463 FRAME_STATE_BIT(Block
, 62, NS_BLOCK_FRAME_INTRINSICS_INFLATED
)
465 // NS_BLOCK_HAS_FIRST_LETTER_CHILD means that there is an inflow first-letter
466 // frame among the block's descendants. If there is a floating first-letter
467 // frame, or the block has first-letter style but has no first letter, this
468 // bit is not set. This bit is set on the first continuation only.
469 FRAME_STATE_BIT(Block
, 63, NS_BLOCK_HAS_FIRST_LETTER_CHILD
)
472 // == Frame state bits that apply to bullet frames ============================
474 FRAME_STATE_GROUP(Bullet
, nsBulletFrame
)
476 FRAME_STATE_BIT(Block
, 62, BULLET_FRAME_HAS_FONT_INFLATION
)
477 FRAME_STATE_BIT(Block
, 63, BULLET_FRAME_IMAGE_LOADING
)
480 // == Frame state bits that apply to scroll frames ============================
482 FRAME_STATE_GROUP(Scroll
, nsIScrollableFrame
)
484 // When set, the next scroll operation on the scrollframe will invalidate its
485 // entire contents. Useful for text-overflow.
486 // This bit is cleared after each time the scrollframe is scrolled. Whoever
487 // needs to set it should set it again on each paint.
488 FRAME_STATE_BIT(Scroll
, 20, NS_SCROLLFRAME_INVALIDATE_CONTENTS_ON_SCROLL
)
491 // == Frame state bits that apply to image frames =============================
493 FRAME_STATE_GROUP(Image
, nsImageFrame
)
495 FRAME_STATE_BIT(Image
, 20, IMAGE_SIZECONSTRAINED
)
496 FRAME_STATE_BIT(Image
, 21, IMAGE_GOTINITIALREFLOW
)
499 // == Frame state bits that apply to inline frames ============================
501 FRAME_STATE_GROUP(Inline
, nsInlineFrame
)
503 /** In Bidi inline start (or end) margin/padding/border should be applied to
504 * first (or last) frame (or a continuation frame).
505 * This state value shows if this frame is first (or last) continuation
509 FRAME_STATE_BIT(Inline
, 21, NS_INLINE_FRAME_BIDI_VISUAL_STATE_IS_SET
)
510 FRAME_STATE_BIT(Inline
, 22, NS_INLINE_FRAME_BIDI_VISUAL_IS_FIRST
)
511 FRAME_STATE_BIT(Inline
, 23, NS_INLINE_FRAME_BIDI_VISUAL_IS_LAST
)
514 // == Frame state bits that apply to placeholder frames =======================
516 FRAME_STATE_GROUP(Placeholder
, nsPlaceholderFrame
)
518 // Frame state bits that are used to keep track of what this is a
521 FRAME_STATE_BIT(Placeholder
, 20, PLACEHOLDER_FOR_FLOAT
)
522 FRAME_STATE_BIT(Placeholder
, 21, PLACEHOLDER_FOR_ABSPOS
)
523 FRAME_STATE_BIT(Placeholder
, 22, PLACEHOLDER_FOR_FIXEDPOS
)
524 FRAME_STATE_BIT(Placeholder
, 23, PLACEHOLDER_FOR_POPUP
)
527 // == Frame state bits that apply to table cell frames ========================
529 FRAME_STATE_GROUP(TableCell
, nsTableCellFrame
)
531 FRAME_STATE_BIT(TableCell
, 28, NS_TABLE_CELL_HAS_PCT_OVER_HEIGHT
)
532 FRAME_STATE_BIT(TableCell
, 29, NS_TABLE_CELL_HAD_SPECIAL_REFLOW
)
533 FRAME_STATE_BIT(TableCell
, 31, NS_TABLE_CELL_CONTENT_EMPTY
)
536 // == Frame state bits that apply to table column frames ======================
538 // Bits 28-31 on nsTableColFrames are used to store the column type.
541 // == Frame state bits that apply to table column group frames ================
543 // Bits 30-31 on nsTableColGroupFrames are used to store the column type.
546 // == Frame state bits that apply to table rows and table row group frames ====
548 FRAME_STATE_GROUP(TableRowAndRowGroup
, nsTableRowFrame
)
549 FRAME_STATE_GROUP(TableRowAndRowGroup
, nsTableRowGroupFrame
)
551 // see nsTableRowGroupFrame::InitRepeatedFrame
552 FRAME_STATE_BIT(TableRowAndRowGroup
, 28, NS_REPEATED_ROW_OR_ROWGROUP
)
555 // == Frame state bits that apply to table row frames =========================
557 FRAME_STATE_GROUP(TableRow
, nsTableRowFrame
)
559 // Indicates whether this row has any cells that have
560 // non-auto-height and rowspan=1
561 FRAME_STATE_BIT(TableRow
, 29, NS_ROW_HAS_CELL_WITH_STYLE_HEIGHT
)
563 FRAME_STATE_BIT(TableRow
, 30, NS_TABLE_ROW_HAS_UNPAGINATED_HEIGHT
)
566 // == Frame state bits that apply to table row group frames ===================
568 FRAME_STATE_GROUP(TableRowGroup
, nsTableRowGroupFrame
)
570 FRAME_STATE_BIT(TableRowGroup
, 27, NS_ROWGROUP_HAS_ROW_CURSOR
)
571 FRAME_STATE_BIT(TableRowGroup
, 30, NS_ROWGROUP_HAS_STYLE_HEIGHT
)
573 // thead or tfoot should be repeated on every printed page
574 FRAME_STATE_BIT(TableRowGroup
, 31, NS_ROWGROUP_REPEATABLE
)
577 #ifdef DEFINED_FRAME_STATE_GROUP
578 #undef DEFINED_FRAME_STATE_GROUP
579 #undef FRAME_STATE_GROUP
582 #ifdef DEFINED_FRAME_STATE_BIT
583 #undef DEFINED_FRAME_STATE_BIT
584 #undef FRAME_STATE_BIT