michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* a list of all frame state bits, for preprocessing */ michael@0: michael@0: /****** michael@0: michael@0: This file contains definitions for frame state bits -- values used michael@0: in nsIFrame::mState -- and groups of frame state bits and which michael@0: classes they apply to. michael@0: michael@0: There are two macros that can be defined before #including this michael@0: file: michael@0: michael@0: FRAME_STATE_GROUP(name_, class_) michael@0: michael@0: This denotes the existence of a named group of frame state bits. michael@0: name_ is the name of the group and class_ is the name of a frame michael@0: class that uses the frame state bits that are a part of the group. michael@0: michael@0: The main group of frame state bits is named "Generic" and is michael@0: defined to apply to nsIFrame, i.e. all frames. All of the global michael@0: frame state bits -- bits 0..19 and 32..59 -- are in this group. michael@0: michael@0: FRAME_STATE_BIT(group_, value_, name_) michael@0: michael@0: This denotes the existence of a frame state bit. group_ indicates michael@0: which group the bit belongs to, value_ is the bit number (0..63), michael@0: and name_ is the name of the frame state bit constant. michael@0: michael@0: Note that if you add a new frame state group, you'll need to #include michael@0: the header for its frame classes in nsFrameState.cpp and, if they don't michael@0: already, add nsQueryFrame implementations (which can be DEBUG-only) to michael@0: the frame classes. michael@0: michael@0: ******/ michael@0: michael@0: #ifndef FRAME_STATE_GROUP michael@0: #define FRAME_STATE_GROUP(name_, class_) /* nothing */ michael@0: #define DEFINED_FRAME_STATE_GROUP michael@0: #endif michael@0: michael@0: #ifndef FRAME_STATE_BIT michael@0: #define FRAME_STATE_BIT(group_, value_, name_) /* nothing */ michael@0: #define DEFINED_FRAME_STATE_BIT michael@0: #endif michael@0: michael@0: // == Frame state bits that apply to all frames =============================== michael@0: michael@0: FRAME_STATE_GROUP(Generic, nsIFrame) michael@0: michael@0: FRAME_STATE_BIT(Generic, 0, NS_FRAME_IN_REFLOW) michael@0: michael@0: // This bit is set when a frame is created. After it has been reflowed michael@0: // once (during the DidReflow with a finished state) the bit is michael@0: // cleared. michael@0: FRAME_STATE_BIT(Generic, 1, NS_FRAME_FIRST_REFLOW) michael@0: michael@0: // For a continuation frame, if this bit is set, then this a "fluid" michael@0: // continuation, i.e., across a line boundary. Otherwise it's a "hard" michael@0: // continuation, e.g. a bidi continuation. michael@0: FRAME_STATE_BIT(Generic, 2, NS_FRAME_IS_FLUID_CONTINUATION) michael@0: michael@0: // For nsIAnonymousContentCreator content that's created using ContentInfo. michael@0: FRAME_STATE_BIT(Generic, 3, NS_FRAME_ANONYMOUSCONTENTCREATOR_CONTENT) michael@0: michael@0: // If this bit is set, then a reference to the frame is being held michael@0: // elsewhere. The frame may want to send a notification when it is michael@0: // destroyed to allow these references to be cleared. michael@0: FRAME_STATE_BIT(Generic, 4, NS_FRAME_EXTERNAL_REFERENCE) michael@0: michael@0: // If this bit is set, this frame or one of its descendants has a michael@0: // percentage height that depends on an ancestor of this frame. michael@0: // (Or it did at one point in the past, since we don't necessarily clear michael@0: // the bit when it's no longer needed; it's an optimization.) michael@0: FRAME_STATE_BIT(Generic, 5, NS_FRAME_CONTAINS_RELATIVE_HEIGHT) michael@0: michael@0: // If this bit is set, then the frame corresponds to generated content michael@0: FRAME_STATE_BIT(Generic, 6, NS_FRAME_GENERATED_CONTENT) michael@0: michael@0: // If this bit is set the frame is a continuation that is holding overflow, michael@0: // i.e. it is a next-in-flow created to hold overflow after the box's michael@0: // height has ended. This means the frame should be a) at the top of the michael@0: // page and b) invisible: no borders, zero height, ignored in margin michael@0: // collapsing, etc. See nsContainerFrame.h michael@0: FRAME_STATE_BIT(Generic, 7, NS_FRAME_IS_OVERFLOW_CONTAINER) michael@0: michael@0: // If this bit is set, then the frame has been moved out of the flow, michael@0: // e.g., it is absolutely positioned or floated michael@0: FRAME_STATE_BIT(Generic, 8, NS_FRAME_OUT_OF_FLOW) michael@0: michael@0: // Frame can be an abs/fixed pos. container, if its style says so. michael@0: // MarkAs[Not]AbsoluteContainingBlock will assert that this bit is set. michael@0: // NS_FRAME_HAS_ABSPOS_CHILDREN must not be set when this bit is unset. michael@0: FRAME_STATE_BIT(Generic, 9, NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN) michael@0: michael@0: // If this bit is set, then the frame and _all_ of its descendant frames need michael@0: // to be reflowed. michael@0: // This bit is set when the frame is first created. michael@0: // This bit is cleared by DidReflow after the required call to Reflow has michael@0: // finished. michael@0: // Do not set this bit yourself if you plan to pass the frame to michael@0: // nsIPresShell::FrameNeedsReflow. Pass the right arguments instead. michael@0: FRAME_STATE_BIT(Generic, 10, NS_FRAME_IS_DIRTY) michael@0: michael@0: // If this bit is set then the frame is too deep in the frame tree, and michael@0: // we'll stop updating it and its children, to prevent stack overflow michael@0: // and the like. michael@0: FRAME_STATE_BIT(Generic, 11, NS_FRAME_TOO_DEEP_IN_FRAME_TREE) michael@0: michael@0: // If this bit is set, then either: michael@0: // 1. the frame has at least one child that has the NS_FRAME_IS_DIRTY bit or michael@0: // NS_FRAME_HAS_DIRTY_CHILDREN bit set, or michael@0: // 2. the frame has had at least one child removed since the last reflow, or michael@0: // 3. the frame has had a style change that requires the frame to be reflowed michael@0: // but does not _necessarily_ require its descendants to be reflowed (e.g., michael@0: // for a 'height', 'width', 'margin', etc. change, it's up to the michael@0: // applicable Reflow methods to decide whether the frame's children michael@0: // _actually_ need to be reflowed). michael@0: // If this bit is set but the NS_FRAME_IS_DIRTY is not set, then Reflow still michael@0: // needs to be called on the frame, but Reflow will likely not do as much work michael@0: // as it would if NS_FRAME_IS_DIRTY were set. See the comment documenting michael@0: // nsFrame::Reflow for more. michael@0: // This bit is cleared by DidReflow after the required call to Reflow has michael@0: // finished. michael@0: // Do not set this bit yourself if you plan to pass the frame to michael@0: // nsIPresShell::FrameNeedsReflow. Pass the right arguments instead. michael@0: FRAME_STATE_BIT(Generic, 12, NS_FRAME_HAS_DIRTY_CHILDREN) michael@0: michael@0: // If this bit is set, the frame has an associated view michael@0: FRAME_STATE_BIT(Generic, 13, NS_FRAME_HAS_VIEW) michael@0: michael@0: // If this bit is set, the frame was created from anonymous content. michael@0: FRAME_STATE_BIT(Generic, 14, NS_FRAME_INDEPENDENT_SELECTION) michael@0: michael@0: // If this bit is set, the frame is part of the mangled frame hierarchy michael@0: // that results when an inline has been split because of a nested block. michael@0: // See the comments in nsCSSFrameConstructor::ConstructInline for michael@0: // more details. michael@0: FRAME_STATE_BIT(Generic, 15, NS_FRAME_PART_OF_IBSPLIT) michael@0: michael@0: // If this bit is set, then transforms (e.g. CSS or SVG transforms) are allowed michael@0: // to affect the frame, and a transform may currently be in affect. If this bit michael@0: // is not set, then any transforms on the frame will be ignored. michael@0: // This is used primarily in GetTransformMatrix to optimize for the michael@0: // common case. michael@0: FRAME_STATE_BIT(Generic, 16, NS_FRAME_MAY_BE_TRANSFORMED) michael@0: michael@0: // If this bit is set, the frame itself is a bidi continuation, michael@0: // or is incomplete (its next sibling is a bidi continuation) michael@0: FRAME_STATE_BIT(Generic, 17, NS_FRAME_IS_BIDI) michael@0: michael@0: // If this bit is set the frame has descendant with a view michael@0: FRAME_STATE_BIT(Generic, 18, NS_FRAME_HAS_CHILD_WITH_VIEW) michael@0: michael@0: // If this bit is set, then reflow may be dispatched from the current michael@0: // frame instead of the root frame. michael@0: FRAME_STATE_BIT(Generic, 19, NS_FRAME_REFLOW_ROOT) michael@0: michael@0: // NOTE: Bits 20-31 and 60-63 of the frame state are reserved for specific michael@0: // frame classes. michael@0: michael@0: // This bit is set on floats whose parent does not contain their michael@0: // placeholder. This can happen for two reasons: (1) the float was michael@0: // split, and this piece is the continuation, or (2) the entire float michael@0: // didn't fit on the page. michael@0: // Note that this bit is also shared by text frames for michael@0: // TEXT_IS_IN_TOKEN_MATHML. That's OK because we only check the michael@0: // NS_FRAME_IS_PUSHED_FLOAT bit on frames which we already know are michael@0: // out-of-flow. michael@0: FRAME_STATE_BIT(Generic, 32, NS_FRAME_IS_PUSHED_FLOAT) michael@0: michael@0: // This bit acts as a loop flag for recursive paint server drawing. michael@0: FRAME_STATE_BIT(Generic, 33, NS_FRAME_DRAWING_AS_PAINTSERVER) michael@0: michael@0: // Frame is a display root and the retained layer tree needs to be updated michael@0: // at the next paint via display list construction. michael@0: // Only meaningful for display roots, so we don't really need a global state michael@0: // bit; we could free up this bit with a little extra complexity. michael@0: FRAME_STATE_BIT(Generic, 36, NS_FRAME_UPDATE_LAYER_TREE) michael@0: michael@0: // Frame can accept absolutely positioned children. michael@0: FRAME_STATE_BIT(Generic, 37, NS_FRAME_HAS_ABSPOS_CHILDREN) michael@0: michael@0: // A display item for this frame has been painted as part of a ThebesLayer. michael@0: FRAME_STATE_BIT(Generic, 38, NS_FRAME_PAINTED_THEBES) michael@0: michael@0: // Frame is or is a descendant of something with a fixed height, unless that michael@0: // ancestor is a body or html element, and has no closer ancestor that is michael@0: // overflow:auto or overflow:scroll. michael@0: FRAME_STATE_BIT(Generic, 39, NS_FRAME_IN_CONSTRAINED_HEIGHT) michael@0: michael@0: // This is only set during painting michael@0: FRAME_STATE_BIT(Generic, 40, NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO) michael@0: michael@0: // Is this frame a container for font size inflation, i.e., is it a michael@0: // frame whose width is used to determine the inflation factor for michael@0: // everything whose nearest ancestor container for this frame? michael@0: FRAME_STATE_BIT(Generic, 41, NS_FRAME_FONT_INFLATION_CONTAINER) michael@0: michael@0: // Does this frame manage a region in which we do font size inflation, michael@0: // i.e., roughly, is it an element establishing a new block formatting michael@0: // context? michael@0: FRAME_STATE_BIT(Generic, 42, NS_FRAME_FONT_INFLATION_FLOW_ROOT) michael@0: michael@0: // This bit is set on SVG frames that are laid out using SVG's coordinate michael@0: // system based layout (as opposed to any of the CSS layout models). Note that michael@0: // this does not include nsSVGOuterSVGFrame since it takes part is CSS layout. michael@0: FRAME_STATE_BIT(Generic, 43, NS_FRAME_SVG_LAYOUT) michael@0: michael@0: // Is this frame allowed to have generated (::before/::after) content? michael@0: FRAME_STATE_BIT(Generic, 44, NS_FRAME_MAY_HAVE_GENERATED_CONTENT) michael@0: michael@0: // This bit is set on frames that create ContainerLayers with component michael@0: // alpha children. With BasicLayers we avoid creating these, so we mark michael@0: // the frames for future reference. michael@0: FRAME_STATE_BIT(Generic, 45, NS_FRAME_NO_COMPONENT_ALPHA) michael@0: michael@0: // The frame is a descendant of SVGTextFrame and is thus used for SVG michael@0: // text layout. michael@0: FRAME_STATE_BIT(Generic, 47, NS_FRAME_IS_SVG_TEXT) michael@0: michael@0: // Frame is marked as needing painting michael@0: FRAME_STATE_BIT(Generic, 48, NS_FRAME_NEEDS_PAINT) michael@0: michael@0: // Frame has a descendant frame that needs painting - This includes michael@0: // cross-doc children. michael@0: FRAME_STATE_BIT(Generic, 49, NS_FRAME_DESCENDANT_NEEDS_PAINT) michael@0: michael@0: // Frame is a descendant of a popup michael@0: FRAME_STATE_BIT(Generic, 50, NS_FRAME_IN_POPUP) michael@0: michael@0: // Frame has only descendant frames that needs painting - This includes michael@0: // cross-doc children. This guarantees that all descendents have michael@0: // NS_FRAME_NEEDS_PAINT and NS_FRAME_ALL_DESCENDANTS_NEED_PAINT, or they michael@0: // have no display items. michael@0: FRAME_STATE_BIT(Generic, 51, NS_FRAME_ALL_DESCENDANTS_NEED_PAINT) michael@0: michael@0: // Frame is marked as NS_FRAME_NEEDS_PAINT and also has an explicit michael@0: // rect stored to invalidate. michael@0: FRAME_STATE_BIT(Generic, 52, NS_FRAME_HAS_INVALID_RECT) michael@0: michael@0: // Frame is not displayed directly due to it being, or being under, an SVG michael@0: // element or an SVG resource element (, , etc.) michael@0: FRAME_STATE_BIT(Generic, 53, NS_FRAME_IS_NONDISPLAY) michael@0: michael@0: // Frame has a LayerActivityProperty property michael@0: FRAME_STATE_BIT(Generic, 54, NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY) michael@0: michael@0: // Set for all descendants of MathML sub/supscript elements (other than the michael@0: // base frame) to indicate that the SSTY font feature should be used. michael@0: FRAME_STATE_BIT(Generic, 58, NS_FRAME_MATHML_SCRIPT_DESCENDANT) michael@0: michael@0: // This state bit is set on frames within token MathML elements if the michael@0: // token represents an tag whose inner HTML consists of a single michael@0: // non-whitespace character to allow special rendering behaviour. michael@0: FRAME_STATE_BIT(Generic, 59, NS_FRAME_IS_IN_SINGLE_CHAR_MI) michael@0: michael@0: // NOTE: Bits 20-31 and 60-63 of the frame state are reserved for specific michael@0: // frame classes. michael@0: michael@0: michael@0: // == Frame state bits that apply to box frames =============================== michael@0: michael@0: FRAME_STATE_GROUP(Box, nsBoxFrame) michael@0: michael@0: FRAME_STATE_BIT(Box, 20, NS_STATE_BOX_CHILD_RESERVED) michael@0: FRAME_STATE_BIT(Box, 21, NS_STATE_STACK_NOT_POSITIONED) michael@0: FRAME_STATE_BIT(Box, 22, NS_STATE_IS_HORIZONTAL) michael@0: FRAME_STATE_BIT(Box, 23, NS_STATE_AUTO_STRETCH) michael@0: FRAME_STATE_BIT(Box, 24, NS_STATE_IS_ROOT) michael@0: FRAME_STATE_BIT(Box, 25, NS_STATE_CURRENTLY_IN_DEBUG) michael@0: FRAME_STATE_BIT(Box, 26, NS_STATE_SET_TO_DEBUG) michael@0: FRAME_STATE_BIT(Box, 27, NS_STATE_DEBUG_WAS_SET) michael@0: FRAME_STATE_BIT(Box, 28, NS_STATE_MENU_HAS_POPUP_LIST) michael@0: FRAME_STATE_BIT(Box, 29, NS_STATE_BOX_WRAPS_KIDS_IN_BLOCK) michael@0: FRAME_STATE_BIT(Box, 30, NS_STATE_EQUAL_SIZE) michael@0: FRAME_STATE_BIT(Box, 31, NS_STATE_IS_DIRECTION_NORMAL) michael@0: FRAME_STATE_BIT(Box, 60, NS_FRAME_MOUSE_THROUGH_ALWAYS) michael@0: FRAME_STATE_BIT(Box, 61, NS_FRAME_MOUSE_THROUGH_NEVER) michael@0: michael@0: michael@0: // == Frame state bits that apply to flex container frames ==================== michael@0: michael@0: FRAME_STATE_GROUP(FlexContainer, nsFlexContainerFrame) michael@0: michael@0: // Set for a flex container whose children have been reordered due to 'order'. michael@0: // (Means that we have to be more thorough about checking them for sortedness.) michael@0: FRAME_STATE_BIT(FlexContainer, 20, NS_STATE_FLEX_CHILDREN_REORDERED) michael@0: michael@0: // == Frame state bits that apply to SVG frames =============================== michael@0: michael@0: FRAME_STATE_GROUP(SVG, nsISVGChildFrame) michael@0: FRAME_STATE_GROUP(SVG, nsSVGContainerFrame) michael@0: michael@0: FRAME_STATE_BIT(SVG, 20, NS_STATE_IS_OUTER_SVG) michael@0: michael@0: // If this bit is set, we are a element or descendant. michael@0: FRAME_STATE_BIT(SVG, 21, NS_STATE_SVG_CLIPPATH_CHILD) michael@0: michael@0: // For SVG text, the NS_FRAME_IS_DIRTY and NS_FRAME_HAS_DIRTY_CHILDREN bits michael@0: // indicate that our anonymous block child needs to be reflowed, and that michael@0: // mPositions will likely need to be updated as a consequence. These are set, michael@0: // for example, when the font-family changes. Sometimes we only need to michael@0: // update mPositions though. For example if the x/y attributes change. michael@0: // mPositioningDirty is used to indicate this latter "things are dirty" case michael@0: // to allow us to avoid reflowing the anonymous block when it is not michael@0: // necessary. michael@0: FRAME_STATE_BIT(SVG, 22, NS_STATE_SVG_POSITIONING_DIRTY) michael@0: michael@0: // For text, whether the values from x/y/dx/dy attributes have any percentage michael@0: // values that are used in determining the positions of glyphs. The value will michael@0: // be true even if a positioning value is overridden by a descendant element's michael@0: // attribute with a non-percentage length. For example, michael@0: // NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES would be set for: michael@0: // michael@0: // abc michael@0: // michael@0: // Percentage values beyond the number of addressable characters, however, do michael@0: // not influence NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES. For example, michael@0: // NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES would be false for: michael@0: // michael@0: // abc michael@0: // michael@0: // NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES is used to determine whether michael@0: // to recompute mPositions when the viewport size changes. So although the michael@0: // first example above shows that NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES michael@0: // can be true even if a viewport size change will not affect mPositions, michael@0: // determining a completley accurate value for michael@0: // NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES would require extra work that is michael@0: // probably not worth it. michael@0: FRAME_STATE_BIT(SVG, 23, NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES) michael@0: michael@0: FRAME_STATE_BIT(SVG, 24, NS_STATE_SVG_TEXT_IN_REFLOW) michael@0: michael@0: michael@0: // == Frame state bits that apply to text frames ============================== michael@0: michael@0: FRAME_STATE_GROUP(Text, nsTextFrame) michael@0: michael@0: // -- Flags set during reflow ------------------------------------------------- michael@0: michael@0: // nsTextFrame.cpp defines TEXT_REFLOW_FLAGS to be all of these bits. michael@0: michael@0: // This bit is set on the first frame in a continuation indicating michael@0: // that it was chopped short because of :first-letter style. michael@0: FRAME_STATE_BIT(Text, 20, TEXT_FIRST_LETTER) michael@0: michael@0: // This bit is set on frames that are logically adjacent to the start of the michael@0: // line (i.e. no prior frame on line with actual displayed in-flow content). michael@0: FRAME_STATE_BIT(Text, 21, TEXT_START_OF_LINE) michael@0: michael@0: // This bit is set on frames that are logically adjacent to the end of the michael@0: // line (i.e. no following on line with actual displayed in-flow content). michael@0: FRAME_STATE_BIT(Text, 22, TEXT_END_OF_LINE) michael@0: michael@0: // This bit is set on frames that end with a hyphenated break. michael@0: FRAME_STATE_BIT(Text, 23, TEXT_HYPHEN_BREAK) michael@0: michael@0: // This bit is set on frames that trimmed trailing whitespace characters when michael@0: // calculating their width during reflow. michael@0: FRAME_STATE_BIT(Text, 24, TEXT_TRIMMED_TRAILING_WHITESPACE) michael@0: michael@0: // This bit is set on frames that have justification enabled. We record michael@0: // this in a state bit because we don't always have the containing block michael@0: // easily available to check text-align on. michael@0: FRAME_STATE_BIT(Text, 25, TEXT_JUSTIFICATION_ENABLED) michael@0: michael@0: // Set this bit if the textframe has overflow area for IME/spellcheck underline. michael@0: FRAME_STATE_BIT(Text, 26, TEXT_SELECTION_UNDERLINE_OVERFLOWED) michael@0: michael@0: // -- Cache bits for IsEmpty() ------------------------------------------------ michael@0: michael@0: // nsTextFrame.cpp defines TEXT_WHITESPACE_FLAGS to be both of these bits. michael@0: michael@0: // Set this bit if the textframe is known to be only collapsible whitespace. michael@0: FRAME_STATE_BIT(Text, 27, TEXT_IS_ONLY_WHITESPACE) michael@0: michael@0: // Set this bit if the textframe is known to be not only collapsible whitespace. michael@0: FRAME_STATE_BIT(Text, 28, TEXT_ISNOT_ONLY_WHITESPACE) michael@0: michael@0: // -- Other state bits -------------------------------------------------------- michael@0: michael@0: // Set when this text frame is mentioned in the userdata for mTextRun michael@0: FRAME_STATE_BIT(Text, 29, TEXT_IN_TEXTRUN_USER_DATA) michael@0: michael@0: // This state bit is set on frames whose character data offsets need to be michael@0: // fixed up michael@0: FRAME_STATE_BIT(Text, 30, TEXT_OFFSETS_NEED_FIXING) michael@0: michael@0: // This state bit is set on frames that have some non-collapsed characters after michael@0: // reflow michael@0: FRAME_STATE_BIT(Text, 31, TEXT_HAS_NONCOLLAPSED_CHARACTERS) michael@0: michael@0: // This state bit is set on children of token MathML elements. michael@0: // NOTE: TEXT_IS_IN_TOKEN_MATHML has a global state bit value that is shared michael@0: // with NS_FRAME_IS_PUSHED_FLOAT. michael@0: FRAME_STATE_BIT(Text, 32, TEXT_IS_IN_TOKEN_MATHML) michael@0: michael@0: // Set when this text frame is mentioned in the userdata for the michael@0: // uninflated textrun property michael@0: FRAME_STATE_BIT(Text, 60, TEXT_IN_UNINFLATED_TEXTRUN_USER_DATA) michael@0: michael@0: FRAME_STATE_BIT(Text, 61, TEXT_HAS_FONT_INFLATION) michael@0: michael@0: // Whether this frame is cached in the Offset Frame Cache michael@0: // (OffsetToFrameProperty) michael@0: FRAME_STATE_BIT(Text, 63, TEXT_IN_OFFSET_CACHE) michael@0: michael@0: michael@0: // == Frame state bits that apply to block frames ============================= michael@0: michael@0: FRAME_STATE_GROUP(Block, nsBlockFrame) michael@0: michael@0: // See the meanings at http://www.mozilla.org/newlayout/doc/block-and-line.html michael@0: michael@0: // Something in the block has changed that requires Bidi resolution to be michael@0: // performed on the block. This flag must be either set on all blocks in a michael@0: // continuation chain or none of them. michael@0: FRAME_STATE_BIT(Block, 20, NS_BLOCK_NEEDS_BIDI_RESOLUTION) michael@0: michael@0: FRAME_STATE_BIT(Block, 21, NS_BLOCK_HAS_PUSHED_FLOATS) michael@0: FRAME_STATE_BIT(Block, 22, NS_BLOCK_MARGIN_ROOT) michael@0: FRAME_STATE_BIT(Block, 23, NS_BLOCK_FLOAT_MGR) michael@0: FRAME_STATE_BIT(Block, 24, NS_BLOCK_HAS_LINE_CURSOR) michael@0: FRAME_STATE_BIT(Block, 25, NS_BLOCK_HAS_OVERFLOW_LINES) michael@0: FRAME_STATE_BIT(Block, 26, NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS) michael@0: michael@0: // Set on any block that has descendant frames in the normal michael@0: // flow with 'clear' set to something other than 'none' michael@0: // (including
frames) michael@0: FRAME_STATE_BIT(Block, 27, NS_BLOCK_HAS_CLEAR_CHILDREN) michael@0: michael@0: // NS_BLOCK_CLIP_PAGINATED_OVERFLOW is only set in paginated prescontexts, on michael@0: // blocks which were forced to not have scrollframes but still need to clip michael@0: // the display of their kids. michael@0: FRAME_STATE_BIT(Block, 28, NS_BLOCK_CLIP_PAGINATED_OVERFLOW) michael@0: michael@0: // NS_BLOCK_HAS_FIRST_LETTER_STYLE means that the block has first-letter style, michael@0: // even if it has no actual first-letter frame among its descendants. michael@0: FRAME_STATE_BIT(Block, 29, NS_BLOCK_HAS_FIRST_LETTER_STYLE) michael@0: michael@0: // NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET and NS_BLOCK_FRAME_HAS_INSIDE_BULLET michael@0: // means the block has an associated bullet frame, they are mutually exclusive. michael@0: FRAME_STATE_BIT(Block, 30, NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET) michael@0: FRAME_STATE_BIT(Block, 31, NS_BLOCK_FRAME_HAS_INSIDE_BULLET) michael@0: michael@0: // This block has had a child marked dirty, so before we reflow we need michael@0: // to look through the lines to find any such children and mark michael@0: // appropriate lines dirty. michael@0: FRAME_STATE_BIT(Block, 61, NS_BLOCK_LOOK_FOR_DIRTY_FRAMES) michael@0: michael@0: // Are our cached intrinsic widths intrinsic widths for font size michael@0: // inflation? i.e., what was the current state of michael@0: // GetPresContext()->mInflationDisabledForShrinkWrap at the time they michael@0: // were computed? michael@0: // nsBlockFrame is the only thing that caches intrinsic widths that michael@0: // needs to track this because it's the only thing that caches intrinsic michael@0: // widths that lives inside of things (form controls) that do intrinsic michael@0: // sizing with font inflation enabled. michael@0: FRAME_STATE_BIT(Block, 62, NS_BLOCK_FRAME_INTRINSICS_INFLATED) michael@0: michael@0: // NS_BLOCK_HAS_FIRST_LETTER_CHILD means that there is an inflow first-letter michael@0: // frame among the block's descendants. If there is a floating first-letter michael@0: // frame, or the block has first-letter style but has no first letter, this michael@0: // bit is not set. This bit is set on the first continuation only. michael@0: FRAME_STATE_BIT(Block, 63, NS_BLOCK_HAS_FIRST_LETTER_CHILD) michael@0: michael@0: michael@0: // == Frame state bits that apply to bullet frames ============================ michael@0: michael@0: FRAME_STATE_GROUP(Bullet, nsBulletFrame) michael@0: michael@0: FRAME_STATE_BIT(Block, 62, BULLET_FRAME_HAS_FONT_INFLATION) michael@0: FRAME_STATE_BIT(Block, 63, BULLET_FRAME_IMAGE_LOADING) michael@0: michael@0: michael@0: // == Frame state bits that apply to scroll frames ============================ michael@0: michael@0: FRAME_STATE_GROUP(Scroll, nsIScrollableFrame) michael@0: michael@0: // When set, the next scroll operation on the scrollframe will invalidate its michael@0: // entire contents. Useful for text-overflow. michael@0: // This bit is cleared after each time the scrollframe is scrolled. Whoever michael@0: // needs to set it should set it again on each paint. michael@0: FRAME_STATE_BIT(Scroll, 20, NS_SCROLLFRAME_INVALIDATE_CONTENTS_ON_SCROLL) michael@0: michael@0: michael@0: // == Frame state bits that apply to image frames ============================= michael@0: michael@0: FRAME_STATE_GROUP(Image, nsImageFrame) michael@0: michael@0: FRAME_STATE_BIT(Image, 20, IMAGE_SIZECONSTRAINED) michael@0: FRAME_STATE_BIT(Image, 21, IMAGE_GOTINITIALREFLOW) michael@0: michael@0: michael@0: // == Frame state bits that apply to inline frames ============================ michael@0: michael@0: FRAME_STATE_GROUP(Inline, nsInlineFrame) michael@0: michael@0: /** In Bidi inline start (or end) margin/padding/border should be applied to michael@0: * first (or last) frame (or a continuation frame). michael@0: * This state value shows if this frame is first (or last) continuation michael@0: * or not. michael@0: */ michael@0: michael@0: FRAME_STATE_BIT(Inline, 21, NS_INLINE_FRAME_BIDI_VISUAL_STATE_IS_SET) michael@0: FRAME_STATE_BIT(Inline, 22, NS_INLINE_FRAME_BIDI_VISUAL_IS_FIRST) michael@0: FRAME_STATE_BIT(Inline, 23, NS_INLINE_FRAME_BIDI_VISUAL_IS_LAST) michael@0: michael@0: michael@0: // == Frame state bits that apply to placeholder frames ======================= michael@0: michael@0: FRAME_STATE_GROUP(Placeholder, nsPlaceholderFrame) michael@0: michael@0: // Frame state bits that are used to keep track of what this is a michael@0: // placeholder for. michael@0: michael@0: FRAME_STATE_BIT(Placeholder, 20, PLACEHOLDER_FOR_FLOAT) michael@0: FRAME_STATE_BIT(Placeholder, 21, PLACEHOLDER_FOR_ABSPOS) michael@0: FRAME_STATE_BIT(Placeholder, 22, PLACEHOLDER_FOR_FIXEDPOS) michael@0: FRAME_STATE_BIT(Placeholder, 23, PLACEHOLDER_FOR_POPUP) michael@0: michael@0: michael@0: // == Frame state bits that apply to table cell frames ======================== michael@0: michael@0: FRAME_STATE_GROUP(TableCell, nsTableCellFrame) michael@0: michael@0: FRAME_STATE_BIT(TableCell, 28, NS_TABLE_CELL_HAS_PCT_OVER_HEIGHT) michael@0: FRAME_STATE_BIT(TableCell, 29, NS_TABLE_CELL_HAD_SPECIAL_REFLOW) michael@0: FRAME_STATE_BIT(TableCell, 31, NS_TABLE_CELL_CONTENT_EMPTY) michael@0: michael@0: michael@0: // == Frame state bits that apply to table column frames ====================== michael@0: michael@0: // Bits 28-31 on nsTableColFrames are used to store the column type. michael@0: michael@0: michael@0: // == Frame state bits that apply to table column group frames ================ michael@0: michael@0: // Bits 30-31 on nsTableColGroupFrames are used to store the column type. michael@0: michael@0: michael@0: // == Frame state bits that apply to table rows and table row group frames ==== michael@0: michael@0: FRAME_STATE_GROUP(TableRowAndRowGroup, nsTableRowFrame) michael@0: FRAME_STATE_GROUP(TableRowAndRowGroup, nsTableRowGroupFrame) michael@0: michael@0: // see nsTableRowGroupFrame::InitRepeatedFrame michael@0: FRAME_STATE_BIT(TableRowAndRowGroup, 28, NS_REPEATED_ROW_OR_ROWGROUP) michael@0: michael@0: michael@0: // == Frame state bits that apply to table row frames ========================= michael@0: michael@0: FRAME_STATE_GROUP(TableRow, nsTableRowFrame) michael@0: michael@0: // Indicates whether this row has any cells that have michael@0: // non-auto-height and rowspan=1 michael@0: FRAME_STATE_BIT(TableRow, 29, NS_ROW_HAS_CELL_WITH_STYLE_HEIGHT) michael@0: michael@0: FRAME_STATE_BIT(TableRow, 30, NS_TABLE_ROW_HAS_UNPAGINATED_HEIGHT) michael@0: michael@0: michael@0: // == Frame state bits that apply to table row group frames =================== michael@0: michael@0: FRAME_STATE_GROUP(TableRowGroup, nsTableRowGroupFrame) michael@0: michael@0: FRAME_STATE_BIT(TableRowGroup, 27, NS_ROWGROUP_HAS_ROW_CURSOR) michael@0: FRAME_STATE_BIT(TableRowGroup, 30, NS_ROWGROUP_HAS_STYLE_HEIGHT) michael@0: michael@0: // thead or tfoot should be repeated on every printed page michael@0: FRAME_STATE_BIT(TableRowGroup, 31, NS_ROWGROUP_REPEATABLE) michael@0: michael@0: michael@0: #ifdef DEFINED_FRAME_STATE_GROUP michael@0: #undef DEFINED_FRAME_STATE_GROUP michael@0: #undef FRAME_STATE_GROUP michael@0: #endif michael@0: michael@0: #ifdef DEFINED_FRAME_STATE_BIT michael@0: #undef DEFINED_FRAME_STATE_BIT michael@0: #undef FRAME_STATE_BIT michael@0: #endif