1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/generic/nsFrameStateBits.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,585 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +/* a list of all frame state bits, for preprocessing */ 1.10 + 1.11 +/****** 1.12 + 1.13 + This file contains definitions for frame state bits -- values used 1.14 + in nsIFrame::mState -- and groups of frame state bits and which 1.15 + classes they apply to. 1.16 + 1.17 + There are two macros that can be defined before #including this 1.18 + file: 1.19 + 1.20 + FRAME_STATE_GROUP(name_, class_) 1.21 + 1.22 + This denotes the existence of a named group of frame state bits. 1.23 + name_ is the name of the group and class_ is the name of a frame 1.24 + class that uses the frame state bits that are a part of the group. 1.25 + 1.26 + The main group of frame state bits is named "Generic" and is 1.27 + defined to apply to nsIFrame, i.e. all frames. All of the global 1.28 + frame state bits -- bits 0..19 and 32..59 -- are in this group. 1.29 + 1.30 + FRAME_STATE_BIT(group_, value_, name_) 1.31 + 1.32 + This denotes the existence of a frame state bit. group_ indicates 1.33 + which group the bit belongs to, value_ is the bit number (0..63), 1.34 + and name_ is the name of the frame state bit constant. 1.35 + 1.36 + Note that if you add a new frame state group, you'll need to #include 1.37 + the header for its frame classes in nsFrameState.cpp and, if they don't 1.38 + already, add nsQueryFrame implementations (which can be DEBUG-only) to 1.39 + the frame classes. 1.40 + 1.41 + ******/ 1.42 + 1.43 +#ifndef FRAME_STATE_GROUP 1.44 +#define FRAME_STATE_GROUP(name_, class_) /* nothing */ 1.45 +#define DEFINED_FRAME_STATE_GROUP 1.46 +#endif 1.47 + 1.48 +#ifndef FRAME_STATE_BIT 1.49 +#define FRAME_STATE_BIT(group_, value_, name_) /* nothing */ 1.50 +#define DEFINED_FRAME_STATE_BIT 1.51 +#endif 1.52 + 1.53 +// == Frame state bits that apply to all frames =============================== 1.54 + 1.55 +FRAME_STATE_GROUP(Generic, nsIFrame) 1.56 + 1.57 +FRAME_STATE_BIT(Generic, 0, NS_FRAME_IN_REFLOW) 1.58 + 1.59 +// This bit is set when a frame is created. After it has been reflowed 1.60 +// once (during the DidReflow with a finished state) the bit is 1.61 +// cleared. 1.62 +FRAME_STATE_BIT(Generic, 1, NS_FRAME_FIRST_REFLOW) 1.63 + 1.64 +// For a continuation frame, if this bit is set, then this a "fluid" 1.65 +// continuation, i.e., across a line boundary. Otherwise it's a "hard" 1.66 +// continuation, e.g. a bidi continuation. 1.67 +FRAME_STATE_BIT(Generic, 2, NS_FRAME_IS_FLUID_CONTINUATION) 1.68 + 1.69 +// For nsIAnonymousContentCreator content that's created using ContentInfo. 1.70 +FRAME_STATE_BIT(Generic, 3, NS_FRAME_ANONYMOUSCONTENTCREATOR_CONTENT) 1.71 + 1.72 +// If this bit is set, then a reference to the frame is being held 1.73 +// elsewhere. The frame may want to send a notification when it is 1.74 +// destroyed to allow these references to be cleared. 1.75 +FRAME_STATE_BIT(Generic, 4, NS_FRAME_EXTERNAL_REFERENCE) 1.76 + 1.77 +// If this bit is set, this frame or one of its descendants has a 1.78 +// percentage height that depends on an ancestor of this frame. 1.79 +// (Or it did at one point in the past, since we don't necessarily clear 1.80 +// the bit when it's no longer needed; it's an optimization.) 1.81 +FRAME_STATE_BIT(Generic, 5, NS_FRAME_CONTAINS_RELATIVE_HEIGHT) 1.82 + 1.83 +// If this bit is set, then the frame corresponds to generated content 1.84 +FRAME_STATE_BIT(Generic, 6, NS_FRAME_GENERATED_CONTENT) 1.85 + 1.86 +// If this bit is set the frame is a continuation that is holding overflow, 1.87 +// i.e. it is a next-in-flow created to hold overflow after the box's 1.88 +// height has ended. This means the frame should be a) at the top of the 1.89 +// page and b) invisible: no borders, zero height, ignored in margin 1.90 +// collapsing, etc. See nsContainerFrame.h 1.91 +FRAME_STATE_BIT(Generic, 7, NS_FRAME_IS_OVERFLOW_CONTAINER) 1.92 + 1.93 +// If this bit is set, then the frame has been moved out of the flow, 1.94 +// e.g., it is absolutely positioned or floated 1.95 +FRAME_STATE_BIT(Generic, 8, NS_FRAME_OUT_OF_FLOW) 1.96 + 1.97 +// Frame can be an abs/fixed pos. container, if its style says so. 1.98 +// MarkAs[Not]AbsoluteContainingBlock will assert that this bit is set. 1.99 +// NS_FRAME_HAS_ABSPOS_CHILDREN must not be set when this bit is unset. 1.100 +FRAME_STATE_BIT(Generic, 9, NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN) 1.101 + 1.102 +// If this bit is set, then the frame and _all_ of its descendant frames need 1.103 +// to be reflowed. 1.104 +// This bit is set when the frame is first created. 1.105 +// This bit is cleared by DidReflow after the required call to Reflow has 1.106 +// finished. 1.107 +// Do not set this bit yourself if you plan to pass the frame to 1.108 +// nsIPresShell::FrameNeedsReflow. Pass the right arguments instead. 1.109 +FRAME_STATE_BIT(Generic, 10, NS_FRAME_IS_DIRTY) 1.110 + 1.111 +// If this bit is set then the frame is too deep in the frame tree, and 1.112 +// we'll stop updating it and its children, to prevent stack overflow 1.113 +// and the like. 1.114 +FRAME_STATE_BIT(Generic, 11, NS_FRAME_TOO_DEEP_IN_FRAME_TREE) 1.115 + 1.116 +// If this bit is set, then either: 1.117 +// 1. the frame has at least one child that has the NS_FRAME_IS_DIRTY bit or 1.118 +// NS_FRAME_HAS_DIRTY_CHILDREN bit set, or 1.119 +// 2. the frame has had at least one child removed since the last reflow, or 1.120 +// 3. the frame has had a style change that requires the frame to be reflowed 1.121 +// but does not _necessarily_ require its descendants to be reflowed (e.g., 1.122 +// for a 'height', 'width', 'margin', etc. change, it's up to the 1.123 +// applicable Reflow methods to decide whether the frame's children 1.124 +// _actually_ need to be reflowed). 1.125 +// If this bit is set but the NS_FRAME_IS_DIRTY is not set, then Reflow still 1.126 +// needs to be called on the frame, but Reflow will likely not do as much work 1.127 +// as it would if NS_FRAME_IS_DIRTY were set. See the comment documenting 1.128 +// nsFrame::Reflow for more. 1.129 +// This bit is cleared by DidReflow after the required call to Reflow has 1.130 +// finished. 1.131 +// Do not set this bit yourself if you plan to pass the frame to 1.132 +// nsIPresShell::FrameNeedsReflow. Pass the right arguments instead. 1.133 +FRAME_STATE_BIT(Generic, 12, NS_FRAME_HAS_DIRTY_CHILDREN) 1.134 + 1.135 +// If this bit is set, the frame has an associated view 1.136 +FRAME_STATE_BIT(Generic, 13, NS_FRAME_HAS_VIEW) 1.137 + 1.138 +// If this bit is set, the frame was created from anonymous content. 1.139 +FRAME_STATE_BIT(Generic, 14, NS_FRAME_INDEPENDENT_SELECTION) 1.140 + 1.141 +// If this bit is set, the frame is part of the mangled frame hierarchy 1.142 +// that results when an inline has been split because of a nested block. 1.143 +// See the comments in nsCSSFrameConstructor::ConstructInline for 1.144 +// more details. 1.145 +FRAME_STATE_BIT(Generic, 15, NS_FRAME_PART_OF_IBSPLIT) 1.146 + 1.147 +// If this bit is set, then transforms (e.g. CSS or SVG transforms) are allowed 1.148 +// to affect the frame, and a transform may currently be in affect. If this bit 1.149 +// is not set, then any transforms on the frame will be ignored. 1.150 +// This is used primarily in GetTransformMatrix to optimize for the 1.151 +// common case. 1.152 +FRAME_STATE_BIT(Generic, 16, NS_FRAME_MAY_BE_TRANSFORMED) 1.153 + 1.154 +// If this bit is set, the frame itself is a bidi continuation, 1.155 +// or is incomplete (its next sibling is a bidi continuation) 1.156 +FRAME_STATE_BIT(Generic, 17, NS_FRAME_IS_BIDI) 1.157 + 1.158 +// If this bit is set the frame has descendant with a view 1.159 +FRAME_STATE_BIT(Generic, 18, NS_FRAME_HAS_CHILD_WITH_VIEW) 1.160 + 1.161 +// If this bit is set, then reflow may be dispatched from the current 1.162 +// frame instead of the root frame. 1.163 +FRAME_STATE_BIT(Generic, 19, NS_FRAME_REFLOW_ROOT) 1.164 + 1.165 +// NOTE: Bits 20-31 and 60-63 of the frame state are reserved for specific 1.166 +// frame classes. 1.167 + 1.168 +// This bit is set on floats whose parent does not contain their 1.169 +// placeholder. This can happen for two reasons: (1) the float was 1.170 +// split, and this piece is the continuation, or (2) the entire float 1.171 +// didn't fit on the page. 1.172 +// Note that this bit is also shared by text frames for 1.173 +// TEXT_IS_IN_TOKEN_MATHML. That's OK because we only check the 1.174 +// NS_FRAME_IS_PUSHED_FLOAT bit on frames which we already know are 1.175 +// out-of-flow. 1.176 +FRAME_STATE_BIT(Generic, 32, NS_FRAME_IS_PUSHED_FLOAT) 1.177 + 1.178 +// This bit acts as a loop flag for recursive paint server drawing. 1.179 +FRAME_STATE_BIT(Generic, 33, NS_FRAME_DRAWING_AS_PAINTSERVER) 1.180 + 1.181 +// Frame is a display root and the retained layer tree needs to be updated 1.182 +// at the next paint via display list construction. 1.183 +// Only meaningful for display roots, so we don't really need a global state 1.184 +// bit; we could free up this bit with a little extra complexity. 1.185 +FRAME_STATE_BIT(Generic, 36, NS_FRAME_UPDATE_LAYER_TREE) 1.186 + 1.187 +// Frame can accept absolutely positioned children. 1.188 +FRAME_STATE_BIT(Generic, 37, NS_FRAME_HAS_ABSPOS_CHILDREN) 1.189 + 1.190 +// A display item for this frame has been painted as part of a ThebesLayer. 1.191 +FRAME_STATE_BIT(Generic, 38, NS_FRAME_PAINTED_THEBES) 1.192 + 1.193 +// Frame is or is a descendant of something with a fixed height, unless that 1.194 +// ancestor is a body or html element, and has no closer ancestor that is 1.195 +// overflow:auto or overflow:scroll. 1.196 +FRAME_STATE_BIT(Generic, 39, NS_FRAME_IN_CONSTRAINED_HEIGHT) 1.197 + 1.198 +// This is only set during painting 1.199 +FRAME_STATE_BIT(Generic, 40, NS_FRAME_FORCE_DISPLAY_LIST_DESCEND_INTO) 1.200 + 1.201 +// Is this frame a container for font size inflation, i.e., is it a 1.202 +// frame whose width is used to determine the inflation factor for 1.203 +// everything whose nearest ancestor container for this frame? 1.204 +FRAME_STATE_BIT(Generic, 41, NS_FRAME_FONT_INFLATION_CONTAINER) 1.205 + 1.206 +// Does this frame manage a region in which we do font size inflation, 1.207 +// i.e., roughly, is it an element establishing a new block formatting 1.208 +// context? 1.209 +FRAME_STATE_BIT(Generic, 42, NS_FRAME_FONT_INFLATION_FLOW_ROOT) 1.210 + 1.211 +// This bit is set on SVG frames that are laid out using SVG's coordinate 1.212 +// system based layout (as opposed to any of the CSS layout models). Note that 1.213 +// this does not include nsSVGOuterSVGFrame since it takes part is CSS layout. 1.214 +FRAME_STATE_BIT(Generic, 43, NS_FRAME_SVG_LAYOUT) 1.215 + 1.216 +// Is this frame allowed to have generated (::before/::after) content? 1.217 +FRAME_STATE_BIT(Generic, 44, NS_FRAME_MAY_HAVE_GENERATED_CONTENT) 1.218 + 1.219 +// This bit is set on frames that create ContainerLayers with component 1.220 +// alpha children. With BasicLayers we avoid creating these, so we mark 1.221 +// the frames for future reference. 1.222 +FRAME_STATE_BIT(Generic, 45, NS_FRAME_NO_COMPONENT_ALPHA) 1.223 + 1.224 +// The frame is a descendant of SVGTextFrame and is thus used for SVG 1.225 +// text layout. 1.226 +FRAME_STATE_BIT(Generic, 47, NS_FRAME_IS_SVG_TEXT) 1.227 + 1.228 +// Frame is marked as needing painting 1.229 +FRAME_STATE_BIT(Generic, 48, NS_FRAME_NEEDS_PAINT) 1.230 + 1.231 +// Frame has a descendant frame that needs painting - This includes 1.232 +// cross-doc children. 1.233 +FRAME_STATE_BIT(Generic, 49, NS_FRAME_DESCENDANT_NEEDS_PAINT) 1.234 + 1.235 +// Frame is a descendant of a popup 1.236 +FRAME_STATE_BIT(Generic, 50, NS_FRAME_IN_POPUP) 1.237 + 1.238 +// Frame has only descendant frames that needs painting - This includes 1.239 +// cross-doc children. This guarantees that all descendents have 1.240 +// NS_FRAME_NEEDS_PAINT and NS_FRAME_ALL_DESCENDANTS_NEED_PAINT, or they 1.241 +// have no display items. 1.242 +FRAME_STATE_BIT(Generic, 51, NS_FRAME_ALL_DESCENDANTS_NEED_PAINT) 1.243 + 1.244 +// Frame is marked as NS_FRAME_NEEDS_PAINT and also has an explicit 1.245 +// rect stored to invalidate. 1.246 +FRAME_STATE_BIT(Generic, 52, NS_FRAME_HAS_INVALID_RECT) 1.247 + 1.248 +// Frame is not displayed directly due to it being, or being under, an SVG 1.249 +// <defs> element or an SVG resource element (<mask>, <pattern>, etc.) 1.250 +FRAME_STATE_BIT(Generic, 53, NS_FRAME_IS_NONDISPLAY) 1.251 + 1.252 +// Frame has a LayerActivityProperty property 1.253 +FRAME_STATE_BIT(Generic, 54, NS_FRAME_HAS_LAYER_ACTIVITY_PROPERTY) 1.254 + 1.255 +// Set for all descendants of MathML sub/supscript elements (other than the 1.256 +// base frame) to indicate that the SSTY font feature should be used. 1.257 +FRAME_STATE_BIT(Generic, 58, NS_FRAME_MATHML_SCRIPT_DESCENDANT) 1.258 + 1.259 +// This state bit is set on frames within token MathML elements if the 1.260 +// token represents an <mi> tag whose inner HTML consists of a single 1.261 +// non-whitespace character to allow special rendering behaviour. 1.262 +FRAME_STATE_BIT(Generic, 59, NS_FRAME_IS_IN_SINGLE_CHAR_MI) 1.263 + 1.264 +// NOTE: Bits 20-31 and 60-63 of the frame state are reserved for specific 1.265 +// frame classes. 1.266 + 1.267 + 1.268 +// == Frame state bits that apply to box frames =============================== 1.269 + 1.270 +FRAME_STATE_GROUP(Box, nsBoxFrame) 1.271 + 1.272 +FRAME_STATE_BIT(Box, 20, NS_STATE_BOX_CHILD_RESERVED) 1.273 +FRAME_STATE_BIT(Box, 21, NS_STATE_STACK_NOT_POSITIONED) 1.274 +FRAME_STATE_BIT(Box, 22, NS_STATE_IS_HORIZONTAL) 1.275 +FRAME_STATE_BIT(Box, 23, NS_STATE_AUTO_STRETCH) 1.276 +FRAME_STATE_BIT(Box, 24, NS_STATE_IS_ROOT) 1.277 +FRAME_STATE_BIT(Box, 25, NS_STATE_CURRENTLY_IN_DEBUG) 1.278 +FRAME_STATE_BIT(Box, 26, NS_STATE_SET_TO_DEBUG) 1.279 +FRAME_STATE_BIT(Box, 27, NS_STATE_DEBUG_WAS_SET) 1.280 +FRAME_STATE_BIT(Box, 28, NS_STATE_MENU_HAS_POPUP_LIST) 1.281 +FRAME_STATE_BIT(Box, 29, NS_STATE_BOX_WRAPS_KIDS_IN_BLOCK) 1.282 +FRAME_STATE_BIT(Box, 30, NS_STATE_EQUAL_SIZE) 1.283 +FRAME_STATE_BIT(Box, 31, NS_STATE_IS_DIRECTION_NORMAL) 1.284 +FRAME_STATE_BIT(Box, 60, NS_FRAME_MOUSE_THROUGH_ALWAYS) 1.285 +FRAME_STATE_BIT(Box, 61, NS_FRAME_MOUSE_THROUGH_NEVER) 1.286 + 1.287 + 1.288 +// == Frame state bits that apply to flex container frames ==================== 1.289 + 1.290 +FRAME_STATE_GROUP(FlexContainer, nsFlexContainerFrame) 1.291 + 1.292 +// Set for a flex container whose children have been reordered due to 'order'. 1.293 +// (Means that we have to be more thorough about checking them for sortedness.) 1.294 +FRAME_STATE_BIT(FlexContainer, 20, NS_STATE_FLEX_CHILDREN_REORDERED) 1.295 + 1.296 +// == Frame state bits that apply to SVG frames =============================== 1.297 + 1.298 +FRAME_STATE_GROUP(SVG, nsISVGChildFrame) 1.299 +FRAME_STATE_GROUP(SVG, nsSVGContainerFrame) 1.300 + 1.301 +FRAME_STATE_BIT(SVG, 20, NS_STATE_IS_OUTER_SVG) 1.302 + 1.303 +// If this bit is set, we are a <clipPath> element or descendant. 1.304 +FRAME_STATE_BIT(SVG, 21, NS_STATE_SVG_CLIPPATH_CHILD) 1.305 + 1.306 +// For SVG text, the NS_FRAME_IS_DIRTY and NS_FRAME_HAS_DIRTY_CHILDREN bits 1.307 +// indicate that our anonymous block child needs to be reflowed, and that 1.308 +// mPositions will likely need to be updated as a consequence. These are set, 1.309 +// for example, when the font-family changes. Sometimes we only need to 1.310 +// update mPositions though. For example if the x/y attributes change. 1.311 +// mPositioningDirty is used to indicate this latter "things are dirty" case 1.312 +// to allow us to avoid reflowing the anonymous block when it is not 1.313 +// necessary. 1.314 +FRAME_STATE_BIT(SVG, 22, NS_STATE_SVG_POSITIONING_DIRTY) 1.315 + 1.316 +// For text, whether the values from x/y/dx/dy attributes have any percentage 1.317 +// values that are used in determining the positions of glyphs. The value will 1.318 +// be true even if a positioning value is overridden by a descendant element's 1.319 +// attribute with a non-percentage length. For example, 1.320 +// NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES would be set for: 1.321 +// 1.322 +// <text x="10%"><tspan x="0">abc</tspan></text> 1.323 +// 1.324 +// Percentage values beyond the number of addressable characters, however, do 1.325 +// not influence NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES. For example, 1.326 +// NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES would be false for: 1.327 +// 1.328 +// <text x="10 20 30 40%">abc</text> 1.329 +// 1.330 +// NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES is used to determine whether 1.331 +// to recompute mPositions when the viewport size changes. So although the 1.332 +// first example above shows that NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES 1.333 +// can be true even if a viewport size change will not affect mPositions, 1.334 +// determining a completley accurate value for 1.335 +// NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES would require extra work that is 1.336 +// probably not worth it. 1.337 +FRAME_STATE_BIT(SVG, 23, NS_STATE_SVG_POSITIONING_MAY_USE_PERCENTAGES) 1.338 + 1.339 +FRAME_STATE_BIT(SVG, 24, NS_STATE_SVG_TEXT_IN_REFLOW) 1.340 + 1.341 + 1.342 +// == Frame state bits that apply to text frames ============================== 1.343 + 1.344 +FRAME_STATE_GROUP(Text, nsTextFrame) 1.345 + 1.346 +// -- Flags set during reflow ------------------------------------------------- 1.347 + 1.348 +// nsTextFrame.cpp defines TEXT_REFLOW_FLAGS to be all of these bits. 1.349 + 1.350 +// This bit is set on the first frame in a continuation indicating 1.351 +// that it was chopped short because of :first-letter style. 1.352 +FRAME_STATE_BIT(Text, 20, TEXT_FIRST_LETTER) 1.353 + 1.354 +// This bit is set on frames that are logically adjacent to the start of the 1.355 +// line (i.e. no prior frame on line with actual displayed in-flow content). 1.356 +FRAME_STATE_BIT(Text, 21, TEXT_START_OF_LINE) 1.357 + 1.358 +// This bit is set on frames that are logically adjacent to the end of the 1.359 +// line (i.e. no following on line with actual displayed in-flow content). 1.360 +FRAME_STATE_BIT(Text, 22, TEXT_END_OF_LINE) 1.361 + 1.362 +// This bit is set on frames that end with a hyphenated break. 1.363 +FRAME_STATE_BIT(Text, 23, TEXT_HYPHEN_BREAK) 1.364 + 1.365 +// This bit is set on frames that trimmed trailing whitespace characters when 1.366 +// calculating their width during reflow. 1.367 +FRAME_STATE_BIT(Text, 24, TEXT_TRIMMED_TRAILING_WHITESPACE) 1.368 + 1.369 +// This bit is set on frames that have justification enabled. We record 1.370 +// this in a state bit because we don't always have the containing block 1.371 +// easily available to check text-align on. 1.372 +FRAME_STATE_BIT(Text, 25, TEXT_JUSTIFICATION_ENABLED) 1.373 + 1.374 +// Set this bit if the textframe has overflow area for IME/spellcheck underline. 1.375 +FRAME_STATE_BIT(Text, 26, TEXT_SELECTION_UNDERLINE_OVERFLOWED) 1.376 + 1.377 +// -- Cache bits for IsEmpty() ------------------------------------------------ 1.378 + 1.379 +// nsTextFrame.cpp defines TEXT_WHITESPACE_FLAGS to be both of these bits. 1.380 + 1.381 +// Set this bit if the textframe is known to be only collapsible whitespace. 1.382 +FRAME_STATE_BIT(Text, 27, TEXT_IS_ONLY_WHITESPACE) 1.383 + 1.384 +// Set this bit if the textframe is known to be not only collapsible whitespace. 1.385 +FRAME_STATE_BIT(Text, 28, TEXT_ISNOT_ONLY_WHITESPACE) 1.386 + 1.387 +// -- Other state bits -------------------------------------------------------- 1.388 + 1.389 +// Set when this text frame is mentioned in the userdata for mTextRun 1.390 +FRAME_STATE_BIT(Text, 29, TEXT_IN_TEXTRUN_USER_DATA) 1.391 + 1.392 +// This state bit is set on frames whose character data offsets need to be 1.393 +// fixed up 1.394 +FRAME_STATE_BIT(Text, 30, TEXT_OFFSETS_NEED_FIXING) 1.395 + 1.396 +// This state bit is set on frames that have some non-collapsed characters after 1.397 +// reflow 1.398 +FRAME_STATE_BIT(Text, 31, TEXT_HAS_NONCOLLAPSED_CHARACTERS) 1.399 + 1.400 +// This state bit is set on children of token MathML elements. 1.401 +// NOTE: TEXT_IS_IN_TOKEN_MATHML has a global state bit value that is shared 1.402 +// with NS_FRAME_IS_PUSHED_FLOAT. 1.403 +FRAME_STATE_BIT(Text, 32, TEXT_IS_IN_TOKEN_MATHML) 1.404 + 1.405 +// Set when this text frame is mentioned in the userdata for the 1.406 +// uninflated textrun property 1.407 +FRAME_STATE_BIT(Text, 60, TEXT_IN_UNINFLATED_TEXTRUN_USER_DATA) 1.408 + 1.409 +FRAME_STATE_BIT(Text, 61, TEXT_HAS_FONT_INFLATION) 1.410 + 1.411 +// Whether this frame is cached in the Offset Frame Cache 1.412 +// (OffsetToFrameProperty) 1.413 +FRAME_STATE_BIT(Text, 63, TEXT_IN_OFFSET_CACHE) 1.414 + 1.415 + 1.416 +// == Frame state bits that apply to block frames ============================= 1.417 + 1.418 +FRAME_STATE_GROUP(Block, nsBlockFrame) 1.419 + 1.420 +// See the meanings at http://www.mozilla.org/newlayout/doc/block-and-line.html 1.421 + 1.422 +// Something in the block has changed that requires Bidi resolution to be 1.423 +// performed on the block. This flag must be either set on all blocks in a 1.424 +// continuation chain or none of them. 1.425 +FRAME_STATE_BIT(Block, 20, NS_BLOCK_NEEDS_BIDI_RESOLUTION) 1.426 + 1.427 +FRAME_STATE_BIT(Block, 21, NS_BLOCK_HAS_PUSHED_FLOATS) 1.428 +FRAME_STATE_BIT(Block, 22, NS_BLOCK_MARGIN_ROOT) 1.429 +FRAME_STATE_BIT(Block, 23, NS_BLOCK_FLOAT_MGR) 1.430 +FRAME_STATE_BIT(Block, 24, NS_BLOCK_HAS_LINE_CURSOR) 1.431 +FRAME_STATE_BIT(Block, 25, NS_BLOCK_HAS_OVERFLOW_LINES) 1.432 +FRAME_STATE_BIT(Block, 26, NS_BLOCK_HAS_OVERFLOW_OUT_OF_FLOWS) 1.433 + 1.434 +// Set on any block that has descendant frames in the normal 1.435 +// flow with 'clear' set to something other than 'none' 1.436 +// (including <BR CLEAR="..."> frames) 1.437 +FRAME_STATE_BIT(Block, 27, NS_BLOCK_HAS_CLEAR_CHILDREN) 1.438 + 1.439 +// NS_BLOCK_CLIP_PAGINATED_OVERFLOW is only set in paginated prescontexts, on 1.440 +// blocks which were forced to not have scrollframes but still need to clip 1.441 +// the display of their kids. 1.442 +FRAME_STATE_BIT(Block, 28, NS_BLOCK_CLIP_PAGINATED_OVERFLOW) 1.443 + 1.444 +// NS_BLOCK_HAS_FIRST_LETTER_STYLE means that the block has first-letter style, 1.445 +// even if it has no actual first-letter frame among its descendants. 1.446 +FRAME_STATE_BIT(Block, 29, NS_BLOCK_HAS_FIRST_LETTER_STYLE) 1.447 + 1.448 +// NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET and NS_BLOCK_FRAME_HAS_INSIDE_BULLET 1.449 +// means the block has an associated bullet frame, they are mutually exclusive. 1.450 +FRAME_STATE_BIT(Block, 30, NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET) 1.451 +FRAME_STATE_BIT(Block, 31, NS_BLOCK_FRAME_HAS_INSIDE_BULLET) 1.452 + 1.453 +// This block has had a child marked dirty, so before we reflow we need 1.454 +// to look through the lines to find any such children and mark 1.455 +// appropriate lines dirty. 1.456 +FRAME_STATE_BIT(Block, 61, NS_BLOCK_LOOK_FOR_DIRTY_FRAMES) 1.457 + 1.458 +// Are our cached intrinsic widths intrinsic widths for font size 1.459 +// inflation? i.e., what was the current state of 1.460 +// GetPresContext()->mInflationDisabledForShrinkWrap at the time they 1.461 +// were computed? 1.462 +// nsBlockFrame is the only thing that caches intrinsic widths that 1.463 +// needs to track this because it's the only thing that caches intrinsic 1.464 +// widths that lives inside of things (form controls) that do intrinsic 1.465 +// sizing with font inflation enabled. 1.466 +FRAME_STATE_BIT(Block, 62, NS_BLOCK_FRAME_INTRINSICS_INFLATED) 1.467 + 1.468 +// NS_BLOCK_HAS_FIRST_LETTER_CHILD means that there is an inflow first-letter 1.469 +// frame among the block's descendants. If there is a floating first-letter 1.470 +// frame, or the block has first-letter style but has no first letter, this 1.471 +// bit is not set. This bit is set on the first continuation only. 1.472 +FRAME_STATE_BIT(Block, 63, NS_BLOCK_HAS_FIRST_LETTER_CHILD) 1.473 + 1.474 + 1.475 +// == Frame state bits that apply to bullet frames ============================ 1.476 + 1.477 +FRAME_STATE_GROUP(Bullet, nsBulletFrame) 1.478 + 1.479 +FRAME_STATE_BIT(Block, 62, BULLET_FRAME_HAS_FONT_INFLATION) 1.480 +FRAME_STATE_BIT(Block, 63, BULLET_FRAME_IMAGE_LOADING) 1.481 + 1.482 + 1.483 +// == Frame state bits that apply to scroll frames ============================ 1.484 + 1.485 +FRAME_STATE_GROUP(Scroll, nsIScrollableFrame) 1.486 + 1.487 +// When set, the next scroll operation on the scrollframe will invalidate its 1.488 +// entire contents. Useful for text-overflow. 1.489 +// This bit is cleared after each time the scrollframe is scrolled. Whoever 1.490 +// needs to set it should set it again on each paint. 1.491 +FRAME_STATE_BIT(Scroll, 20, NS_SCROLLFRAME_INVALIDATE_CONTENTS_ON_SCROLL) 1.492 + 1.493 + 1.494 +// == Frame state bits that apply to image frames ============================= 1.495 + 1.496 +FRAME_STATE_GROUP(Image, nsImageFrame) 1.497 + 1.498 +FRAME_STATE_BIT(Image, 20, IMAGE_SIZECONSTRAINED) 1.499 +FRAME_STATE_BIT(Image, 21, IMAGE_GOTINITIALREFLOW) 1.500 + 1.501 + 1.502 +// == Frame state bits that apply to inline frames ============================ 1.503 + 1.504 +FRAME_STATE_GROUP(Inline, nsInlineFrame) 1.505 + 1.506 +/** In Bidi inline start (or end) margin/padding/border should be applied to 1.507 + * first (or last) frame (or a continuation frame). 1.508 + * This state value shows if this frame is first (or last) continuation 1.509 + * or not. 1.510 + */ 1.511 + 1.512 +FRAME_STATE_BIT(Inline, 21, NS_INLINE_FRAME_BIDI_VISUAL_STATE_IS_SET) 1.513 +FRAME_STATE_BIT(Inline, 22, NS_INLINE_FRAME_BIDI_VISUAL_IS_FIRST) 1.514 +FRAME_STATE_BIT(Inline, 23, NS_INLINE_FRAME_BIDI_VISUAL_IS_LAST) 1.515 + 1.516 + 1.517 +// == Frame state bits that apply to placeholder frames ======================= 1.518 + 1.519 +FRAME_STATE_GROUP(Placeholder, nsPlaceholderFrame) 1.520 + 1.521 +// Frame state bits that are used to keep track of what this is a 1.522 +// placeholder for. 1.523 + 1.524 +FRAME_STATE_BIT(Placeholder, 20, PLACEHOLDER_FOR_FLOAT) 1.525 +FRAME_STATE_BIT(Placeholder, 21, PLACEHOLDER_FOR_ABSPOS) 1.526 +FRAME_STATE_BIT(Placeholder, 22, PLACEHOLDER_FOR_FIXEDPOS) 1.527 +FRAME_STATE_BIT(Placeholder, 23, PLACEHOLDER_FOR_POPUP) 1.528 + 1.529 + 1.530 +// == Frame state bits that apply to table cell frames ======================== 1.531 + 1.532 +FRAME_STATE_GROUP(TableCell, nsTableCellFrame) 1.533 + 1.534 +FRAME_STATE_BIT(TableCell, 28, NS_TABLE_CELL_HAS_PCT_OVER_HEIGHT) 1.535 +FRAME_STATE_BIT(TableCell, 29, NS_TABLE_CELL_HAD_SPECIAL_REFLOW) 1.536 +FRAME_STATE_BIT(TableCell, 31, NS_TABLE_CELL_CONTENT_EMPTY) 1.537 + 1.538 + 1.539 +// == Frame state bits that apply to table column frames ====================== 1.540 + 1.541 +// Bits 28-31 on nsTableColFrames are used to store the column type. 1.542 + 1.543 + 1.544 +// == Frame state bits that apply to table column group frames ================ 1.545 + 1.546 +// Bits 30-31 on nsTableColGroupFrames are used to store the column type. 1.547 + 1.548 + 1.549 +// == Frame state bits that apply to table rows and table row group frames ==== 1.550 + 1.551 +FRAME_STATE_GROUP(TableRowAndRowGroup, nsTableRowFrame) 1.552 +FRAME_STATE_GROUP(TableRowAndRowGroup, nsTableRowGroupFrame) 1.553 + 1.554 +// see nsTableRowGroupFrame::InitRepeatedFrame 1.555 +FRAME_STATE_BIT(TableRowAndRowGroup, 28, NS_REPEATED_ROW_OR_ROWGROUP) 1.556 + 1.557 + 1.558 +// == Frame state bits that apply to table row frames ========================= 1.559 + 1.560 +FRAME_STATE_GROUP(TableRow, nsTableRowFrame) 1.561 + 1.562 +// Indicates whether this row has any cells that have 1.563 +// non-auto-height and rowspan=1 1.564 +FRAME_STATE_BIT(TableRow, 29, NS_ROW_HAS_CELL_WITH_STYLE_HEIGHT) 1.565 + 1.566 +FRAME_STATE_BIT(TableRow, 30, NS_TABLE_ROW_HAS_UNPAGINATED_HEIGHT) 1.567 + 1.568 + 1.569 +// == Frame state bits that apply to table row group frames =================== 1.570 + 1.571 +FRAME_STATE_GROUP(TableRowGroup, nsTableRowGroupFrame) 1.572 + 1.573 +FRAME_STATE_BIT(TableRowGroup, 27, NS_ROWGROUP_HAS_ROW_CURSOR) 1.574 +FRAME_STATE_BIT(TableRowGroup, 30, NS_ROWGROUP_HAS_STYLE_HEIGHT) 1.575 + 1.576 +// thead or tfoot should be repeated on every printed page 1.577 +FRAME_STATE_BIT(TableRowGroup, 31, NS_ROWGROUP_REPEATABLE) 1.578 + 1.579 + 1.580 +#ifdef DEFINED_FRAME_STATE_GROUP 1.581 +#undef DEFINED_FRAME_STATE_GROUP 1.582 +#undef FRAME_STATE_GROUP 1.583 +#endif 1.584 + 1.585 +#ifdef DEFINED_FRAME_STATE_BIT 1.586 +#undef DEFINED_FRAME_STATE_BIT 1.587 +#undef FRAME_STATE_BIT 1.588 +#endif