nsStyleConsts.h 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316
  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/. */
  5. /* constants used in the style struct data provided by nsStyleContext */
  6. #ifndef nsStyleConsts_h___
  7. #define nsStyleConsts_h___
  8. #include "gfxRect.h"
  9. #include "nsFont.h"
  10. #include "mozilla/MacroArgs.h" // for MOZ_CONCAT
  11. #include "X11UndefineNone.h"
  12. // XXX fold this into nsStyleContext and group by nsStyleXXX struct
  13. namespace mozilla {
  14. namespace css {
  15. typedef mozilla::Side Side;
  16. } // namespace css
  17. // Creates a for loop that walks over the four mozilla::css::Side values.
  18. // We use an int32_t helper variable (instead of a Side) for our loop counter,
  19. // to avoid triggering undefined behavior just before we exit the loop (at
  20. // which point the counter is incremented beyond the largest valid Side value).
  21. #define NS_FOR_CSS_SIDES(var_) \
  22. int32_t MOZ_CONCAT(var_,__LINE__) = NS_SIDE_TOP; \
  23. for (mozilla::css::Side var_; \
  24. MOZ_CONCAT(var_,__LINE__) <= NS_SIDE_LEFT && \
  25. ((var_ = mozilla::css::Side(MOZ_CONCAT(var_,__LINE__))), true); \
  26. MOZ_CONCAT(var_,__LINE__)++)
  27. static inline css::Side operator++(css::Side& side, int) {
  28. NS_PRECONDITION(side >= NS_SIDE_TOP &&
  29. side <= NS_SIDE_LEFT, "Out of range side");
  30. side = css::Side(side + 1);
  31. return side;
  32. }
  33. #define NS_FOR_CSS_FULL_CORNERS(var_) for (int32_t var_ = 0; var_ < 4; ++var_)
  34. // Indices into "half corner" arrays (nsStyleCorners e.g.)
  35. #define NS_CORNER_TOP_LEFT_X 0
  36. #define NS_CORNER_TOP_LEFT_Y 1
  37. #define NS_CORNER_TOP_RIGHT_X 2
  38. #define NS_CORNER_TOP_RIGHT_Y 3
  39. #define NS_CORNER_BOTTOM_RIGHT_X 4
  40. #define NS_CORNER_BOTTOM_RIGHT_Y 5
  41. #define NS_CORNER_BOTTOM_LEFT_X 6
  42. #define NS_CORNER_BOTTOM_LEFT_Y 7
  43. #define NS_FOR_CSS_HALF_CORNERS(var_) for (int32_t var_ = 0; var_ < 8; ++var_)
  44. // The results of these conversion macros are exhaustively checked in
  45. // nsStyleCoord.cpp.
  46. // Arguments must not have side effects.
  47. #define NS_HALF_CORNER_IS_X(var_) (!((var_)%2))
  48. #define NS_HALF_TO_FULL_CORNER(var_) ((var_)/2)
  49. #define NS_FULL_TO_HALF_CORNER(var_, vert_) ((var_)*2 + !!(vert_))
  50. #define NS_SIDE_IS_VERTICAL(side_) ((side_) % 2)
  51. #define NS_SIDE_TO_FULL_CORNER(side_, second_) \
  52. (((side_) + !!(second_)) % 4)
  53. #define NS_SIDE_TO_HALF_CORNER(side_, second_, parallel_) \
  54. ((((side_) + !!(second_))*2 + ((side_) + !(parallel_))%2) % 8)
  55. // Basic shapes
  56. enum class StyleBasicShapeType : uint8_t {
  57. Polygon,
  58. Circle,
  59. Ellipse,
  60. Inset,
  61. };
  62. // box-align
  63. enum class StyleBoxAlign : uint8_t {
  64. Stretch,
  65. Start,
  66. Center,
  67. Baseline,
  68. End,
  69. };
  70. // box-decoration-break
  71. enum class StyleBoxDecorationBreak : uint8_t {
  72. Slice,
  73. Clone,
  74. };
  75. // box-direction
  76. enum class StyleBoxDirection : uint8_t {
  77. Normal,
  78. Reverse,
  79. };
  80. // box-orient
  81. enum class StyleBoxOrient : uint8_t {
  82. Horizontal,
  83. Vertical,
  84. };
  85. // box-pack
  86. enum class StyleBoxPack : uint8_t {
  87. Start,
  88. Center,
  89. End,
  90. Justify,
  91. };
  92. // box-sizing
  93. enum class StyleBoxSizing : uint8_t {
  94. Content,
  95. Border
  96. };
  97. // box-shadow
  98. enum class StyleBoxShadowType : uint8_t {
  99. Inset,
  100. };
  101. // clear
  102. enum class StyleClear : uint8_t {
  103. None = 0,
  104. Left,
  105. Right,
  106. InlineStart,
  107. InlineEnd,
  108. Both,
  109. // StyleClear::Line can be added to one of the other values in layout
  110. // so it needs to use a bit value that none of the other values can have.
  111. Line = 8,
  112. Max = 13 // Max = (Both | Line)
  113. };
  114. // Define geometry box for clip-path's reference-box, background-clip,
  115. // background-origin, mask-clip and mask-origin.
  116. enum class StyleGeometryBox : uint8_t {
  117. Content,
  118. Padding,
  119. Border,
  120. Margin, // XXX Bug 1260094 comment 9.
  121. // Although margin-box is required by mask-origin and mask-clip, we
  122. // do not implement that due to lack of support in other browsers.
  123. // clip-path reference-box only.
  124. Fill, // mask-clip, mask-origin and clip-path reference-box only.
  125. Stroke, // mask-clip, mask-origin and clip-path reference-box only.
  126. View, // mask-clip, mask-origin and clip-path reference-box only.
  127. NoClip, // mask-clip only.
  128. Text, // background-clip only.
  129. NoBox, // Depending on which kind of element this style value applied on,
  130. // the default value of a reference-box can be different.
  131. // For an HTML element, the default value of reference-box is
  132. // border-box; for an SVG element, the default value is fill-box.
  133. // Since we can not determine the default value at parsing time,
  134. // set it as NoBox so that we make a decision later.
  135. // clip-path reference-box only.
  136. MozAlmostPadding = 127 // A magic value that we use for our "pretend that
  137. // background-clip is 'padding' when we have a solid
  138. // border" optimization. This isn't actually equal
  139. // to StyleGeometryBox::Padding because using that
  140. // causes antialiasing seams between the background
  141. // and border.
  142. // background-clip only.
  143. };
  144. // fill-rule
  145. enum class StyleFillRule : uint8_t {
  146. Nonzero,
  147. Evenodd,
  148. };
  149. // float
  150. // https://developer.mozilla.org/en-US/docs/Web/CSS/float
  151. enum class StyleFloat : uint8_t {
  152. None,
  153. Left,
  154. Right,
  155. InlineStart,
  156. InlineEnd
  157. };
  158. // float-edge
  159. enum class StyleFloatEdge : uint8_t {
  160. ContentBox,
  161. MarginBox,
  162. };
  163. // scrollbar-width
  164. enum class StyleScrollbarWidth : uint8_t {
  165. Auto,
  166. Thin,
  167. None,
  168. };
  169. // shape-box for shape-outside
  170. enum class StyleShapeOutsideShapeBox : uint8_t {
  171. NoBox,
  172. Content,
  173. Padding,
  174. Border,
  175. Margin
  176. };
  177. // Shape source type
  178. enum class StyleShapeSourceType : uint8_t {
  179. None,
  180. URL,
  181. Shape,
  182. Box,
  183. };
  184. // text-justify
  185. enum class StyleTextJustify : uint8_t {
  186. None,
  187. Auto,
  188. InterWord,
  189. InterCharacter,
  190. };
  191. // user-focus
  192. enum class StyleUserFocus : uint8_t {
  193. None,
  194. Ignore,
  195. Normal,
  196. SelectAll,
  197. SelectBefore,
  198. SelectAfter,
  199. SelectSame,
  200. SelectMenu,
  201. };
  202. // user-select
  203. enum class StyleUserSelect : uint8_t {
  204. None,
  205. Text,
  206. Element,
  207. Elements,
  208. All,
  209. Toggle,
  210. TriState,
  211. Auto, // internal value - please use nsFrame::IsSelectable()
  212. MozAll, // force selection of all children, unless an ancestor has NONE set - bug 48096
  213. MozText, // Like TEXT, except that it won't get overridden by ancestors having ALL.
  214. };
  215. // user-input
  216. enum class StyleUserInput : uint8_t {
  217. None,
  218. Enabled,
  219. Disabled,
  220. Auto,
  221. };
  222. // user-modify
  223. enum class StyleUserModify : uint8_t {
  224. ReadOnly,
  225. ReadWrite,
  226. WriteOnly,
  227. };
  228. // -moz-window-dragging
  229. enum class StyleWindowDragging : uint8_t {
  230. Default,
  231. Drag,
  232. NoDrag,
  233. };
  234. // orient
  235. enum class StyleOrient : uint8_t {
  236. Inline,
  237. Block,
  238. Horizontal,
  239. Vertical,
  240. };
  241. #define NS_RADIUS_FARTHEST_SIDE 0
  242. #define NS_RADIUS_CLOSEST_SIDE 1
  243. // stack-sizing
  244. #define NS_STYLE_STACK_SIZING_IGNORE 0
  245. #define NS_STYLE_STACK_SIZING_STRETCH_TO_FIT 1
  246. // Azimuth - See nsStyleAural
  247. #define NS_STYLE_AZIMUTH_LEFT_SIDE 0x00
  248. #define NS_STYLE_AZIMUTH_FAR_LEFT 0x01
  249. #define NS_STYLE_AZIMUTH_LEFT 0x02
  250. #define NS_STYLE_AZIMUTH_CENTER_LEFT 0x03
  251. #define NS_STYLE_AZIMUTH_CENTER 0x04
  252. #define NS_STYLE_AZIMUTH_CENTER_RIGHT 0x05
  253. #define NS_STYLE_AZIMUTH_RIGHT 0x06
  254. #define NS_STYLE_AZIMUTH_FAR_RIGHT 0x07
  255. #define NS_STYLE_AZIMUTH_RIGHT_SIDE 0x08
  256. #define NS_STYLE_AZIMUTH_BEHIND 0x80 // bits
  257. #define NS_STYLE_AZIMUTH_LEFTWARDS 0x10 // bits
  258. #define NS_STYLE_AZIMUTH_RIGHTWARDS 0x20 // bits
  259. // See nsStyleAural
  260. #define NS_STYLE_ELEVATION_BELOW 1
  261. #define NS_STYLE_ELEVATION_LEVEL 2
  262. #define NS_STYLE_ELEVATION_ABOVE 3
  263. #define NS_STYLE_ELEVATION_HIGHER 4
  264. #define NS_STYLE_ELEVATION_LOWER 5
  265. // See nsStyleAural
  266. #define NS_STYLE_PITCH_X_LOW 1
  267. #define NS_STYLE_PITCH_LOW 2
  268. #define NS_STYLE_PITCH_MEDIUM 3
  269. #define NS_STYLE_PITCH_HIGH 4
  270. #define NS_STYLE_PITCH_X_HIGH 5
  271. // See nsStyleAural
  272. #define NS_STYLE_SPEAK_NONE 0
  273. #define NS_STYLE_SPEAK_NORMAL 1
  274. #define NS_STYLE_SPEAK_SPELL_OUT 2
  275. // See nsStyleAural
  276. #define NS_STYLE_SPEAK_HEADER_ONCE 0
  277. #define NS_STYLE_SPEAK_HEADER_ALWAYS 1
  278. // See nsStyleAural
  279. #define NS_STYLE_SPEAK_NUMERAL_DIGITS 0
  280. #define NS_STYLE_SPEAK_NUMERAL_CONTINUOUS 1
  281. // See nsStyleAural
  282. #define NS_STYLE_SPEAK_PUNCTUATION_NONE 0
  283. #define NS_STYLE_SPEAK_PUNCTUATION_CODE 1
  284. // See nsStyleAural
  285. #define NS_STYLE_SPEECH_RATE_X_SLOW 0
  286. #define NS_STYLE_SPEECH_RATE_SLOW 1
  287. #define NS_STYLE_SPEECH_RATE_MEDIUM 2
  288. #define NS_STYLE_SPEECH_RATE_FAST 3
  289. #define NS_STYLE_SPEECH_RATE_X_FAST 4
  290. #define NS_STYLE_SPEECH_RATE_FASTER 10
  291. #define NS_STYLE_SPEECH_RATE_SLOWER 11
  292. // See nsStyleAural
  293. #define NS_STYLE_VOLUME_SILENT 0
  294. #define NS_STYLE_VOLUME_X_SOFT 1
  295. #define NS_STYLE_VOLUME_SOFT 2
  296. #define NS_STYLE_VOLUME_MEDIUM 3
  297. #define NS_STYLE_VOLUME_LOUD 4
  298. #define NS_STYLE_VOLUME_X_LOUD 5
  299. // See nsStyleColor
  300. #define NS_STYLE_COLOR_INHERIT_FROM_BODY 2 /* Can't come from CSS directly */
  301. // See nsStyleColor
  302. #define NS_COLOR_CURRENTCOLOR -1
  303. #define NS_COLOR_MOZ_DEFAULT_COLOR -2
  304. #define NS_COLOR_MOZ_DEFAULT_BACKGROUND_COLOR -3
  305. #define NS_COLOR_MOZ_HYPERLINKTEXT -4
  306. #define NS_COLOR_MOZ_VISITEDHYPERLINKTEXT -5
  307. #define NS_COLOR_MOZ_ACTIVEHYPERLINKTEXT -6
  308. // Only valid as paints in SVG glyphs
  309. #define NS_COLOR_CONTEXT_FILL -7
  310. #define NS_COLOR_CONTEXT_STROKE -8
  311. // See nsStyleDisplay
  312. #define NS_STYLE_WILL_CHANGE_STACKING_CONTEXT (1<<0)
  313. #define NS_STYLE_WILL_CHANGE_TRANSFORM (1<<1)
  314. #define NS_STYLE_WILL_CHANGE_SCROLL (1<<2)
  315. #define NS_STYLE_WILL_CHANGE_OPACITY (1<<3)
  316. #define NS_STYLE_WILL_CHANGE_FIXPOS_CB (1<<4)
  317. #define NS_STYLE_WILL_CHANGE_ABSPOS_CB (1<<5)
  318. // See AnimationEffectReadOnly.webidl
  319. // and mozilla/dom/AnimationEffectReadOnlyBinding.h
  320. namespace dom {
  321. enum class PlaybackDirection : uint32_t;
  322. enum class FillMode : uint32_t;
  323. }
  324. // See nsStyleDisplay
  325. #define NS_STYLE_ANIMATION_ITERATION_COUNT_INFINITE 0
  326. // See nsStyleDisplay
  327. #define NS_STYLE_ANIMATION_PLAY_STATE_RUNNING 0
  328. #define NS_STYLE_ANIMATION_PLAY_STATE_PAUSED 1
  329. // See nsStyleImageLayers
  330. #define NS_STYLE_IMAGELAYER_ATTACHMENT_SCROLL 0
  331. #define NS_STYLE_IMAGELAYER_ATTACHMENT_FIXED 1
  332. #define NS_STYLE_IMAGELAYER_ATTACHMENT_LOCAL 2
  333. // A magic value that we use for our "pretend that background-clip is
  334. // 'padding' when we have a solid border" optimization. This isn't
  335. // actually equal to NS_STYLE_IMAGELAYER_CLIP_PADDING because using that
  336. // causes antialiasing seams between the background and border. This
  337. // is a backend-only value.
  338. #define NS_STYLE_IMAGELAYER_CLIP_MOZ_ALMOST_PADDING 127
  339. // See nsStyleImageLayers
  340. // The parser code depends on |ing these values together.
  341. #define NS_STYLE_IMAGELAYER_POSITION_CENTER (1<<0)
  342. #define NS_STYLE_IMAGELAYER_POSITION_TOP (1<<1)
  343. #define NS_STYLE_IMAGELAYER_POSITION_BOTTOM (1<<2)
  344. #define NS_STYLE_IMAGELAYER_POSITION_LEFT (1<<3)
  345. #define NS_STYLE_IMAGELAYER_POSITION_RIGHT (1<<4)
  346. // See nsStyleImageLayers
  347. #define NS_STYLE_IMAGELAYER_REPEAT_NO_REPEAT 0x00
  348. #define NS_STYLE_IMAGELAYER_REPEAT_REPEAT_X 0x01
  349. #define NS_STYLE_IMAGELAYER_REPEAT_REPEAT_Y 0x02
  350. #define NS_STYLE_IMAGELAYER_REPEAT_REPEAT 0x03
  351. #define NS_STYLE_IMAGELAYER_REPEAT_SPACE 0x04
  352. #define NS_STYLE_IMAGELAYER_REPEAT_ROUND 0x05
  353. // See nsStyleImageLayers
  354. #define NS_STYLE_IMAGELAYER_SIZE_CONTAIN 0
  355. #define NS_STYLE_IMAGELAYER_SIZE_COVER 1
  356. // Mask mode
  357. #define NS_STYLE_MASK_MODE_ALPHA 0
  358. #define NS_STYLE_MASK_MODE_LUMINANCE 1
  359. #define NS_STYLE_MASK_MODE_MATCH_SOURCE 2
  360. // See nsStyleBackground
  361. #define NS_STYLE_BG_INLINE_POLICY_EACH_BOX 0
  362. #define NS_STYLE_BG_INLINE_POLICY_CONTINUOUS 1
  363. #define NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX 2
  364. // See nsStyleTable
  365. #define NS_STYLE_BORDER_COLLAPSE 0
  366. #define NS_STYLE_BORDER_SEPARATE 1
  367. // Possible enumerated specified values of border-*-width, used by nsCSSMargin
  368. #define NS_STYLE_BORDER_WIDTH_THIN 0
  369. #define NS_STYLE_BORDER_WIDTH_MEDIUM 1
  370. #define NS_STYLE_BORDER_WIDTH_THICK 2
  371. // XXX chopping block #define NS_STYLE_BORDER_WIDTH_LENGTH_VALUE 3
  372. // See nsStyleBorder mBorderStyle
  373. #define NS_STYLE_BORDER_STYLE_NONE 0
  374. #define NS_STYLE_BORDER_STYLE_GROOVE 1
  375. #define NS_STYLE_BORDER_STYLE_RIDGE 2
  376. #define NS_STYLE_BORDER_STYLE_DOTTED 3
  377. #define NS_STYLE_BORDER_STYLE_DASHED 4
  378. #define NS_STYLE_BORDER_STYLE_SOLID 5
  379. #define NS_STYLE_BORDER_STYLE_DOUBLE 6
  380. #define NS_STYLE_BORDER_STYLE_INSET 7
  381. #define NS_STYLE_BORDER_STYLE_OUTSET 8
  382. #define NS_STYLE_BORDER_STYLE_HIDDEN 9
  383. #define NS_STYLE_BORDER_STYLE_AUTO 10 // for outline-style only
  384. // See nsStyleBorder mBorderImage
  385. #define NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH 0
  386. #define NS_STYLE_BORDER_IMAGE_REPEAT_REPEAT 1
  387. #define NS_STYLE_BORDER_IMAGE_REPEAT_ROUND 2
  388. #define NS_STYLE_BORDER_IMAGE_REPEAT_SPACE 3
  389. #define NS_STYLE_BORDER_IMAGE_SLICE_NOFILL 0
  390. #define NS_STYLE_BORDER_IMAGE_SLICE_FILL 1
  391. // See nsStyleContent
  392. #define NS_STYLE_CONTENT_OPEN_QUOTE 0
  393. #define NS_STYLE_CONTENT_CLOSE_QUOTE 1
  394. #define NS_STYLE_CONTENT_NO_OPEN_QUOTE 2
  395. #define NS_STYLE_CONTENT_NO_CLOSE_QUOTE 3
  396. #define NS_STYLE_CONTENT_ALT_CONTENT 4
  397. // See nsStyleColor
  398. #define NS_STYLE_CURSOR_AUTO 1
  399. #define NS_STYLE_CURSOR_CROSSHAIR 2
  400. #define NS_STYLE_CURSOR_DEFAULT 3 // ie: an arrow
  401. #define NS_STYLE_CURSOR_POINTER 4 // for links
  402. #define NS_STYLE_CURSOR_MOVE 5
  403. #define NS_STYLE_CURSOR_E_RESIZE 6
  404. #define NS_STYLE_CURSOR_NE_RESIZE 7
  405. #define NS_STYLE_CURSOR_NW_RESIZE 8
  406. #define NS_STYLE_CURSOR_N_RESIZE 9
  407. #define NS_STYLE_CURSOR_SE_RESIZE 10
  408. #define NS_STYLE_CURSOR_SW_RESIZE 11
  409. #define NS_STYLE_CURSOR_S_RESIZE 12
  410. #define NS_STYLE_CURSOR_W_RESIZE 13
  411. #define NS_STYLE_CURSOR_TEXT 14 // ie: i-beam
  412. #define NS_STYLE_CURSOR_WAIT 15
  413. #define NS_STYLE_CURSOR_HELP 16
  414. #define NS_STYLE_CURSOR_COPY 17 // CSS3
  415. #define NS_STYLE_CURSOR_ALIAS 18
  416. #define NS_STYLE_CURSOR_CONTEXT_MENU 19
  417. #define NS_STYLE_CURSOR_CELL 20
  418. #define NS_STYLE_CURSOR_GRAB 21
  419. #define NS_STYLE_CURSOR_GRABBING 22
  420. #define NS_STYLE_CURSOR_SPINNING 23
  421. #define NS_STYLE_CURSOR_ZOOM_IN 24
  422. #define NS_STYLE_CURSOR_ZOOM_OUT 25
  423. #define NS_STYLE_CURSOR_NOT_ALLOWED 26
  424. #define NS_STYLE_CURSOR_COL_RESIZE 27
  425. #define NS_STYLE_CURSOR_ROW_RESIZE 28
  426. #define NS_STYLE_CURSOR_NO_DROP 29
  427. #define NS_STYLE_CURSOR_VERTICAL_TEXT 30
  428. #define NS_STYLE_CURSOR_ALL_SCROLL 31
  429. #define NS_STYLE_CURSOR_NESW_RESIZE 32
  430. #define NS_STYLE_CURSOR_NWSE_RESIZE 33
  431. #define NS_STYLE_CURSOR_NS_RESIZE 34
  432. #define NS_STYLE_CURSOR_EW_RESIZE 35
  433. #define NS_STYLE_CURSOR_NONE 36
  434. // See nsStyleVisibility
  435. #define NS_STYLE_DIRECTION_LTR 0
  436. #define NS_STYLE_DIRECTION_RTL 1
  437. // See nsStyleVisibility
  438. // NOTE: WritingModes.h depends on the particular values used here.
  439. #define NS_STYLE_WRITING_MODE_HORIZONTAL_TB 0
  440. #define NS_STYLE_WRITING_MODE_VERTICAL_RL 1
  441. // #define NS_STYLE_WRITING_MODE_HORIZONTAL_BT 2 // hypothetical
  442. #define NS_STYLE_WRITING_MODE_VERTICAL_LR 3
  443. // Single-bit flag, used in combination with VERTICAL_LR and _RL to specify
  444. // the corresponding SIDEWAYS_* modes.
  445. // (To avoid ambiguity, this bit must be high enough such that no other
  446. // values here accidentally use it in their binary representation.)
  447. #define NS_STYLE_WRITING_MODE_SIDEWAYS_MASK 4
  448. #define NS_STYLE_WRITING_MODE_SIDEWAYS_RL \
  449. (NS_STYLE_WRITING_MODE_VERTICAL_RL | \
  450. NS_STYLE_WRITING_MODE_SIDEWAYS_MASK)
  451. #define NS_STYLE_WRITING_MODE_SIDEWAYS_LR \
  452. (NS_STYLE_WRITING_MODE_VERTICAL_LR | \
  453. NS_STYLE_WRITING_MODE_SIDEWAYS_MASK)
  454. // See nsStyleDisplay
  455. //
  456. // NOTE: Order is important! If you change it, make sure to take a look at
  457. // the FrameConstructorDataByDisplay stuff (both the XUL and non-XUL version),
  458. // and ensure it's still correct!
  459. enum class StyleDisplay : uint8_t {
  460. None = 0,
  461. Block,
  462. FlowRoot,
  463. Inline,
  464. InlineBlock,
  465. ListItem,
  466. Table,
  467. InlineTable,
  468. TableRowGroup,
  469. TableColumn,
  470. TableColumnGroup,
  471. TableHeaderGroup,
  472. TableFooterGroup,
  473. TableRow,
  474. TableCell,
  475. TableCaption,
  476. Flex,
  477. InlineFlex,
  478. Grid,
  479. InlineGrid,
  480. Ruby,
  481. RubyBase,
  482. RubyBaseContainer,
  483. RubyText,
  484. RubyTextContainer,
  485. Contents,
  486. WebkitBox,
  487. WebkitInlineBox,
  488. Box,
  489. InlineBox,
  490. #ifdef MOZ_XUL
  491. XulGrid,
  492. InlineXulGrid,
  493. XulGridGroup,
  494. XulGridLine,
  495. Stack,
  496. InlineStack,
  497. Deck,
  498. Groupbox,
  499. Popup,
  500. #endif
  501. };
  502. // See nsStyleDisplay
  503. // If these are re-ordered, nsComputedDOMStyle::DoGetContain() and
  504. // nsCSSValue::AppendToString() must be updated.
  505. #define NS_STYLE_CONTAIN_NONE 0
  506. #define NS_STYLE_CONTAIN_STRICT 0x1
  507. #define NS_STYLE_CONTAIN_LAYOUT 0x2
  508. #define NS_STYLE_CONTAIN_STYLE 0x4
  509. #define NS_STYLE_CONTAIN_PAINT 0x8
  510. // NS_STYLE_CONTAIN_ALL_BITS does not correspond to a keyword.
  511. #define NS_STYLE_CONTAIN_ALL_BITS (NS_STYLE_CONTAIN_LAYOUT | \
  512. NS_STYLE_CONTAIN_STYLE | \
  513. NS_STYLE_CONTAIN_PAINT)
  514. // Shared constants for all align/justify properties (nsStylePosition):
  515. #define NS_STYLE_ALIGN_AUTO 0
  516. #define NS_STYLE_ALIGN_NORMAL 1
  517. #define NS_STYLE_ALIGN_START 2
  518. #define NS_STYLE_ALIGN_END 3
  519. #define NS_STYLE_ALIGN_FLEX_START 4
  520. #define NS_STYLE_ALIGN_FLEX_END 5
  521. #define NS_STYLE_ALIGN_CENTER 6
  522. #define NS_STYLE_ALIGN_LEFT 7
  523. #define NS_STYLE_ALIGN_RIGHT 8
  524. #define NS_STYLE_ALIGN_BASELINE 9
  525. #define NS_STYLE_ALIGN_LAST_BASELINE 10
  526. #define NS_STYLE_ALIGN_STRETCH 11
  527. #define NS_STYLE_ALIGN_SELF_START 12
  528. #define NS_STYLE_ALIGN_SELF_END 13
  529. #define NS_STYLE_ALIGN_SPACE_BETWEEN 14
  530. #define NS_STYLE_ALIGN_SPACE_AROUND 15
  531. #define NS_STYLE_ALIGN_SPACE_EVENLY 16
  532. #define NS_STYLE_ALIGN_LEGACY 0x20 // mutually exclusive w. SAFE & UNSAFE
  533. #define NS_STYLE_ALIGN_SAFE 0x40
  534. #define NS_STYLE_ALIGN_UNSAFE 0x80 // mutually exclusive w. SAFE
  535. #define NS_STYLE_ALIGN_FLAG_BITS 0xE0
  536. #define NS_STYLE_ALIGN_ALL_BITS 0xFF
  537. #define NS_STYLE_ALIGN_ALL_SHIFT 8
  538. #define NS_STYLE_JUSTIFY_AUTO NS_STYLE_ALIGN_AUTO
  539. #define NS_STYLE_JUSTIFY_NORMAL NS_STYLE_ALIGN_NORMAL
  540. #define NS_STYLE_JUSTIFY_START NS_STYLE_ALIGN_START
  541. #define NS_STYLE_JUSTIFY_END NS_STYLE_ALIGN_END
  542. #define NS_STYLE_JUSTIFY_FLEX_START NS_STYLE_ALIGN_FLEX_START
  543. #define NS_STYLE_JUSTIFY_FLEX_END NS_STYLE_ALIGN_FLEX_END
  544. #define NS_STYLE_JUSTIFY_CENTER NS_STYLE_ALIGN_CENTER
  545. #define NS_STYLE_JUSTIFY_LEFT NS_STYLE_ALIGN_LEFT
  546. #define NS_STYLE_JUSTIFY_RIGHT NS_STYLE_ALIGN_RIGHT
  547. #define NS_STYLE_JUSTIFY_BASELINE NS_STYLE_ALIGN_BASELINE
  548. #define NS_STYLE_JUSTIFY_LAST_BASELINE NS_STYLE_ALIGN_LAST_BASELINE
  549. #define NS_STYLE_JUSTIFY_STRETCH NS_STYLE_ALIGN_STRETCH
  550. #define NS_STYLE_JUSTIFY_SELF_START NS_STYLE_ALIGN_SELF_START
  551. #define NS_STYLE_JUSTIFY_SELF_END NS_STYLE_ALIGN_SELF_END
  552. #define NS_STYLE_JUSTIFY_SPACE_BETWEEN NS_STYLE_ALIGN_SPACE_BETWEEN
  553. #define NS_STYLE_JUSTIFY_SPACE_AROUND NS_STYLE_ALIGN_SPACE_AROUND
  554. #define NS_STYLE_JUSTIFY_SPACE_EVENLY NS_STYLE_ALIGN_SPACE_EVENLY
  555. #define NS_STYLE_JUSTIFY_LEGACY NS_STYLE_ALIGN_LEGACY
  556. #define NS_STYLE_JUSTIFY_SAFE NS_STYLE_ALIGN_SAFE
  557. #define NS_STYLE_JUSTIFY_UNSAFE NS_STYLE_ALIGN_UNSAFE
  558. #define NS_STYLE_JUSTIFY_FLAG_BITS NS_STYLE_ALIGN_FLAG_BITS
  559. #define NS_STYLE_JUSTIFY_ALL_BITS NS_STYLE_ALIGN_ALL_BITS
  560. #define NS_STYLE_JUSTIFY_ALL_SHIFT NS_STYLE_ALIGN_ALL_SHIFT
  561. // See nsStylePosition
  562. #define NS_STYLE_FLEX_DIRECTION_ROW 0
  563. #define NS_STYLE_FLEX_DIRECTION_ROW_REVERSE 1
  564. #define NS_STYLE_FLEX_DIRECTION_COLUMN 2
  565. #define NS_STYLE_FLEX_DIRECTION_COLUMN_REVERSE 3
  566. // See nsStylePosition
  567. #define NS_STYLE_FLEX_WRAP_NOWRAP 0
  568. #define NS_STYLE_FLEX_WRAP_WRAP 1
  569. #define NS_STYLE_FLEX_WRAP_WRAP_REVERSE 2
  570. // See nsStylePosition
  571. // NOTE: This is the initial value of the integer-valued 'order' property
  572. // (rather than an internal numerical representation of some keyword).
  573. #define NS_STYLE_ORDER_INITIAL 0
  574. // XXX remove in a later patch after updating flexbox code with the new names
  575. #define NS_STYLE_JUSTIFY_CONTENT_FLEX_START NS_STYLE_JUSTIFY_FLEX_START
  576. #define NS_STYLE_JUSTIFY_CONTENT_FLEX_END NS_STYLE_JUSTIFY_FLEX_END
  577. #define NS_STYLE_JUSTIFY_CONTENT_CENTER NS_STYLE_JUSTIFY_CENTER
  578. #define NS_STYLE_JUSTIFY_CONTENT_SPACE_BETWEEN NS_STYLE_JUSTIFY_SPACE_BETWEEN
  579. #define NS_STYLE_JUSTIFY_CONTENT_SPACE_AROUND NS_STYLE_JUSTIFY_SPACE_AROUND
  580. // See nsStyleFilter
  581. #define NS_STYLE_FILTER_NONE 0
  582. #define NS_STYLE_FILTER_URL 1
  583. #define NS_STYLE_FILTER_BLUR 2
  584. #define NS_STYLE_FILTER_BRIGHTNESS 3
  585. #define NS_STYLE_FILTER_CONTRAST 4
  586. #define NS_STYLE_FILTER_GRAYSCALE 5
  587. #define NS_STYLE_FILTER_INVERT 6
  588. #define NS_STYLE_FILTER_OPACITY 7
  589. #define NS_STYLE_FILTER_SATURATE 8
  590. #define NS_STYLE_FILTER_SEPIA 9
  591. #define NS_STYLE_FILTER_HUE_ROTATE 10
  592. #define NS_STYLE_FILTER_DROP_SHADOW 11
  593. // See nsStyleFont
  594. // We should eventually stop using the NS_STYLE_* variants here.
  595. #define NS_STYLE_FONT_STYLE_NORMAL NS_FONT_STYLE_NORMAL
  596. #define NS_STYLE_FONT_STYLE_ITALIC NS_FONT_STYLE_ITALIC
  597. #define NS_STYLE_FONT_STYLE_OBLIQUE NS_FONT_STYLE_OBLIQUE
  598. // See nsStyleFont
  599. // We should eventually stop using the NS_STYLE_* variants here.
  600. #define NS_STYLE_FONT_WEIGHT_NORMAL NS_FONT_WEIGHT_NORMAL
  601. #define NS_STYLE_FONT_WEIGHT_BOLD NS_FONT_WEIGHT_BOLD
  602. // The constants below appear only in style sheets and not computed style.
  603. #define NS_STYLE_FONT_WEIGHT_BOLDER (-1)
  604. #define NS_STYLE_FONT_WEIGHT_LIGHTER (-2)
  605. // See nsStyleFont
  606. #define NS_STYLE_FONT_SIZE_XXSMALL 0
  607. #define NS_STYLE_FONT_SIZE_XSMALL 1
  608. #define NS_STYLE_FONT_SIZE_SMALL 2
  609. #define NS_STYLE_FONT_SIZE_MEDIUM 3
  610. #define NS_STYLE_FONT_SIZE_LARGE 4
  611. #define NS_STYLE_FONT_SIZE_XLARGE 5
  612. #define NS_STYLE_FONT_SIZE_XXLARGE 6
  613. #define NS_STYLE_FONT_SIZE_XXXLARGE 7 // Only used by <font size="7">. Not specifiable in CSS.
  614. #define NS_STYLE_FONT_SIZE_LARGER 8
  615. #define NS_STYLE_FONT_SIZE_SMALLER 9
  616. // See nsStyleFont
  617. // We should eventually stop using the NS_STYLE_* variants here.
  618. #define NS_STYLE_FONT_STRETCH_ULTRA_CONDENSED NS_FONT_STRETCH_ULTRA_CONDENSED
  619. #define NS_STYLE_FONT_STRETCH_EXTRA_CONDENSED NS_FONT_STRETCH_EXTRA_CONDENSED
  620. #define NS_STYLE_FONT_STRETCH_CONDENSED NS_FONT_STRETCH_CONDENSED
  621. #define NS_STYLE_FONT_STRETCH_SEMI_CONDENSED NS_FONT_STRETCH_SEMI_CONDENSED
  622. #define NS_STYLE_FONT_STRETCH_NORMAL NS_FONT_STRETCH_NORMAL
  623. #define NS_STYLE_FONT_STRETCH_SEMI_EXPANDED NS_FONT_STRETCH_SEMI_EXPANDED
  624. #define NS_STYLE_FONT_STRETCH_EXPANDED NS_FONT_STRETCH_EXPANDED
  625. #define NS_STYLE_FONT_STRETCH_EXTRA_EXPANDED NS_FONT_STRETCH_EXTRA_EXPANDED
  626. #define NS_STYLE_FONT_STRETCH_ULTRA_EXPANDED NS_FONT_STRETCH_ULTRA_EXPANDED
  627. // See nsStyleFont - system fonts
  628. #define NS_STYLE_FONT_CAPTION 1 // css2
  629. #define NS_STYLE_FONT_ICON 2
  630. #define NS_STYLE_FONT_MENU 3
  631. #define NS_STYLE_FONT_MESSAGE_BOX 4
  632. #define NS_STYLE_FONT_SMALL_CAPTION 5
  633. #define NS_STYLE_FONT_STATUS_BAR 6
  634. #define NS_STYLE_FONT_WINDOW 7 // css3
  635. #define NS_STYLE_FONT_DOCUMENT 8
  636. #define NS_STYLE_FONT_WORKSPACE 9
  637. #define NS_STYLE_FONT_DESKTOP 10
  638. #define NS_STYLE_FONT_INFO 11
  639. #define NS_STYLE_FONT_DIALOG 12
  640. #define NS_STYLE_FONT_BUTTON 13
  641. #define NS_STYLE_FONT_PULL_DOWN_MENU 14
  642. #define NS_STYLE_FONT_LIST 15
  643. #define NS_STYLE_FONT_FIELD 16
  644. // grid-auto-flow keywords
  645. #define NS_STYLE_GRID_AUTO_FLOW_ROW (1 << 0)
  646. #define NS_STYLE_GRID_AUTO_FLOW_COLUMN (1 << 1)
  647. #define NS_STYLE_GRID_AUTO_FLOW_DENSE (1 << 2)
  648. // 'subgrid' keyword in grid-template-{columns,rows}
  649. #define NS_STYLE_GRID_TEMPLATE_SUBGRID 0
  650. // CSS Grid <track-breadth> keywords
  651. // Should not overlap with NS_STYLE_GRID_TEMPLATE_SUBGRID
  652. #define NS_STYLE_GRID_TRACK_BREADTH_MAX_CONTENT 1
  653. #define NS_STYLE_GRID_TRACK_BREADTH_MIN_CONTENT 2
  654. // CSS Grid keywords for <auto-repeat>
  655. #define NS_STYLE_GRID_REPEAT_AUTO_FILL 0
  656. #define NS_STYLE_GRID_REPEAT_AUTO_FIT 1
  657. // defaults per MathML spec
  658. #define NS_MATHML_DEFAULT_SCRIPT_SIZE_MULTIPLIER 0.71f
  659. #define NS_MATHML_DEFAULT_SCRIPT_MIN_SIZE_PT 8
  660. // See nsStyleFont
  661. #define NS_MATHML_MATHVARIANT_NONE 0
  662. #define NS_MATHML_MATHVARIANT_NORMAL 1
  663. #define NS_MATHML_MATHVARIANT_BOLD 2
  664. #define NS_MATHML_MATHVARIANT_ITALIC 3
  665. #define NS_MATHML_MATHVARIANT_BOLD_ITALIC 4
  666. #define NS_MATHML_MATHVARIANT_SCRIPT 5
  667. #define NS_MATHML_MATHVARIANT_BOLD_SCRIPT 6
  668. #define NS_MATHML_MATHVARIANT_FRAKTUR 7
  669. #define NS_MATHML_MATHVARIANT_DOUBLE_STRUCK 8
  670. #define NS_MATHML_MATHVARIANT_BOLD_FRAKTUR 9
  671. #define NS_MATHML_MATHVARIANT_SANS_SERIF 10
  672. #define NS_MATHML_MATHVARIANT_BOLD_SANS_SERIF 11
  673. #define NS_MATHML_MATHVARIANT_SANS_SERIF_ITALIC 12
  674. #define NS_MATHML_MATHVARIANT_SANS_SERIF_BOLD_ITALIC 13
  675. #define NS_MATHML_MATHVARIANT_MONOSPACE 14
  676. #define NS_MATHML_MATHVARIANT_INITIAL 15
  677. #define NS_MATHML_MATHVARIANT_TAILED 16
  678. #define NS_MATHML_MATHVARIANT_LOOPED 17
  679. #define NS_MATHML_MATHVARIANT_STRETCHED 18
  680. // See nsStyleFont::mMathDisplay
  681. #define NS_MATHML_DISPLAYSTYLE_INLINE 0
  682. #define NS_MATHML_DISPLAYSTYLE_BLOCK 1
  683. // See nsStylePosition::mWidth, mMinWidth, mMaxWidth
  684. #define NS_STYLE_WIDTH_MAX_CONTENT 0
  685. #define NS_STYLE_WIDTH_MIN_CONTENT 1
  686. #define NS_STYLE_WIDTH_FIT_CONTENT 2
  687. #define NS_STYLE_WIDTH_AVAILABLE 3
  688. // See nsStyleDisplay.mPosition
  689. #define NS_STYLE_POSITION_STATIC 0
  690. #define NS_STYLE_POSITION_RELATIVE 1
  691. #define NS_STYLE_POSITION_ABSOLUTE 2
  692. #define NS_STYLE_POSITION_FIXED 3
  693. #define NS_STYLE_POSITION_STICKY 4
  694. // See nsStyleEffects.mClip, mClipFlags
  695. #define NS_STYLE_CLIP_AUTO 0x00
  696. #define NS_STYLE_CLIP_RECT 0x01
  697. #define NS_STYLE_CLIP_TYPE_MASK 0x0F
  698. #define NS_STYLE_CLIP_LEFT_AUTO 0x10
  699. #define NS_STYLE_CLIP_TOP_AUTO 0x20
  700. #define NS_STYLE_CLIP_RIGHT_AUTO 0x40
  701. #define NS_STYLE_CLIP_BOTTOM_AUTO 0x80
  702. // FRAME/FRAMESET/IFRAME specific values including backward compatibility. Boolean values with
  703. // the same meaning (e.g. 1 & yes) may need to be distinguished for correct mode processing
  704. #define NS_STYLE_FRAME_YES 0
  705. #define NS_STYLE_FRAME_NO 1
  706. #define NS_STYLE_FRAME_0 2
  707. #define NS_STYLE_FRAME_1 3
  708. #define NS_STYLE_FRAME_ON 4
  709. #define NS_STYLE_FRAME_OFF 5
  710. #define NS_STYLE_FRAME_AUTO 6
  711. #define NS_STYLE_FRAME_SCROLL 7
  712. #define NS_STYLE_FRAME_NOSCROLL 8
  713. // See nsStyleDisplay.mOverflow
  714. #define NS_STYLE_OVERFLOW_VISIBLE 0
  715. #define NS_STYLE_OVERFLOW_HIDDEN 1
  716. #define NS_STYLE_OVERFLOW_SCROLL 2
  717. #define NS_STYLE_OVERFLOW_AUTO 3
  718. #define NS_STYLE_OVERFLOW_CLIP 4
  719. #define NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL 5
  720. #define NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL 6
  721. // See nsStyleDisplay.mOverflowClipBox
  722. #define NS_STYLE_OVERFLOW_CLIP_BOX_PADDING_BOX 0
  723. #define NS_STYLE_OVERFLOW_CLIP_BOX_CONTENT_BOX 1
  724. // See nsStyleList
  725. #define NS_STYLE_LIST_STYLE_CUSTOM -1 // for @counter-style
  726. #define NS_STYLE_LIST_STYLE_NONE 0
  727. #define NS_STYLE_LIST_STYLE_DISC 1
  728. #define NS_STYLE_LIST_STYLE_CIRCLE 2
  729. #define NS_STYLE_LIST_STYLE_SQUARE 3
  730. #define NS_STYLE_LIST_STYLE_DECIMAL 4
  731. #define NS_STYLE_LIST_STYLE_HEBREW 5
  732. #define NS_STYLE_LIST_STYLE_JAPANESE_INFORMAL 6
  733. #define NS_STYLE_LIST_STYLE_JAPANESE_FORMAL 7
  734. #define NS_STYLE_LIST_STYLE_KOREAN_HANGUL_FORMAL 8
  735. #define NS_STYLE_LIST_STYLE_KOREAN_HANJA_INFORMAL 9
  736. #define NS_STYLE_LIST_STYLE_KOREAN_HANJA_FORMAL 10
  737. #define NS_STYLE_LIST_STYLE_SIMP_CHINESE_INFORMAL 11
  738. #define NS_STYLE_LIST_STYLE_SIMP_CHINESE_FORMAL 12
  739. #define NS_STYLE_LIST_STYLE_TRAD_CHINESE_INFORMAL 13
  740. #define NS_STYLE_LIST_STYLE_TRAD_CHINESE_FORMAL 14
  741. #define NS_STYLE_LIST_STYLE_ETHIOPIC_NUMERIC 15
  742. #define NS_STYLE_LIST_STYLE_DISCLOSURE_CLOSED 16
  743. #define NS_STYLE_LIST_STYLE_DISCLOSURE_OPEN 17
  744. #define NS_STYLE_LIST_STYLE__MAX 18
  745. // These styles are handled as custom styles defined in counterstyles.css.
  746. // They are preserved here only for html attribute map.
  747. #define NS_STYLE_LIST_STYLE_LOWER_ROMAN 100
  748. #define NS_STYLE_LIST_STYLE_UPPER_ROMAN 101
  749. #define NS_STYLE_LIST_STYLE_LOWER_ALPHA 102
  750. #define NS_STYLE_LIST_STYLE_UPPER_ALPHA 103
  751. // See nsStyleList
  752. #define NS_STYLE_LIST_STYLE_POSITION_INSIDE 0
  753. #define NS_STYLE_LIST_STYLE_POSITION_OUTSIDE 1
  754. // See nsStyleMargin
  755. #define NS_STYLE_MARGIN_SIZE_AUTO 0
  756. // See nsStyleVisibility
  757. #define NS_STYLE_POINTER_EVENTS_NONE 0
  758. #define NS_STYLE_POINTER_EVENTS_VISIBLEPAINTED 1
  759. #define NS_STYLE_POINTER_EVENTS_VISIBLEFILL 2
  760. #define NS_STYLE_POINTER_EVENTS_VISIBLESTROKE 3
  761. #define NS_STYLE_POINTER_EVENTS_VISIBLE 4
  762. #define NS_STYLE_POINTER_EVENTS_PAINTED 5
  763. #define NS_STYLE_POINTER_EVENTS_FILL 6
  764. #define NS_STYLE_POINTER_EVENTS_STROKE 7
  765. #define NS_STYLE_POINTER_EVENTS_ALL 8
  766. #define NS_STYLE_POINTER_EVENTS_AUTO 9
  767. // See nsStyleVisibility.mImageOrientationType
  768. #define NS_STYLE_IMAGE_ORIENTATION_FLIP 0
  769. #define NS_STYLE_IMAGE_ORIENTATION_FROM_IMAGE 1
  770. // See nsStyleDisplay
  771. #define NS_STYLE_ISOLATION_AUTO 0
  772. #define NS_STYLE_ISOLATION_ISOLATE 1
  773. // See nsStylePosition.mObjectFit
  774. #define NS_STYLE_OBJECT_FIT_FILL 0
  775. #define NS_STYLE_OBJECT_FIT_CONTAIN 1
  776. #define NS_STYLE_OBJECT_FIT_COVER 2
  777. #define NS_STYLE_OBJECT_FIT_NONE 3
  778. #define NS_STYLE_OBJECT_FIT_SCALE_DOWN 4
  779. // See nsStyleDisplay
  780. #define NS_STYLE_RESIZE_NONE 0
  781. #define NS_STYLE_RESIZE_BOTH 1
  782. #define NS_STYLE_RESIZE_HORIZONTAL 2
  783. #define NS_STYLE_RESIZE_VERTICAL 3
  784. // See nsStyleText
  785. #define NS_STYLE_TEXT_ALIGN_START 0
  786. #define NS_STYLE_TEXT_ALIGN_LEFT 1
  787. #define NS_STYLE_TEXT_ALIGN_RIGHT 2
  788. #define NS_STYLE_TEXT_ALIGN_CENTER 3
  789. #define NS_STYLE_TEXT_ALIGN_JUSTIFY 4
  790. #define NS_STYLE_TEXT_ALIGN_CHAR 5 //align based on a certain character, for table cell
  791. #define NS_STYLE_TEXT_ALIGN_END 6
  792. #define NS_STYLE_TEXT_ALIGN_AUTO 7
  793. #define NS_STYLE_TEXT_ALIGN_MOZ_CENTER 8
  794. #define NS_STYLE_TEXT_ALIGN_MOZ_RIGHT 9
  795. #define NS_STYLE_TEXT_ALIGN_MOZ_LEFT 10
  796. // NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT is only used in data structs; it
  797. // is never present in stylesheets or computed data.
  798. #define NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT 11
  799. #define NS_STYLE_TEXT_ALIGN_UNSAFE 12
  800. #define NS_STYLE_TEXT_ALIGN_MATCH_PARENT 13
  801. // Note: make sure that the largest NS_STYLE_TEXT_ALIGN_* value is smaller than
  802. // the smallest NS_STYLE_VERTICAL_ALIGN_* value below!
  803. // See nsStyleText, nsStyleFont
  804. #define NS_STYLE_TEXT_DECORATION_LINE_NONE 0
  805. #define NS_STYLE_TEXT_DECORATION_LINE_UNDERLINE 0x01
  806. #define NS_STYLE_TEXT_DECORATION_LINE_OVERLINE 0x02
  807. #define NS_STYLE_TEXT_DECORATION_LINE_LINE_THROUGH 0x04
  808. #define NS_STYLE_TEXT_DECORATION_LINE_BLINK 0x08
  809. #define NS_STYLE_TEXT_DECORATION_LINE_PREF_ANCHORS 0x10
  810. // OVERRIDE_ALL does not occur in stylesheets; it only comes from HTML
  811. // attribute mapping (and thus appears in computed data)
  812. #define NS_STYLE_TEXT_DECORATION_LINE_OVERRIDE_ALL 0x20
  813. #define NS_STYLE_TEXT_DECORATION_LINE_LINES_MASK (NS_STYLE_TEXT_DECORATION_LINE_UNDERLINE | NS_STYLE_TEXT_DECORATION_LINE_OVERLINE | NS_STYLE_TEXT_DECORATION_LINE_LINE_THROUGH)
  814. // See nsStyleText
  815. #define NS_STYLE_TEXT_DECORATION_STYLE_NONE 0 // not in CSS spec, mapped to -moz-none
  816. #define NS_STYLE_TEXT_DECORATION_STYLE_DOTTED 1
  817. #define NS_STYLE_TEXT_DECORATION_STYLE_DASHED 2
  818. #define NS_STYLE_TEXT_DECORATION_STYLE_SOLID 3
  819. #define NS_STYLE_TEXT_DECORATION_STYLE_DOUBLE 4
  820. #define NS_STYLE_TEXT_DECORATION_STYLE_WAVY 5
  821. #define NS_STYLE_TEXT_DECORATION_STYLE_MAX NS_STYLE_TEXT_DECORATION_STYLE_WAVY
  822. // See nsStyleTextOverflow
  823. #define NS_STYLE_TEXT_OVERFLOW_CLIP 0
  824. #define NS_STYLE_TEXT_OVERFLOW_ELLIPSIS 1
  825. #define NS_STYLE_TEXT_OVERFLOW_STRING 2
  826. // See nsStyleText
  827. #define NS_STYLE_TEXT_TRANSFORM_NONE 0
  828. #define NS_STYLE_TEXT_TRANSFORM_CAPITALIZE 1
  829. #define NS_STYLE_TEXT_TRANSFORM_LOWERCASE 2
  830. #define NS_STYLE_TEXT_TRANSFORM_UPPERCASE 3
  831. #define NS_STYLE_TEXT_TRANSFORM_FULL_WIDTH 4
  832. // See nsStyleDisplay
  833. #define NS_STYLE_TOUCH_ACTION_NONE (1 << 0)
  834. #define NS_STYLE_TOUCH_ACTION_AUTO (1 << 1)
  835. #define NS_STYLE_TOUCH_ACTION_PAN_X (1 << 2)
  836. #define NS_STYLE_TOUCH_ACTION_PAN_Y (1 << 3)
  837. #define NS_STYLE_TOUCH_ACTION_MANIPULATION (1 << 4)
  838. // See nsStyleDisplay
  839. #define NS_STYLE_TOP_LAYER_NONE 0 // not in the top layer
  840. #define NS_STYLE_TOP_LAYER_TOP 1 // in the top layer
  841. // See nsStyleDisplay
  842. #define NS_STYLE_TRANSFORM_BOX_BORDER_BOX 0
  843. #define NS_STYLE_TRANSFORM_BOX_FILL_BOX 1
  844. #define NS_STYLE_TRANSFORM_BOX_VIEW_BOX 2
  845. // See nsStyleDisplay
  846. #define NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE 0
  847. #define NS_STYLE_TRANSITION_TIMING_FUNCTION_LINEAR 1
  848. #define NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_IN 2
  849. #define NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_OUT 3
  850. #define NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_IN_OUT 4
  851. #define NS_STYLE_TRANSITION_TIMING_FUNCTION_STEP_START 5
  852. #define NS_STYLE_TRANSITION_TIMING_FUNCTION_STEP_END 6
  853. // See nsStyleText
  854. // Note: these values pickup after the text-align values because there
  855. // are a few html cases where an object can have both types of
  856. // alignment applied with a single attribute
  857. #define NS_STYLE_VERTICAL_ALIGN_BASELINE 14
  858. #define NS_STYLE_VERTICAL_ALIGN_SUB 15
  859. #define NS_STYLE_VERTICAL_ALIGN_SUPER 16
  860. #define NS_STYLE_VERTICAL_ALIGN_TOP 17
  861. #define NS_STYLE_VERTICAL_ALIGN_TEXT_TOP 18
  862. #define NS_STYLE_VERTICAL_ALIGN_MIDDLE 19
  863. #define NS_STYLE_VERTICAL_ALIGN_TEXT_BOTTOM 20
  864. #define NS_STYLE_VERTICAL_ALIGN_BOTTOM 21
  865. #define NS_STYLE_VERTICAL_ALIGN_MIDDLE_WITH_BASELINE 22
  866. // See nsStyleVisibility
  867. #define NS_STYLE_VISIBILITY_HIDDEN 0
  868. #define NS_STYLE_VISIBILITY_VISIBLE 1
  869. #define NS_STYLE_VISIBILITY_COLLAPSE 2
  870. // See nsStyleText
  871. #define NS_STYLE_TABSIZE_INITIAL 8
  872. // See nsStyleText
  873. #define NS_STYLE_WHITESPACE_NORMAL 0
  874. #define NS_STYLE_WHITESPACE_PRE 1
  875. #define NS_STYLE_WHITESPACE_NOWRAP 2
  876. #define NS_STYLE_WHITESPACE_PRE_WRAP 3
  877. #define NS_STYLE_WHITESPACE_PRE_LINE 4
  878. #define NS_STYLE_WHITESPACE_PRE_SPACE 5
  879. // See nsStyleText
  880. #define NS_STYLE_WORDBREAK_NORMAL 0
  881. #define NS_STYLE_WORDBREAK_BREAK_ALL 1
  882. #define NS_STYLE_WORDBREAK_KEEP_ALL 2
  883. // See nsStyleText
  884. #define NS_STYLE_OVERFLOWWRAP_NORMAL 0
  885. #define NS_STYLE_OVERFLOWWRAP_BREAK_WORD 1
  886. #define NS_STYLE_OVERFLOWWRAP_ANYWHERE 2
  887. // See nsStyleText
  888. #define NS_STYLE_HYPHENS_NONE 0
  889. #define NS_STYLE_HYPHENS_MANUAL 1
  890. #define NS_STYLE_HYPHENS_AUTO 2
  891. // ruby-align, see nsStyleText
  892. #define NS_STYLE_RUBY_ALIGN_START 0
  893. #define NS_STYLE_RUBY_ALIGN_CENTER 1
  894. #define NS_STYLE_RUBY_ALIGN_SPACE_BETWEEN 2
  895. #define NS_STYLE_RUBY_ALIGN_SPACE_AROUND 3
  896. // ruby-position, see nsStyleText
  897. #define NS_STYLE_RUBY_POSITION_OVER 0
  898. #define NS_STYLE_RUBY_POSITION_UNDER 1
  899. #define NS_STYLE_RUBY_POSITION_INTER_CHARACTER 2 /* placeholder, not yet parsed */
  900. // See nsStyleText
  901. #define NS_STYLE_TEXT_SIZE_ADJUST_NONE 0
  902. #define NS_STYLE_TEXT_SIZE_ADJUST_AUTO 1
  903. // See nsStyleText
  904. #define NS_STYLE_TEXT_ORIENTATION_MIXED 0
  905. #define NS_STYLE_TEXT_ORIENTATION_UPRIGHT 1
  906. #define NS_STYLE_TEXT_ORIENTATION_SIDEWAYS 2
  907. // See nsStyleText
  908. #define NS_STYLE_TEXT_COMBINE_UPRIGHT_NONE 0
  909. #define NS_STYLE_TEXT_COMBINE_UPRIGHT_ALL 1
  910. #define NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_2 2
  911. #define NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_3 3
  912. #define NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_4 4
  913. // See nsStyleText
  914. #define NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT 0
  915. // See nsStyleText
  916. #define NS_STYLE_UNICODE_BIDI_NORMAL 0x0
  917. #define NS_STYLE_UNICODE_BIDI_EMBED 0x1
  918. #define NS_STYLE_UNICODE_BIDI_ISOLATE 0x2
  919. #define NS_STYLE_UNICODE_BIDI_BIDI_OVERRIDE 0x4
  920. #define NS_STYLE_UNICODE_BIDI_ISOLATE_OVERRIDE 0x6
  921. #define NS_STYLE_UNICODE_BIDI_PLAINTEXT 0x8
  922. #define NS_STYLE_TABLE_LAYOUT_AUTO 0
  923. #define NS_STYLE_TABLE_LAYOUT_FIXED 1
  924. #define NS_STYLE_TABLE_EMPTY_CELLS_HIDE 0
  925. #define NS_STYLE_TABLE_EMPTY_CELLS_SHOW 1
  926. // Constants for the caption-side property. Note that despite having "physical"
  927. // names, these are actually interpreted according to the table's writing-mode:
  928. // TOP and BOTTOM are treated as block-start and -end respectively, and LEFT
  929. // and RIGHT are treated as line-left and -right.
  930. #define NS_STYLE_CAPTION_SIDE_TOP 0
  931. #define NS_STYLE_CAPTION_SIDE_RIGHT 1
  932. #define NS_STYLE_CAPTION_SIDE_BOTTOM 2
  933. #define NS_STYLE_CAPTION_SIDE_LEFT 3
  934. #define NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE 4
  935. #define NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE 5
  936. // constants for cell "scope" attribute
  937. #define NS_STYLE_CELL_SCOPE_ROW 0
  938. #define NS_STYLE_CELL_SCOPE_COL 1
  939. #define NS_STYLE_CELL_SCOPE_ROWGROUP 2
  940. #define NS_STYLE_CELL_SCOPE_COLGROUP 3
  941. // See nsStylePage
  942. #define NS_STYLE_PAGE_MARKS_NONE 0x00
  943. #define NS_STYLE_PAGE_MARKS_CROP 0x01
  944. #define NS_STYLE_PAGE_MARKS_REGISTER 0x02
  945. // See nsStylePage
  946. #define NS_STYLE_PAGE_SIZE_AUTO 0
  947. #define NS_STYLE_PAGE_SIZE_PORTRAIT 1
  948. #define NS_STYLE_PAGE_SIZE_LANDSCAPE 2
  949. // See nsStyleBreaks
  950. #define NS_STYLE_PAGE_BREAK_AUTO 0
  951. #define NS_STYLE_PAGE_BREAK_ALWAYS 1
  952. #define NS_STYLE_PAGE_BREAK_AVOID 2
  953. #define NS_STYLE_PAGE_BREAK_LEFT 3
  954. #define NS_STYLE_PAGE_BREAK_RIGHT 4
  955. // See nsStyleColumn
  956. #define NS_STYLE_COLUMN_COUNT_AUTO 0
  957. #define NS_STYLE_COLUMN_COUNT_UNLIMITED (-1)
  958. #define NS_STYLE_COLUMN_FILL_AUTO 0
  959. #define NS_STYLE_COLUMN_FILL_BALANCE 1
  960. // See nsStyleUIReset
  961. #define NS_STYLE_IME_MODE_AUTO 0
  962. #define NS_STYLE_IME_MODE_NORMAL 1
  963. #define NS_STYLE_IME_MODE_ACTIVE 2
  964. #define NS_STYLE_IME_MODE_DISABLED 3
  965. #define NS_STYLE_IME_MODE_INACTIVE 4
  966. // See nsStyleGradient
  967. #define NS_STYLE_GRADIENT_SHAPE_LINEAR 0
  968. #define NS_STYLE_GRADIENT_SHAPE_ELLIPTICAL 1
  969. #define NS_STYLE_GRADIENT_SHAPE_CIRCULAR 2
  970. #define NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE 0
  971. #define NS_STYLE_GRADIENT_SIZE_CLOSEST_CORNER 1
  972. #define NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE 2
  973. #define NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER 3
  974. #define NS_STYLE_GRADIENT_SIZE_EXPLICIT_SIZE 4
  975. // See nsStyleSVG
  976. // dominant-baseline
  977. #define NS_STYLE_DOMINANT_BASELINE_AUTO 0
  978. #define NS_STYLE_DOMINANT_BASELINE_USE_SCRIPT 1
  979. #define NS_STYLE_DOMINANT_BASELINE_NO_CHANGE 2
  980. #define NS_STYLE_DOMINANT_BASELINE_RESET_SIZE 3
  981. #define NS_STYLE_DOMINANT_BASELINE_IDEOGRAPHIC 4
  982. #define NS_STYLE_DOMINANT_BASELINE_ALPHABETIC 5
  983. #define NS_STYLE_DOMINANT_BASELINE_HANGING 6
  984. #define NS_STYLE_DOMINANT_BASELINE_MATHEMATICAL 7
  985. #define NS_STYLE_DOMINANT_BASELINE_CENTRAL 8
  986. #define NS_STYLE_DOMINANT_BASELINE_MIDDLE 9
  987. #define NS_STYLE_DOMINANT_BASELINE_TEXT_AFTER_EDGE 10
  988. #define NS_STYLE_DOMINANT_BASELINE_TEXT_BEFORE_EDGE 11
  989. // image-rendering
  990. #define NS_STYLE_IMAGE_RENDERING_AUTO 0
  991. #define NS_STYLE_IMAGE_RENDERING_OPTIMIZESPEED 1
  992. #define NS_STYLE_IMAGE_RENDERING_OPTIMIZEQUALITY 2
  993. #define NS_STYLE_IMAGE_RENDERING_CRISPEDGES 3
  994. // mask-type
  995. #define NS_STYLE_MASK_TYPE_LUMINANCE 0
  996. #define NS_STYLE_MASK_TYPE_ALPHA 1
  997. // paint-order
  998. #define NS_STYLE_PAINT_ORDER_NORMAL 0
  999. #define NS_STYLE_PAINT_ORDER_FILL 1
  1000. #define NS_STYLE_PAINT_ORDER_STROKE 2
  1001. #define NS_STYLE_PAINT_ORDER_MARKERS 3
  1002. #define NS_STYLE_PAINT_ORDER_LAST_VALUE NS_STYLE_PAINT_ORDER_MARKERS
  1003. // NS_STYLE_PAINT_ORDER_BITWIDTH is the number of bits required to store
  1004. // a single paint-order component value.
  1005. #define NS_STYLE_PAINT_ORDER_BITWIDTH 2
  1006. // shape-rendering
  1007. #define NS_STYLE_SHAPE_RENDERING_AUTO 0
  1008. #define NS_STYLE_SHAPE_RENDERING_OPTIMIZESPEED 1
  1009. #define NS_STYLE_SHAPE_RENDERING_CRISPEDGES 2
  1010. #define NS_STYLE_SHAPE_RENDERING_GEOMETRICPRECISION 3
  1011. // stroke-linecap
  1012. #define NS_STYLE_STROKE_LINECAP_BUTT 0
  1013. #define NS_STYLE_STROKE_LINECAP_ROUND 1
  1014. #define NS_STYLE_STROKE_LINECAP_SQUARE 2
  1015. // stroke-linejoin
  1016. #define NS_STYLE_STROKE_LINEJOIN_MITER 0
  1017. #define NS_STYLE_STROKE_LINEJOIN_ROUND 1
  1018. #define NS_STYLE_STROKE_LINEJOIN_BEVEL 2
  1019. // stroke-dasharray, stroke-dashoffset, stroke-width
  1020. #define NS_STYLE_STROKE_PROP_CONTEXT_VALUE 0
  1021. // text-anchor
  1022. #define NS_STYLE_TEXT_ANCHOR_START 0
  1023. #define NS_STYLE_TEXT_ANCHOR_MIDDLE 1
  1024. #define NS_STYLE_TEXT_ANCHOR_END 2
  1025. // text-emphasis-position
  1026. #define NS_STYLE_TEXT_EMPHASIS_POSITION_OVER (1 << 0)
  1027. #define NS_STYLE_TEXT_EMPHASIS_POSITION_UNDER (1 << 1)
  1028. #define NS_STYLE_TEXT_EMPHASIS_POSITION_LEFT (1 << 2)
  1029. #define NS_STYLE_TEXT_EMPHASIS_POSITION_RIGHT (1 << 3)
  1030. #define NS_STYLE_TEXT_EMPHASIS_POSITION_DEFAULT \
  1031. (NS_STYLE_TEXT_EMPHASIS_POSITION_OVER | \
  1032. NS_STYLE_TEXT_EMPHASIS_POSITION_RIGHT)
  1033. #define NS_STYLE_TEXT_EMPHASIS_POSITION_DEFAULT_ZH \
  1034. (NS_STYLE_TEXT_EMPHASIS_POSITION_UNDER | \
  1035. NS_STYLE_TEXT_EMPHASIS_POSITION_RIGHT)
  1036. // text-emphasis-style
  1037. // Note that filled and none here both have zero as their value. This is
  1038. // not an problem because:
  1039. // * In specified style, none is represented as eCSSUnit_None.
  1040. // * In computed style, 'filled' always has its shape computed, and thus
  1041. // the combined value is never zero.
  1042. #define NS_STYLE_TEXT_EMPHASIS_STYLE_NONE 0
  1043. #define NS_STYLE_TEXT_EMPHASIS_STYLE_FILL_MASK (1 << 3)
  1044. #define NS_STYLE_TEXT_EMPHASIS_STYLE_FILLED (0 << 3)
  1045. #define NS_STYLE_TEXT_EMPHASIS_STYLE_OPEN (1 << 3)
  1046. #define NS_STYLE_TEXT_EMPHASIS_STYLE_SHAPE_MASK 7
  1047. #define NS_STYLE_TEXT_EMPHASIS_STYLE_DOT 1
  1048. #define NS_STYLE_TEXT_EMPHASIS_STYLE_CIRCLE 2
  1049. #define NS_STYLE_TEXT_EMPHASIS_STYLE_DOUBLE_CIRCLE 3
  1050. #define NS_STYLE_TEXT_EMPHASIS_STYLE_TRIANGLE 4
  1051. #define NS_STYLE_TEXT_EMPHASIS_STYLE_SESAME 5
  1052. #define NS_STYLE_TEXT_EMPHASIS_STYLE_STRING 255
  1053. // text-rendering
  1054. #define NS_STYLE_TEXT_RENDERING_AUTO 0
  1055. #define NS_STYLE_TEXT_RENDERING_OPTIMIZESPEED 1
  1056. #define NS_STYLE_TEXT_RENDERING_OPTIMIZELEGIBILITY 2
  1057. #define NS_STYLE_TEXT_RENDERING_GEOMETRICPRECISION 3
  1058. // adjust-color
  1059. #define NS_STYLE_COLOR_ADJUST_ECONOMY 0
  1060. #define NS_STYLE_COLOR_ADJUST_EXACT 1
  1061. // color-interpolation and color-interpolation-filters
  1062. #define NS_STYLE_COLOR_INTERPOLATION_AUTO 0
  1063. #define NS_STYLE_COLOR_INTERPOLATION_SRGB 1
  1064. #define NS_STYLE_COLOR_INTERPOLATION_LINEARRGB 2
  1065. // vector-effect
  1066. #define NS_STYLE_VECTOR_EFFECT_NONE 0
  1067. #define NS_STYLE_VECTOR_EFFECT_NON_SCALING_STROKE 1
  1068. // 3d Transforms - Backface visibility
  1069. #define NS_STYLE_BACKFACE_VISIBILITY_VISIBLE 1
  1070. #define NS_STYLE_BACKFACE_VISIBILITY_HIDDEN 0
  1071. #define NS_STYLE_TRANSFORM_STYLE_FLAT 0
  1072. #define NS_STYLE_TRANSFORM_STYLE_PRESERVE_3D 1
  1073. // object {fill,stroke}-opacity inherited from context for SVG glyphs
  1074. #define NS_STYLE_CONTEXT_FILL_OPACITY 0
  1075. #define NS_STYLE_CONTEXT_STROKE_OPACITY 1
  1076. // blending
  1077. #define NS_STYLE_BLEND_NORMAL 0
  1078. #define NS_STYLE_BLEND_MULTIPLY 1
  1079. #define NS_STYLE_BLEND_SCREEN 2
  1080. #define NS_STYLE_BLEND_OVERLAY 3
  1081. #define NS_STYLE_BLEND_DARKEN 4
  1082. #define NS_STYLE_BLEND_LIGHTEN 5
  1083. #define NS_STYLE_BLEND_COLOR_DODGE 6
  1084. #define NS_STYLE_BLEND_COLOR_BURN 7
  1085. #define NS_STYLE_BLEND_HARD_LIGHT 8
  1086. #define NS_STYLE_BLEND_SOFT_LIGHT 9
  1087. #define NS_STYLE_BLEND_DIFFERENCE 10
  1088. #define NS_STYLE_BLEND_EXCLUSION 11
  1089. #define NS_STYLE_BLEND_HUE 12
  1090. #define NS_STYLE_BLEND_SATURATION 13
  1091. #define NS_STYLE_BLEND_COLOR 14
  1092. #define NS_STYLE_BLEND_LUMINOSITY 15
  1093. // composite
  1094. #define NS_STYLE_MASK_COMPOSITE_ADD 0
  1095. #define NS_STYLE_MASK_COMPOSITE_SUBTRACT 1
  1096. #define NS_STYLE_MASK_COMPOSITE_INTERSECT 2
  1097. #define NS_STYLE_MASK_COMPOSITE_EXCLUDE 3
  1098. // See nsStyleText::mControlCharacterVisibility
  1099. #define NS_STYLE_CONTROL_CHARACTER_VISIBILITY_HIDDEN 0
  1100. #define NS_STYLE_CONTROL_CHARACTER_VISIBILITY_VISIBLE 1
  1101. // counter system
  1102. #define NS_STYLE_COUNTER_SYSTEM_CYCLIC 0
  1103. #define NS_STYLE_COUNTER_SYSTEM_NUMERIC 1
  1104. #define NS_STYLE_COUNTER_SYSTEM_ALPHABETIC 2
  1105. #define NS_STYLE_COUNTER_SYSTEM_SYMBOLIC 3
  1106. #define NS_STYLE_COUNTER_SYSTEM_ADDITIVE 4
  1107. #define NS_STYLE_COUNTER_SYSTEM_FIXED 5
  1108. #define NS_STYLE_COUNTER_SYSTEM_EXTENDS 6
  1109. #define NS_STYLE_COUNTER_RANGE_INFINITE 0
  1110. #define NS_STYLE_COUNTER_SPEAKAS_BULLETS 0
  1111. #define NS_STYLE_COUNTER_SPEAKAS_NUMBERS 1
  1112. #define NS_STYLE_COUNTER_SPEAKAS_WORDS 2
  1113. #define NS_STYLE_COUNTER_SPEAKAS_SPELL_OUT 3
  1114. #define NS_STYLE_COUNTER_SPEAKAS_OTHER 255 // refer to another style
  1115. // See nsStyleDisplay::mScrollBehavior
  1116. #define NS_STYLE_SCROLL_BEHAVIOR_AUTO 0
  1117. #define NS_STYLE_SCROLL_BEHAVIOR_SMOOTH 1
  1118. // See nsStyleDisplay::mScrollSnapType{X,Y}
  1119. #define NS_STYLE_SCROLL_SNAP_TYPE_NONE 0
  1120. #define NS_STYLE_SCROLL_SNAP_TYPE_MANDATORY 1
  1121. #define NS_STYLE_SCROLL_SNAP_TYPE_PROXIMITY 2
  1122. /*****************************************************************************
  1123. * Constants for media features. *
  1124. *****************************************************************************/
  1125. // orientation
  1126. #define NS_STYLE_ORIENTATION_PORTRAIT 0
  1127. #define NS_STYLE_ORIENTATION_LANDSCAPE 1
  1128. // scan
  1129. #define NS_STYLE_SCAN_PROGRESSIVE 0
  1130. #define NS_STYLE_SCAN_INTERLACE 1
  1131. // display-mode
  1132. #define NS_STYLE_DISPLAY_MODE_BROWSER 0
  1133. #define NS_STYLE_DISPLAY_MODE_MINIMAL_UI 1
  1134. #define NS_STYLE_DISPLAY_MODE_STANDALONE 2
  1135. #define NS_STYLE_DISPLAY_MODE_FULLSCREEN 3
  1136. // prefers-color-scheme
  1137. #define NS_STYLE_PREFERS_COLOR_SCHEME_LIGHT 0
  1138. #define NS_STYLE_PREFERS_COLOR_SCHEME_DARK 1
  1139. } // namespace mozilla
  1140. #endif /* nsStyleConsts_h___ */