Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // This file specifies all the CSS properties we support and the necessary | 1 // This file specifies all the CSS properties we support and the necessary |
| 2 // information for our code generation. The various supported arguments | 2 // information for our code generation. The various supported arguments |
| 3 // are described below with example usage | 3 // are described below with example usage |
| 4 | 4 |
| 5 | 5 |
| 6 // - alias_for=other-property | 6 // - alias_for=other-property |
| 7 // Properties specifying alias_for should be virtually identical to the | 7 // Properties specifying alias_for should be virtually identical to the |
| 8 // properties they alias. Minor parsing differences are allowed as long as | 8 // properties they alias. Minor parsing differences are allowed as long as |
| 9 // the CSSValues created are of the same format of the aliased property. | 9 // the CSSValues created are of the same format of the aliased property. |
| 10 | 10 |
| 11 | 11 |
| 12 // - runtime_flag=CSSGridLayout | 12 // - runtime_flag=CSSGridLayout |
| 13 // The flag on RuntimeEnabledFeatures conditionally enables the property. | 13 // The flag on RuntimeEnabledFeatures conditionally enables the property. |
| 14 // This doesn't currently work with alias_for. | 14 // This doesn't currently work with alias_for. |
| 15 | 15 |
| 16 | 16 |
| 17 // - descriptor_only | 17 // - descriptor_only |
| 18 // These are actually descriptors and not CSS properties. Properties with | 18 // These are actually descriptors and not CSS properties. Properties with |
| 19 // the same name as a descriptor do not get this flag. | 19 // the same name as a descriptor do not get this flag. |
| 20 | 20 |
| 21 | 21 |
| 22 // - longhands=property;other-property | 22 // - longhands=property;other-property |
| 23 // The property is a shorthand for several other properties. | 23 // The property is a shorthand for several other properties. |
| 24 | 24 |
| 25 | 25 |
| 26 // - api_class[=classname] | |
| 27 // We have a CSSPropertyAPI interface which contains parsing functions for | |
| 28 // properties, and will be implemented by all CSS properties. CSSPropertyDescrip tor | |
| 29 // is used to store function pointers for the parsing functions for a specific | |
| 30 // property, and CSSPropertyDescriptors.cpp stores a static array of these | |
| 31 // descriptors. Therefore when CSSPropertyDescriptors.cpp is being generated, we | |
| 32 // need to know which properties CSSPropertyAPI has been implemented for. | |
|
alancutter (OOO until 2018)
2016/12/12 00:00:07
Too much low level implementation detail and takes
aazzam
2016/12/12 04:05:40
done :)
| |
| 33 // * Add this flag if the API has been implemented for this property. | |
|
alancutter (OOO until 2018)
2016/12/12 00:00:07
Redundant with the third bullet point.
aazzam
2016/12/12 04:05:40
done :)
| |
| 34 // * If the classname for this is different to the name of the property, specify a | |
| 35 // value for this flag. An example of this is when properties have similar par sing | |
|
alancutter (OOO until 2018)
2016/12/12 00:00:07
Give explicit examples of the default and the over
aazzam
2016/12/12 04:05:40
done :)
| |
| 36 // logic, they are grouped together under one classname, and all properties wi th | |
| 37 // this flag inherit from a class with this name. | |
|
alancutter (OOO until 2018)
2016/12/12 00:00:04
No need for use case example.
aazzam
2016/12/12 04:05:40
done :)
| |
| 38 // * Properties which have not been implemented do not get this flag. | |
|
alancutter (OOO until 2018)
2016/12/12 00:00:04
s/which have not been implemented/without a CSSPro
aazzam
2016/12/12 04:05:40
done :)
| |
| 39 // TODO(aazzam): When most properties have been implemented, modify this so that | |
| 40 // properties with default classnames do not get this flag, and introduce a | |
| 41 // 'not_implemented' flag instead. | |
|
alancutter (OOO until 2018)
2016/12/12 00:00:07
Awesome.
| |
| 42 | |
| 43 | |
| 26 // - keyword_only | 44 // - keyword_only |
| 27 // These properties only store keyword values. This is used when | 45 // These properties only store keyword values. This is used when |
| 28 // generating the ComputedStyle storage for the property. The initial | 46 // generating the ComputedStyle storage for the property. The initial |
| 29 // value for this property on a ComputedStyle is specified with the | 47 // value for this property on a ComputedStyle is specified with the |
| 30 // initial_keyword flag below. | 48 // initial_keyword flag below. |
| 31 // TODO(sashab, meade): Remove this once TypedOM types are specified for | 49 // TODO(sashab, meade): Remove this once TypedOM types are specified for |
| 32 // every property, since this value can be inferred from that. | 50 // every property, since this value can be inferred from that. |
| 33 | 51 |
| 34 | 52 |
| 35 // - keywords=[keyword1|keyword2] | 53 // - keywords=[keyword1|keyword2] |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 461 -webkit-border-before-color direction_aware | 479 -webkit-border-before-color direction_aware |
| 462 -webkit-border-before-style direction_aware | 480 -webkit-border-before-style direction_aware |
| 463 -webkit-border-before-width direction_aware | 481 -webkit-border-before-width direction_aware |
| 464 -webkit-border-after-color direction_aware | 482 -webkit-border-after-color direction_aware |
| 465 -webkit-border-after-style direction_aware | 483 -webkit-border-after-style direction_aware |
| 466 -webkit-border-after-width direction_aware | 484 -webkit-border-after-width direction_aware |
| 467 -webkit-margin-end direction_aware | 485 -webkit-margin-end direction_aware |
| 468 -webkit-margin-start direction_aware | 486 -webkit-margin-start direction_aware |
| 469 -webkit-margin-before direction_aware | 487 -webkit-margin-before direction_aware |
| 470 -webkit-margin-after direction_aware | 488 -webkit-margin-after direction_aware |
| 471 -webkit-padding-end direction_aware | 489 -webkit-padding-end direction_aware, api_class=WebkitPadding |
| 472 -webkit-padding-start direction_aware | 490 -webkit-padding-start direction_aware, api_class=WebkitPadding |
| 473 -webkit-padding-before direction_aware | 491 -webkit-padding-before direction_aware, api_class=WebkitPadding |
| 474 -webkit-padding-after direction_aware | 492 -webkit-padding-after direction_aware, api_class=WebkitPadding |
|
alancutter (OOO until 2018)
2016/12/12 00:00:04
Let's make the name explicitly CSSPropertyAPIWebki
aazzam
2016/12/12 04:05:40
The reason I haven't done it this way is that in s
| |
| 475 -webkit-logical-width direction_aware | 493 -webkit-logical-width direction_aware |
| 476 -webkit-logical-height direction_aware | 494 -webkit-logical-height direction_aware |
| 477 -webkit-min-logical-width direction_aware | 495 -webkit-min-logical-width direction_aware |
| 478 -webkit-min-logical-height direction_aware | 496 -webkit-min-logical-height direction_aware |
| 479 -webkit-max-logical-width direction_aware | 497 -webkit-max-logical-width direction_aware |
| 480 -webkit-max-logical-height direction_aware | 498 -webkit-max-logical-height direction_aware |
| 481 | 499 |
| 482 // Properties that we ignore in the StyleBuilder. | 500 // Properties that we ignore in the StyleBuilder. |
| 483 // TODO(timloh): This seems wrong, most of these shouldn't reach the StyleBuilde r | 501 // TODO(timloh): This seems wrong, most of these shouldn't reach the StyleBuilde r |
| 484 | 502 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 617 -webkit-text-size-adjust alias_for=text-size-adjust | 635 -webkit-text-size-adjust alias_for=text-size-adjust |
| 618 -webkit-transform alias_for=transform | 636 -webkit-transform alias_for=transform |
| 619 -webkit-transform-origin alias_for=transform-origin | 637 -webkit-transform-origin alias_for=transform-origin |
| 620 -webkit-transform-style alias_for=transform-style | 638 -webkit-transform-style alias_for=transform-style |
| 621 -webkit-transition alias_for=transition | 639 -webkit-transition alias_for=transition |
| 622 -webkit-transition-delay alias_for=transition-delay | 640 -webkit-transition-delay alias_for=transition-delay |
| 623 -webkit-transition-duration alias_for=transition-duration | 641 -webkit-transition-duration alias_for=transition-duration |
| 624 -webkit-transition-property alias_for=transition-property | 642 -webkit-transition-property alias_for=transition-property |
| 625 -webkit-transition-timing-function alias_for=transition-timing-function | 643 -webkit-transition-timing-function alias_for=transition-timing-function |
| 626 -webkit-user-select alias_for=user-select | 644 -webkit-user-select alias_for=user-select |
| OLD | NEW |