tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsCSSAnonBoxList.h (7301B)


      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 /* atom list for CSS anonymous boxes */
      8 
      9 /*
     10 * This file contains the list of nsAtoms and their values for CSS
     11 * pseudo-element-ish things used internally for anonymous boxes.  It is
     12 * designed to be used as inline input to nsCSSAnonBoxes.cpp *only* through the
     13 * magic of C preprocessing.  All entries must be enclosed in the macros
     14 * CSS_ANON_BOX, CSS_WRAPPER_ANON_BOX, or CSS_NON_INHERITING_ANON_BOX which will
     15 * have cruel and unusual things done to it.  The entries should be kept in some
     16 * sort of logical order.
     17 *
     18 * The first argument to
     19 * CSS_ANON_BOX/CSS_WRAPPER_ANON_BOX/CSS_NON_INHERITING_ANON_BOX is the C++
     20 * identifier of the atom.
     21 *
     22 * The second argument is the string value of the atom.
     23 *
     24 * CSS_NON_INHERITING_ANON_BOX is used for anon boxes that never inherit style
     25 * from anything.  This means all their property values are the initial values
     26 * of those properties.  These ones must come first!  Code relies on this.
     27 * If this macro is not defined, it will default to CSS_ANON_BOX.
     28 *
     29 * CSS_WRAPPER_ANON_BOX is used for anon boxes that are used as wrappers around
     30 * other frames during frametree fixup (e.g. table anonymous boxes, ruby
     31 * anonymous boxes, anonymous flex item blocks, etc).  These are also inheriting
     32 * anon boxes, just like CSS_ANON_BOX.  If this macro is not defined, it will
     33 * default to CSS_ANON_BOX.
     34 */
     35 
     36 // OUTPUT_CLASS=nsCSSAnonBoxes
     37 // MACRO_NAME=CSS_ANON_BOX/CSS_NON_INHERITING_ANON_BOX/CSS_WRAPPER_ANON_BOX
     38 
     39 #ifndef CSS_NON_INHERITING_ANON_BOX
     40 #  ifdef DEFINED_CSS_NON_INHERITING_ANON_BOX
     41 #    error "Recursive includes of nsCSSAnonBoxList.h?"
     42 #  endif /* DEFINED_CSS_NON_INHERITING_ANON_BOX */
     43 #  define CSS_NON_INHERITING_ANON_BOX(name_, value_) CSS_ANON_BOX(name_, value_)
     44 #  define DEFINED_CSS_NON_INHERITING_ANON_BOX
     45 #endif /* CSS_NON_INHERITING_ANON_BOX */
     46 
     47 #ifndef CSS_WRAPPER_ANON_BOX
     48 #  ifdef DEFINED_CSS_WRAPPER_ANON_BOX
     49 #    error "Recursive includes of nsCSSAnonBoxList.h?"
     50 #  endif /* DEFINED_CSS_WRAPPER_ANON_BOX */
     51 #  define CSS_WRAPPER_ANON_BOX(name_, value_) CSS_ANON_BOX(name_, value_)
     52 #  define DEFINED_CSS_WRAPPER_ANON_BOX
     53 #endif /* CSS_WRAPPER_ANON_BOX */
     54 
     55 //---------------------------------------------------------------------------
     56 // Non-inheriting ones, which must come first
     57 //---------------------------------------------------------------------------
     58 
     59 // Placeholder frames for out of flows.  Note that :-moz-placeholder is used for
     60 // the pseudo-element that represents the placeholder text in <input
     61 // placeholder="foo">, so we need a different string here.
     62 CSS_NON_INHERITING_ANON_BOX(oofPlaceholder, ":-moz-oof-placeholder")
     63 
     64 // Framesets
     65 CSS_NON_INHERITING_ANON_BOX(horizontalFramesetBorder, ":-moz-hframeset-border")
     66 CSS_NON_INHERITING_ANON_BOX(verticalFramesetBorder, ":-moz-vframeset-border")
     67 
     68 CSS_NON_INHERITING_ANON_BOX(framesetBlank, ":-moz-frameset-blank")
     69 
     70 CSS_NON_INHERITING_ANON_BOX(tableColGroup, ":-moz-table-column-group")
     71 CSS_NON_INHERITING_ANON_BOX(tableCol, ":-moz-table-column")
     72 
     73 CSS_NON_INHERITING_ANON_BOX(page, ":-moz-page")
     74 CSS_NON_INHERITING_ANON_BOX(pageBreak, ":-moz-page-break")
     75 CSS_NON_INHERITING_ANON_BOX(pageContent, ":-moz-page-content")
     76 CSS_NON_INHERITING_ANON_BOX(printedSheet, ":-moz-printed-sheet")
     77 
     78 // Applies to blocks that wrap contiguous runs of "column-span: all"
     79 // elements in multi-column subtrees, or the wrappers themselves, all the
     80 // way up to the column set wrappers.
     81 CSS_NON_INHERITING_ANON_BOX(columnSpanWrapper, ":-moz-column-span-wrapper")
     82 
     83 //---------------------------------------------------------------------------
     84 // Other ones
     85 //---------------------------------------------------------------------------
     86 
     87 // ::-moz-text, ::-moz-oof-placeholder, and ::-moz-first-letter-continuation are
     88 // non-elements which no rule will match.
     89 CSS_ANON_BOX(mozText, ":-moz-text")
     90 // nsFirstLetterFrames for content outside the ::first-letter.
     91 CSS_ANON_BOX(firstLetterContinuation, ":-moz-first-letter-continuation")
     92 
     93 CSS_ANON_BOX(mozBlockInsideInlineWrapper, ":-moz-block-inside-inline-wrapper")
     94 CSS_WRAPPER_ANON_BOX(mozMathMLAnonymousBlock, ":-moz-mathml-anonymous-block")
     95 
     96 CSS_ANON_BOX(mozLineFrame, ":-moz-line-frame")
     97 
     98 CSS_ANON_BOX(cellContent, ":-moz-cell-content")
     99 CSS_ANON_BOX(dropDownList, ":-moz-dropdown-list")
    100 CSS_ANON_BOX(fieldsetContent, ":-moz-fieldset-content")
    101 CSS_ANON_BOX(htmlCanvasContent, ":-moz-html-canvas-content")
    102 
    103 CSS_WRAPPER_ANON_BOX(inlineTable, ":-moz-inline-table")
    104 CSS_WRAPPER_ANON_BOX(table, ":-moz-table")
    105 CSS_WRAPPER_ANON_BOX(tableCell, ":-moz-table-cell")
    106 CSS_ANON_BOX(tableWrapper, ":-moz-table-wrapper")
    107 CSS_WRAPPER_ANON_BOX(tableRowGroup, ":-moz-table-row-group")
    108 CSS_WRAPPER_ANON_BOX(tableRow, ":-moz-table-row")
    109 
    110 CSS_ANON_BOX(canvas, ":-moz-canvas")
    111 CSS_ANON_BOX(pageSequence, ":-moz-page-sequence")
    112 CSS_ANON_BOX(scrolledContent, ":-moz-scrolled-content")
    113 CSS_ANON_BOX(scrolledCanvas, ":-moz-scrolled-canvas")
    114 
    115 // A column set is a set of columns inside of ColumnSetWrapperFrame, which
    116 // applies to nsColumnSetFrame. It doesn't contain any column-span elements.
    117 CSS_ANON_BOX(columnSet, ":-moz-column-set")
    118 
    119 // Applies to each column block inside of a column set.
    120 CSS_ANON_BOX(columnContent, ":-moz-column-content")
    121 
    122 CSS_ANON_BOX(viewport, ":-moz-viewport")
    123 CSS_ANON_BOX(viewportScroll, ":-moz-viewport-scroll")
    124 
    125 // Inside a flex/grid/-moz-box container, a contiguous run of text gets wrapped
    126 // in an anonymous block, which is then treated as a flex item.
    127 CSS_WRAPPER_ANON_BOX(anonymousItem, ":-moz-anonymous-item")
    128 
    129 CSS_ANON_BOX(blockRubyContent, ":-moz-block-ruby-content")
    130 CSS_WRAPPER_ANON_BOX(ruby, ":-moz-ruby")
    131 CSS_WRAPPER_ANON_BOX(rubyBase, ":-moz-ruby-base")
    132 CSS_WRAPPER_ANON_BOX(rubyBaseContainer, ":-moz-ruby-base-container")
    133 CSS_WRAPPER_ANON_BOX(rubyText, ":-moz-ruby-text")
    134 CSS_WRAPPER_ANON_BOX(rubyTextContainer, ":-moz-ruby-text-container")
    135 
    136 CSS_ANON_BOX(mozTreeColumn, ":-moz-tree-column")
    137 CSS_ANON_BOX(mozTreeRow, ":-moz-tree-row")
    138 CSS_ANON_BOX(mozTreeSeparator, ":-moz-tree-separator")
    139 CSS_ANON_BOX(mozTreeCell, ":-moz-tree-cell")
    140 CSS_ANON_BOX(mozTreeIndentation, ":-moz-tree-indentation")
    141 CSS_ANON_BOX(mozTreeLine, ":-moz-tree-line")
    142 CSS_ANON_BOX(mozTreeTwisty, ":-moz-tree-twisty")
    143 CSS_ANON_BOX(mozTreeImage, ":-moz-tree-image")
    144 CSS_ANON_BOX(mozTreeCellText, ":-moz-tree-cell-text")
    145 CSS_ANON_BOX(mozTreeCheckbox, ":-moz-tree-checkbox")
    146 CSS_ANON_BOX(mozTreeDropFeedback, ":-moz-tree-drop-feedback")
    147 
    148 CSS_ANON_BOX(mozSVGMarkerAnonChild, ":-moz-svg-marker-anon-child")
    149 CSS_ANON_BOX(mozSVGOuterSVGAnonChild, ":-moz-svg-outer-svg-anon-child")
    150 CSS_ANON_BOX(mozSVGForeignContent, ":-moz-svg-foreign-content")
    151 CSS_ANON_BOX(mozSVGText, ":-moz-svg-text")
    152 
    153 #ifdef DEFINED_CSS_NON_INHERITING_ANON_BOX
    154 #  undef DEFINED_CSS_NON_INHERITING_ANON_BOX
    155 #  undef CSS_NON_INHERITING_ANON_BOX
    156 #endif /* DEFINED_CSS_NON_INHERITING_ANON_BOX */
    157 
    158 #ifdef DEFINED_CSS_WRAPPER_ANON_BOX
    159 #  undef DEFINED_CSS_WRAPPER_ANON_BOX
    160 #  undef CSS_WRAPPER_ANON_BOX
    161 #endif /* DEFINED_CSS_NON_INHERITING_ANON_BOX */