CSSProperty.cpp 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. /**
  2. * (C) 1999-2003 Lars Knoll (knoll@kde.org)
  3. * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc.
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Library General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Library General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Library General Public License
  16. * along with this library; see the file COPYING.LIB. If not, write to
  17. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  18. * Boston, MA 02110-1301, USA.
  19. */
  20. #include "config.h"
  21. #include "CSSProperty.h"
  22. #include "CSSValueList.h"
  23. #include "RenderStyleConstants.h"
  24. #include "StylePropertyShorthand.h"
  25. #if ENABLE(CSS_VARIABLES)
  26. #include "CSSVariableValue.h"
  27. #endif
  28. #include <wtf/text/StringBuilder.h>
  29. namespace WebCore {
  30. struct SameSizeAsCSSProperty {
  31. uint32_t bitfields;
  32. void* value;
  33. };
  34. COMPILE_ASSERT(sizeof(CSSProperty) == sizeof(SameSizeAsCSSProperty), CSSProperty_should_stay_small);
  35. void CSSProperty::wrapValueInCommaSeparatedList()
  36. {
  37. RefPtr<CSSValue> value = m_value.release();
  38. m_value = CSSValueList::createCommaSeparated();
  39. static_cast<CSSValueList*>(m_value.get())->append(value.release());
  40. }
  41. enum LogicalBoxSide { BeforeSide, EndSide, AfterSide, StartSide };
  42. enum PhysicalBoxSide { TopSide, RightSide, BottomSide, LeftSide };
  43. static CSSPropertyID resolveToPhysicalProperty(TextDirection direction, WritingMode writingMode, LogicalBoxSide logicalSide, const StylePropertyShorthand& shorthand)
  44. {
  45. if (direction == LTR) {
  46. if (writingMode == TopToBottomWritingMode) {
  47. // The common case. The logical and physical box sides match.
  48. // Left = Start, Right = End, Before = Top, After = Bottom
  49. return shorthand.properties()[logicalSide];
  50. }
  51. if (writingMode == BottomToTopWritingMode) {
  52. // Start = Left, End = Right, Before = Bottom, After = Top.
  53. switch (logicalSide) {
  54. case StartSide:
  55. return shorthand.properties()[LeftSide];
  56. case EndSide:
  57. return shorthand.properties()[RightSide];
  58. case BeforeSide:
  59. return shorthand.properties()[BottomSide];
  60. default:
  61. return shorthand.properties()[TopSide];
  62. }
  63. }
  64. if (writingMode == LeftToRightWritingMode) {
  65. // Start = Top, End = Bottom, Before = Left, After = Right.
  66. switch (logicalSide) {
  67. case StartSide:
  68. return shorthand.properties()[TopSide];
  69. case EndSide:
  70. return shorthand.properties()[BottomSide];
  71. case BeforeSide:
  72. return shorthand.properties()[LeftSide];
  73. default:
  74. return shorthand.properties()[RightSide];
  75. }
  76. }
  77. // Start = Top, End = Bottom, Before = Right, After = Left
  78. switch (logicalSide) {
  79. case StartSide:
  80. return shorthand.properties()[TopSide];
  81. case EndSide:
  82. return shorthand.properties()[BottomSide];
  83. case BeforeSide:
  84. return shorthand.properties()[RightSide];
  85. default:
  86. return shorthand.properties()[LeftSide];
  87. }
  88. }
  89. if (writingMode == TopToBottomWritingMode) {
  90. // Start = Right, End = Left, Before = Top, After = Bottom
  91. switch (logicalSide) {
  92. case StartSide:
  93. return shorthand.properties()[RightSide];
  94. case EndSide:
  95. return shorthand.properties()[LeftSide];
  96. case BeforeSide:
  97. return shorthand.properties()[TopSide];
  98. default:
  99. return shorthand.properties()[BottomSide];
  100. }
  101. }
  102. if (writingMode == BottomToTopWritingMode) {
  103. // Start = Right, End = Left, Before = Bottom, After = Top
  104. switch (logicalSide) {
  105. case StartSide:
  106. return shorthand.properties()[RightSide];
  107. case EndSide:
  108. return shorthand.properties()[LeftSide];
  109. case BeforeSide:
  110. return shorthand.properties()[BottomSide];
  111. default:
  112. return shorthand.properties()[TopSide];
  113. }
  114. }
  115. if (writingMode == LeftToRightWritingMode) {
  116. // Start = Bottom, End = Top, Before = Left, After = Right
  117. switch (logicalSide) {
  118. case StartSide:
  119. return shorthand.properties()[BottomSide];
  120. case EndSide:
  121. return shorthand.properties()[TopSide];
  122. case BeforeSide:
  123. return shorthand.properties()[LeftSide];
  124. default:
  125. return shorthand.properties()[RightSide];
  126. }
  127. }
  128. // Start = Bottom, End = Top, Before = Right, After = Left
  129. switch (logicalSide) {
  130. case StartSide:
  131. return shorthand.properties()[BottomSide];
  132. case EndSide:
  133. return shorthand.properties()[TopSide];
  134. case BeforeSide:
  135. return shorthand.properties()[RightSide];
  136. default:
  137. return shorthand.properties()[LeftSide];
  138. }
  139. }
  140. enum LogicalExtent { LogicalWidth, LogicalHeight };
  141. static CSSPropertyID resolveToPhysicalProperty(WritingMode writingMode, LogicalExtent logicalSide, const CSSPropertyID* properties)
  142. {
  143. if (writingMode == TopToBottomWritingMode || writingMode == BottomToTopWritingMode)
  144. return properties[logicalSide];
  145. return logicalSide == LogicalWidth ? properties[1] : properties[0];
  146. }
  147. static const StylePropertyShorthand& borderDirections()
  148. {
  149. static const CSSPropertyID properties[4] = { CSSPropertyBorderTop, CSSPropertyBorderRight, CSSPropertyBorderBottom, CSSPropertyBorderLeft };
  150. DEFINE_STATIC_LOCAL(StylePropertyShorthand, borderDirections, (properties, WTF_ARRAY_LENGTH(properties)));
  151. return borderDirections;
  152. }
  153. CSSPropertyID CSSProperty::resolveDirectionAwareProperty(CSSPropertyID propertyID, TextDirection direction, WritingMode writingMode)
  154. {
  155. switch (propertyID) {
  156. case CSSPropertyWebkitMarginEnd:
  157. return resolveToPhysicalProperty(direction, writingMode, EndSide, marginShorthand());
  158. case CSSPropertyWebkitMarginStart:
  159. return resolveToPhysicalProperty(direction, writingMode, StartSide, marginShorthand());
  160. case CSSPropertyWebkitMarginBefore:
  161. return resolveToPhysicalProperty(direction, writingMode, BeforeSide, marginShorthand());
  162. case CSSPropertyWebkitMarginAfter:
  163. return resolveToPhysicalProperty(direction, writingMode, AfterSide, marginShorthand());
  164. case CSSPropertyWebkitPaddingEnd:
  165. return resolveToPhysicalProperty(direction, writingMode, EndSide, paddingShorthand());
  166. case CSSPropertyWebkitPaddingStart:
  167. return resolveToPhysicalProperty(direction, writingMode, StartSide, paddingShorthand());
  168. case CSSPropertyWebkitPaddingBefore:
  169. return resolveToPhysicalProperty(direction, writingMode, BeforeSide, paddingShorthand());
  170. case CSSPropertyWebkitPaddingAfter:
  171. return resolveToPhysicalProperty(direction, writingMode, AfterSide, paddingShorthand());
  172. case CSSPropertyWebkitBorderEnd:
  173. return resolveToPhysicalProperty(direction, writingMode, EndSide, borderDirections());
  174. case CSSPropertyWebkitBorderStart:
  175. return resolveToPhysicalProperty(direction, writingMode, StartSide, borderDirections());
  176. case CSSPropertyWebkitBorderBefore:
  177. return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderDirections());
  178. case CSSPropertyWebkitBorderAfter:
  179. return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderDirections());
  180. case CSSPropertyWebkitBorderEndColor:
  181. return resolveToPhysicalProperty(direction, writingMode, EndSide, borderColorShorthand());
  182. case CSSPropertyWebkitBorderStartColor:
  183. return resolveToPhysicalProperty(direction, writingMode, StartSide, borderColorShorthand());
  184. case CSSPropertyWebkitBorderBeforeColor:
  185. return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderColorShorthand());
  186. case CSSPropertyWebkitBorderAfterColor:
  187. return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderColorShorthand());
  188. case CSSPropertyWebkitBorderEndStyle:
  189. return resolveToPhysicalProperty(direction, writingMode, EndSide, borderStyleShorthand());
  190. case CSSPropertyWebkitBorderStartStyle:
  191. return resolveToPhysicalProperty(direction, writingMode, StartSide, borderStyleShorthand());
  192. case CSSPropertyWebkitBorderBeforeStyle:
  193. return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderStyleShorthand());
  194. case CSSPropertyWebkitBorderAfterStyle:
  195. return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderStyleShorthand());
  196. case CSSPropertyWebkitBorderEndWidth:
  197. return resolveToPhysicalProperty(direction, writingMode, EndSide, borderWidthShorthand());
  198. case CSSPropertyWebkitBorderStartWidth:
  199. return resolveToPhysicalProperty(direction, writingMode, StartSide, borderWidthShorthand());
  200. case CSSPropertyWebkitBorderBeforeWidth:
  201. return resolveToPhysicalProperty(direction, writingMode, BeforeSide, borderWidthShorthand());
  202. case CSSPropertyWebkitBorderAfterWidth:
  203. return resolveToPhysicalProperty(direction, writingMode, AfterSide, borderWidthShorthand());
  204. case CSSPropertyWebkitLogicalWidth: {
  205. const CSSPropertyID properties[2] = { CSSPropertyWidth, CSSPropertyHeight };
  206. return resolveToPhysicalProperty(writingMode, LogicalWidth, properties);
  207. }
  208. case CSSPropertyWebkitLogicalHeight: {
  209. const CSSPropertyID properties[2] = { CSSPropertyWidth, CSSPropertyHeight };
  210. return resolveToPhysicalProperty(writingMode, LogicalHeight, properties);
  211. }
  212. case CSSPropertyWebkitMinLogicalWidth: {
  213. const CSSPropertyID properties[2] = { CSSPropertyMinWidth, CSSPropertyMinHeight };
  214. return resolveToPhysicalProperty(writingMode, LogicalWidth, properties);
  215. }
  216. case CSSPropertyWebkitMinLogicalHeight: {
  217. const CSSPropertyID properties[2] = { CSSPropertyMinWidth, CSSPropertyMinHeight };
  218. return resolveToPhysicalProperty(writingMode, LogicalHeight, properties);
  219. }
  220. case CSSPropertyWebkitMaxLogicalWidth: {
  221. const CSSPropertyID properties[2] = { CSSPropertyMaxWidth, CSSPropertyMaxHeight };
  222. return resolveToPhysicalProperty(writingMode, LogicalWidth, properties);
  223. }
  224. case CSSPropertyWebkitMaxLogicalHeight: {
  225. const CSSPropertyID properties[2] = { CSSPropertyMaxWidth, CSSPropertyMaxHeight };
  226. return resolveToPhysicalProperty(writingMode, LogicalHeight, properties);
  227. }
  228. default:
  229. return propertyID;
  230. }
  231. }
  232. bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID)
  233. {
  234. switch (propertyID) {
  235. case CSSPropertyBorderCollapse:
  236. case CSSPropertyBorderSpacing:
  237. case CSSPropertyCaptionSide:
  238. case CSSPropertyColor:
  239. case CSSPropertyCursor:
  240. case CSSPropertyDirection:
  241. case CSSPropertyEmptyCells:
  242. case CSSPropertyFont:
  243. case CSSPropertyFontFamily:
  244. case CSSPropertyFontSize:
  245. case CSSPropertyFontStyle:
  246. case CSSPropertyFontVariant:
  247. case CSSPropertyFontWeight:
  248. #if ENABLE(CSS_IMAGE_ORIENTATION)
  249. case CSSPropertyImageOrientation:
  250. #endif
  251. case CSSPropertyImageRendering:
  252. #if ENABLE(CSS_IMAGE_RESOLUTION)
  253. case CSSPropertyImageResolution:
  254. #endif
  255. case CSSPropertyLetterSpacing:
  256. case CSSPropertyLineHeight:
  257. case CSSPropertyListStyle:
  258. case CSSPropertyListStyleImage:
  259. case CSSPropertyListStyleType:
  260. case CSSPropertyListStylePosition:
  261. case CSSPropertyOrphans:
  262. case CSSPropertyPointerEvents:
  263. case CSSPropertyQuotes:
  264. case CSSPropertyResize:
  265. case CSSPropertySpeak:
  266. case CSSPropertyTabSize:
  267. case CSSPropertyTextAlign:
  268. case CSSPropertyTextDecoration:
  269. case CSSPropertyTextIndent:
  270. case CSSPropertyTextRendering:
  271. case CSSPropertyTextShadow:
  272. case CSSPropertyTextTransform:
  273. #if ENABLE(CSS_VARIABLES)
  274. case CSSPropertyVariable:
  275. #endif
  276. case CSSPropertyVisibility:
  277. case CSSPropertyWebkitAspectRatio:
  278. case CSSPropertyWebkitBorderHorizontalSpacing:
  279. case CSSPropertyWebkitBorderVerticalSpacing:
  280. case CSSPropertyWebkitBoxDirection:
  281. case CSSPropertyWebkitColorCorrection:
  282. #if ENABLE(CURSOR_VISIBILITY)
  283. case CSSPropertyWebkitCursorVisibility:
  284. #endif
  285. case CSSPropertyWebkitFontFeatureSettings:
  286. case CSSPropertyWebkitFontKerning:
  287. case CSSPropertyWebkitFontSmoothing:
  288. case CSSPropertyWebkitFontVariantLigatures:
  289. case CSSPropertyWebkitLocale:
  290. case CSSPropertyWebkitHighlight:
  291. case CSSPropertyWebkitHyphenateCharacter:
  292. case CSSPropertyWebkitHyphenateLimitAfter:
  293. case CSSPropertyWebkitHyphenateLimitBefore:
  294. case CSSPropertyWebkitHyphenateLimitLines:
  295. case CSSPropertyWebkitHyphens:
  296. case CSSPropertyWebkitLineAlign:
  297. case CSSPropertyWebkitLineBoxContain:
  298. case CSSPropertyWebkitLineBreak:
  299. case CSSPropertyWebkitLineGrid:
  300. case CSSPropertyWebkitLineSnap:
  301. case CSSPropertyWebkitNbspMode:
  302. #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
  303. case CSSPropertyWebkitOverflowScrolling:
  304. #endif
  305. case CSSPropertyWebkitPrintColorAdjust:
  306. case CSSPropertyWebkitRtlOrdering:
  307. case CSSPropertyWebkitRubyPosition:
  308. case CSSPropertyWebkitTextCombine:
  309. #if ENABLE(CSS3_TEXT)
  310. case CSSPropertyWebkitTextDecorationLine:
  311. case CSSPropertyWebkitTextAlignLast:
  312. case CSSPropertyWebkitTextJustify:
  313. case CSSPropertyWebkitTextUnderlinePosition:
  314. #endif // CSS3_TEXT
  315. case CSSPropertyWebkitTextDecorationsInEffect:
  316. case CSSPropertyWebkitTextEmphasis:
  317. case CSSPropertyWebkitTextEmphasisColor:
  318. case CSSPropertyWebkitTextEmphasisPosition:
  319. case CSSPropertyWebkitTextEmphasisStyle:
  320. case CSSPropertyWebkitTextFillColor:
  321. case CSSPropertyWebkitTextOrientation:
  322. case CSSPropertyWebkitTextSecurity:
  323. case CSSPropertyWebkitTextStroke:
  324. case CSSPropertyWebkitTextStrokeColor:
  325. case CSSPropertyWebkitTextStrokeWidth:
  326. case CSSPropertyWebkitUserModify:
  327. case CSSPropertyWebkitUserSelect:
  328. case CSSPropertyWebkitWritingMode:
  329. case CSSPropertyWhiteSpace:
  330. case CSSPropertyWidows:
  331. case CSSPropertyWordBreak:
  332. case CSSPropertyWordSpacing:
  333. case CSSPropertyWordWrap:
  334. #if ENABLE(SVG)
  335. case CSSPropertyClipRule:
  336. case CSSPropertyColorInterpolation:
  337. case CSSPropertyColorInterpolationFilters:
  338. case CSSPropertyColorRendering:
  339. case CSSPropertyFill:
  340. case CSSPropertyFillOpacity:
  341. case CSSPropertyFillRule:
  342. case CSSPropertyGlyphOrientationHorizontal:
  343. case CSSPropertyGlyphOrientationVertical:
  344. case CSSPropertyKerning:
  345. case CSSPropertyMarker:
  346. case CSSPropertyMarkerEnd:
  347. case CSSPropertyMarkerMid:
  348. case CSSPropertyMarkerStart:
  349. case CSSPropertyStroke:
  350. case CSSPropertyStrokeDasharray:
  351. case CSSPropertyStrokeDashoffset:
  352. case CSSPropertyStrokeLinecap:
  353. case CSSPropertyStrokeLinejoin:
  354. case CSSPropertyStrokeMiterlimit:
  355. case CSSPropertyStrokeOpacity:
  356. case CSSPropertyStrokeWidth:
  357. case CSSPropertyShapeRendering:
  358. case CSSPropertyTextAnchor:
  359. case CSSPropertyWritingMode:
  360. #endif
  361. #if ENABLE(TOUCH_EVENTS)
  362. case CSSPropertyWebkitTapHighlightColor:
  363. #endif
  364. return true;
  365. case CSSPropertyDisplay:
  366. case CSSPropertyZoom:
  367. case CSSPropertyBackground:
  368. case CSSPropertyBackgroundAttachment:
  369. case CSSPropertyBackgroundClip:
  370. case CSSPropertyBackgroundColor:
  371. case CSSPropertyBackgroundImage:
  372. case CSSPropertyBackgroundOrigin:
  373. case CSSPropertyBackgroundPosition:
  374. case CSSPropertyBackgroundPositionX:
  375. case CSSPropertyBackgroundPositionY:
  376. case CSSPropertyBackgroundRepeat:
  377. case CSSPropertyBackgroundRepeatX:
  378. case CSSPropertyBackgroundRepeatY:
  379. case CSSPropertyBackgroundSize:
  380. case CSSPropertyBorder:
  381. case CSSPropertyBorderBottom:
  382. case CSSPropertyBorderBottomColor:
  383. case CSSPropertyBorderBottomLeftRadius:
  384. case CSSPropertyBorderBottomRightRadius:
  385. case CSSPropertyBorderBottomStyle:
  386. case CSSPropertyBorderBottomWidth:
  387. case CSSPropertyBorderColor:
  388. case CSSPropertyBorderImage:
  389. case CSSPropertyBorderImageOutset:
  390. case CSSPropertyBorderImageRepeat:
  391. case CSSPropertyBorderImageSlice:
  392. case CSSPropertyBorderImageSource:
  393. case CSSPropertyBorderImageWidth:
  394. case CSSPropertyBorderLeft:
  395. case CSSPropertyBorderLeftColor:
  396. case CSSPropertyBorderLeftStyle:
  397. case CSSPropertyBorderLeftWidth:
  398. case CSSPropertyBorderRadius:
  399. case CSSPropertyBorderRight:
  400. case CSSPropertyBorderRightColor:
  401. case CSSPropertyBorderRightStyle:
  402. case CSSPropertyBorderRightWidth:
  403. case CSSPropertyBorderStyle:
  404. case CSSPropertyBorderTop:
  405. case CSSPropertyBorderTopColor:
  406. case CSSPropertyBorderTopLeftRadius:
  407. case CSSPropertyBorderTopRightRadius:
  408. case CSSPropertyBorderTopStyle:
  409. case CSSPropertyBorderTopWidth:
  410. case CSSPropertyBorderWidth:
  411. case CSSPropertyBottom:
  412. case CSSPropertyBoxShadow:
  413. case CSSPropertyBoxSizing:
  414. case CSSPropertyClear:
  415. case CSSPropertyClip:
  416. case CSSPropertyContent:
  417. case CSSPropertyCounterIncrement:
  418. case CSSPropertyCounterReset:
  419. case CSSPropertyFloat:
  420. case CSSPropertyFontStretch:
  421. #if ENABLE(CSS_SHADERS)
  422. case CSSPropertyGeometry:
  423. #endif
  424. case CSSPropertyHeight:
  425. case CSSPropertyLeft:
  426. case CSSPropertyMargin:
  427. case CSSPropertyMarginBottom:
  428. case CSSPropertyMarginLeft:
  429. case CSSPropertyMarginRight:
  430. case CSSPropertyMarginTop:
  431. case CSSPropertyMaxHeight:
  432. case CSSPropertyMaxWidth:
  433. case CSSPropertyMinHeight:
  434. case CSSPropertyMinWidth:
  435. case CSSPropertyOpacity:
  436. case CSSPropertyOutline:
  437. case CSSPropertyOutlineColor:
  438. case CSSPropertyOutlineOffset:
  439. case CSSPropertyOutlineStyle:
  440. case CSSPropertyOutlineWidth:
  441. case CSSPropertyOverflow:
  442. case CSSPropertyOverflowWrap:
  443. case CSSPropertyOverflowX:
  444. case CSSPropertyOverflowY:
  445. case CSSPropertyPadding:
  446. case CSSPropertyPaddingBottom:
  447. case CSSPropertyPaddingLeft:
  448. case CSSPropertyPaddingRight:
  449. case CSSPropertyPaddingTop:
  450. case CSSPropertyPage:
  451. case CSSPropertyPageBreakAfter:
  452. case CSSPropertyPageBreakBefore:
  453. case CSSPropertyPageBreakInside:
  454. case CSSPropertyPosition:
  455. case CSSPropertyRight:
  456. case CSSPropertySize:
  457. case CSSPropertySrc:
  458. case CSSPropertyTableLayout:
  459. case CSSPropertyTextLineThrough:
  460. case CSSPropertyTextLineThroughColor:
  461. case CSSPropertyTextLineThroughMode:
  462. case CSSPropertyTextLineThroughStyle:
  463. case CSSPropertyTextLineThroughWidth:
  464. case CSSPropertyTextOverflow:
  465. case CSSPropertyTextOverline:
  466. case CSSPropertyTextOverlineColor:
  467. case CSSPropertyTextOverlineMode:
  468. case CSSPropertyTextOverlineStyle:
  469. case CSSPropertyTextOverlineWidth:
  470. case CSSPropertyTextUnderline:
  471. case CSSPropertyTextUnderlineColor:
  472. case CSSPropertyTextUnderlineMode:
  473. case CSSPropertyTextUnderlineStyle:
  474. case CSSPropertyTextUnderlineWidth:
  475. case CSSPropertyTop:
  476. case CSSPropertyTransition:
  477. case CSSPropertyTransitionDelay:
  478. case CSSPropertyTransitionDuration:
  479. case CSSPropertyTransitionProperty:
  480. case CSSPropertyTransitionTimingFunction:
  481. case CSSPropertyUnicodeBidi:
  482. case CSSPropertyUnicodeRange:
  483. case CSSPropertyVerticalAlign:
  484. case CSSPropertyWidth:
  485. case CSSPropertyZIndex:
  486. case CSSPropertyWebkitAnimation:
  487. case CSSPropertyWebkitAnimationDelay:
  488. case CSSPropertyWebkitAnimationDirection:
  489. case CSSPropertyWebkitAnimationDuration:
  490. case CSSPropertyWebkitAnimationFillMode:
  491. case CSSPropertyWebkitAnimationIterationCount:
  492. case CSSPropertyWebkitAnimationName:
  493. case CSSPropertyWebkitAnimationPlayState:
  494. case CSSPropertyWebkitAnimationTimingFunction:
  495. case CSSPropertyWebkitAppearance:
  496. case CSSPropertyWebkitBackfaceVisibility:
  497. case CSSPropertyWebkitBackgroundClip:
  498. case CSSPropertyWebkitBackgroundComposite:
  499. case CSSPropertyWebkitBackgroundOrigin:
  500. case CSSPropertyWebkitBackgroundSize:
  501. case CSSPropertyWebkitBorderAfter:
  502. case CSSPropertyWebkitBorderAfterColor:
  503. case CSSPropertyWebkitBorderAfterStyle:
  504. case CSSPropertyWebkitBorderAfterWidth:
  505. case CSSPropertyWebkitBorderBefore:
  506. case CSSPropertyWebkitBorderBeforeColor:
  507. case CSSPropertyWebkitBorderBeforeStyle:
  508. case CSSPropertyWebkitBorderBeforeWidth:
  509. case CSSPropertyWebkitBorderEnd:
  510. case CSSPropertyWebkitBorderEndColor:
  511. case CSSPropertyWebkitBorderEndStyle:
  512. case CSSPropertyWebkitBorderEndWidth:
  513. case CSSPropertyWebkitBorderFit:
  514. case CSSPropertyWebkitBorderImage:
  515. case CSSPropertyWebkitBorderRadius:
  516. case CSSPropertyWebkitBorderStart:
  517. case CSSPropertyWebkitBorderStartColor:
  518. case CSSPropertyWebkitBorderStartStyle:
  519. case CSSPropertyWebkitBorderStartWidth:
  520. case CSSPropertyWebkitBoxAlign:
  521. #if ENABLE(CSS_BOX_DECORATION_BREAK)
  522. case CSSPropertyWebkitBoxDecorationBreak:
  523. #endif
  524. case CSSPropertyWebkitBoxFlex:
  525. case CSSPropertyWebkitBoxFlexGroup:
  526. case CSSPropertyWebkitBoxLines:
  527. case CSSPropertyWebkitBoxOrdinalGroup:
  528. case CSSPropertyWebkitBoxOrient:
  529. case CSSPropertyWebkitBoxPack:
  530. case CSSPropertyWebkitBoxReflect:
  531. case CSSPropertyWebkitBoxShadow:
  532. case CSSPropertyWebkitClipPath:
  533. case CSSPropertyWebkitColumnAxis:
  534. case CSSPropertyWebkitColumnBreakAfter:
  535. case CSSPropertyWebkitColumnBreakBefore:
  536. case CSSPropertyWebkitColumnBreakInside:
  537. case CSSPropertyWebkitColumnCount:
  538. case CSSPropertyWebkitColumnGap:
  539. case CSSPropertyWebkitColumnProgression:
  540. case CSSPropertyWebkitColumnRule:
  541. case CSSPropertyWebkitColumnRuleColor:
  542. case CSSPropertyWebkitColumnRuleStyle:
  543. case CSSPropertyWebkitColumnRuleWidth:
  544. case CSSPropertyWebkitColumnSpan:
  545. case CSSPropertyWebkitColumnWidth:
  546. case CSSPropertyWebkitColumns:
  547. #if ENABLE(CSS_FILTERS)
  548. case CSSPropertyWebkitFilter:
  549. #endif
  550. #if ENABLE(CSS_COMPOSITING)
  551. case CSSPropertyWebkitBlendMode:
  552. case CSSPropertyWebkitBackgroundBlendMode:
  553. #endif
  554. case CSSPropertyWebkitAlignContent:
  555. case CSSPropertyWebkitAlignItems:
  556. case CSSPropertyWebkitAlignSelf:
  557. case CSSPropertyWebkitFlex:
  558. case CSSPropertyWebkitFlexBasis:
  559. case CSSPropertyWebkitFlexDirection:
  560. case CSSPropertyWebkitFlexFlow:
  561. case CSSPropertyWebkitFlexGrow:
  562. case CSSPropertyWebkitFlexShrink:
  563. case CSSPropertyWebkitFlexWrap:
  564. case CSSPropertyWebkitJustifyContent:
  565. case CSSPropertyWebkitOrder:
  566. case CSSPropertyWebkitFontSizeDelta:
  567. case CSSPropertyWebkitGridAutoColumns:
  568. case CSSPropertyWebkitGridAutoFlow:
  569. case CSSPropertyWebkitGridAutoRows:
  570. case CSSPropertyWebkitGridColumns:
  571. case CSSPropertyWebkitGridRows:
  572. case CSSPropertyWebkitGridStart:
  573. case CSSPropertyWebkitGridEnd:
  574. case CSSPropertyWebkitGridBefore:
  575. case CSSPropertyWebkitGridAfter:
  576. case CSSPropertyWebkitGridColumn:
  577. case CSSPropertyWebkitGridRow:
  578. case CSSPropertyWebkitLineClamp:
  579. case CSSPropertyWebkitLogicalWidth:
  580. case CSSPropertyWebkitLogicalHeight:
  581. case CSSPropertyWebkitMarginAfterCollapse:
  582. case CSSPropertyWebkitMarginBeforeCollapse:
  583. case CSSPropertyWebkitMarginBottomCollapse:
  584. case CSSPropertyWebkitMarginTopCollapse:
  585. case CSSPropertyWebkitMarginCollapse:
  586. case CSSPropertyWebkitMarginAfter:
  587. case CSSPropertyWebkitMarginBefore:
  588. case CSSPropertyWebkitMarginEnd:
  589. case CSSPropertyWebkitMarginStart:
  590. case CSSPropertyWebkitMarquee:
  591. case CSSPropertyWebkitMarqueeDirection:
  592. case CSSPropertyWebkitMarqueeIncrement:
  593. case CSSPropertyWebkitMarqueeRepetition:
  594. case CSSPropertyWebkitMarqueeSpeed:
  595. case CSSPropertyWebkitMarqueeStyle:
  596. case CSSPropertyWebkitMask:
  597. case CSSPropertyWebkitMaskBoxImage:
  598. case CSSPropertyWebkitMaskBoxImageOutset:
  599. case CSSPropertyWebkitMaskBoxImageRepeat:
  600. case CSSPropertyWebkitMaskBoxImageSlice:
  601. case CSSPropertyWebkitMaskBoxImageSource:
  602. case CSSPropertyWebkitMaskBoxImageWidth:
  603. case CSSPropertyWebkitMaskClip:
  604. case CSSPropertyWebkitMaskComposite:
  605. case CSSPropertyWebkitMaskImage:
  606. case CSSPropertyWebkitMaskOrigin:
  607. case CSSPropertyWebkitMaskPosition:
  608. case CSSPropertyWebkitMaskPositionX:
  609. case CSSPropertyWebkitMaskPositionY:
  610. case CSSPropertyWebkitMaskRepeat:
  611. case CSSPropertyWebkitMaskRepeatX:
  612. case CSSPropertyWebkitMaskRepeatY:
  613. case CSSPropertyWebkitMaskSize:
  614. case CSSPropertyWebkitMaxLogicalWidth:
  615. case CSSPropertyWebkitMaxLogicalHeight:
  616. case CSSPropertyWebkitMinLogicalWidth:
  617. case CSSPropertyWebkitMinLogicalHeight:
  618. case CSSPropertyWebkitPaddingAfter:
  619. case CSSPropertyWebkitPaddingBefore:
  620. case CSSPropertyWebkitPaddingEnd:
  621. case CSSPropertyWebkitPaddingStart:
  622. case CSSPropertyWebkitPerspective:
  623. case CSSPropertyWebkitPerspectiveOrigin:
  624. case CSSPropertyWebkitPerspectiveOriginX:
  625. case CSSPropertyWebkitPerspectiveOriginY:
  626. #if ENABLE(CSS3_TEXT)
  627. case CSSPropertyWebkitTextDecorationStyle:
  628. case CSSPropertyWebkitTextDecorationColor:
  629. #endif // CSS3_TEXT
  630. case CSSPropertyWebkitTransform:
  631. case CSSPropertyWebkitTransformOrigin:
  632. case CSSPropertyWebkitTransformOriginX:
  633. case CSSPropertyWebkitTransformOriginY:
  634. case CSSPropertyWebkitTransformOriginZ:
  635. case CSSPropertyWebkitTransformStyle:
  636. case CSSPropertyWebkitTransition:
  637. case CSSPropertyWebkitTransitionDelay:
  638. case CSSPropertyWebkitTransitionDuration:
  639. case CSSPropertyWebkitTransitionProperty:
  640. case CSSPropertyWebkitTransitionTimingFunction:
  641. case CSSPropertyWebkitUserDrag:
  642. #if ENABLE(CSS_REGIONS)
  643. case CSSPropertyWebkitFlowInto:
  644. case CSSPropertyWebkitFlowFrom:
  645. case CSSPropertyWebkitRegionBreakAfter:
  646. case CSSPropertyWebkitRegionBreakBefore:
  647. case CSSPropertyWebkitRegionBreakInside:
  648. case CSSPropertyWebkitRegionFragment:
  649. #endif
  650. #if ENABLE(CSS_EXCLUSIONS)
  651. case CSSPropertyWebkitWrapFlow:
  652. case CSSPropertyWebkitWrapThrough:
  653. #endif
  654. #if ENABLE(CSS_SHAPES)
  655. case CSSPropertyWebkitShapeMargin:
  656. case CSSPropertyWebkitShapePadding:
  657. case CSSPropertyWebkitShapeInside:
  658. case CSSPropertyWebkitShapeOutside:
  659. #endif
  660. #if ENABLE(CSS_SHADERS)
  661. case CSSPropertyMix:
  662. case CSSPropertyParameters:
  663. #endif
  664. #if ENABLE(SVG)
  665. case CSSPropertyClipPath:
  666. case CSSPropertyMask:
  667. case CSSPropertyMaskType:
  668. case CSSPropertyEnableBackground:
  669. case CSSPropertyFilter:
  670. case CSSPropertyFloodColor:
  671. case CSSPropertyFloodOpacity:
  672. case CSSPropertyLightingColor:
  673. case CSSPropertyStopColor:
  674. case CSSPropertyStopOpacity:
  675. case CSSPropertyColorProfile:
  676. case CSSPropertyAlignmentBaseline:
  677. case CSSPropertyBaselineShift:
  678. case CSSPropertyDominantBaseline:
  679. case CSSPropertyVectorEffect:
  680. case CSSPropertyBufferedRendering:
  681. case CSSPropertyWebkitSvgShadow:
  682. #endif
  683. #if ENABLE(DASHBOARD_SUPPORT)
  684. case CSSPropertyWebkitDashboardRegion:
  685. #endif
  686. #if ENABLE(DRAGGABLE_REGION)
  687. case CSSPropertyWebkitAppRegion:
  688. #endif
  689. #if ENABLE(CSS_DEVICE_ADAPTATION)
  690. case CSSPropertyMaxZoom:
  691. case CSSPropertyMinZoom:
  692. case CSSPropertyOrientation:
  693. case CSSPropertyUserZoom:
  694. #endif
  695. return false;
  696. case CSSPropertyInvalid:
  697. ASSERT_NOT_REACHED();
  698. return false;
  699. }
  700. ASSERT_NOT_REACHED();
  701. return false;
  702. }
  703. } // namespace WebCore