OLD | NEW |
1 { | 1 { |
2 // This file specifies all the CSS properties we support and the necessary | 2 // This file specifies all the CSS properties we support and the necessary |
3 // information for our code generation. The various supported arguments | 3 // information for our code generation. The various supported arguments |
4 // are described below with example usage | 4 // are described below with example usage |
5 | 5 |
6 parameters: { | 6 parameters: { |
7 // - alias_for: "other-property" | 7 // - alias_for: "other-property" |
8 // Properties specifying alias_for should be virtually identical to the | 8 // Properties specifying alias_for should be virtually identical to the |
9 // properties they alias. Minor parsing differences are allowed as long as | 9 // properties they alias. Minor parsing differences are allowed as long as |
10 // the CSSValues created are of the same format of the aliased property. | 10 // the CSSValues created are of the same format of the aliased property. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // in the .h file for this property, and also used in CSSPropertyAPIFiles.h.
tmpl to | 54 // in the .h file for this property, and also used in CSSPropertyAPIFiles.h.
tmpl to |
55 // generate declarations for only the methods this property has implementati
ons for. | 55 // generate declarations for only the methods this property has implementati
ons for. |
56 api_methods: { | 56 api_methods: { |
57 default: [], | 57 default: [], |
58 valid_type: "list", | 58 valid_type: "list", |
59 // This list must be an ordered, complete list of methods whose names mat
ch those | 59 // This list must be an ordered, complete list of methods whose names mat
ch those |
60 // defined in CSSPropertyDescriptor.h. | 60 // defined in CSSPropertyDescriptor.h. |
61 valid_values: ["parseSingleValue", "parseShorthand"], | 61 valid_values: ["parseSingleValue", "parseShorthand"], |
62 }, | 62 }, |
63 | 63 |
| 64 // - field_group |
| 65 // Name of the group that this field belongs to. Fields in the same group ar
e stored |
| 66 // together as a nested class inside ComputedStyle and dynamically allocated
on use. |
| 67 // Leave this out if the field is stored directly on ComputedStyle. |
| 68 field_group: { |
| 69 value_type: "str" |
| 70 }, |
| 71 |
64 // - field_template | 72 // - field_template |
65 // Affects how the interface to this field is generated. | 73 // Affects how the interface to this field is generated. |
66 // TODO(sashab, meade): Remove this once TypedOM types are specified for | 74 // TODO(sashab, meade): Remove this once TypedOM types are specified for |
67 // every property, since this value can be inferred from that. | 75 // every property, since this value can be inferred from that. |
68 field_template: { | 76 field_template: { |
69 valid_values: [ | 77 valid_values: [ |
70 // Field is stored as an enum and has a initial/getter/setter/resetter. | 78 // Field is stored as an enum and has a initial/getter/setter/resetter. |
71 "keyword", | 79 "keyword", |
72 // Field is stored a packed boolean flag and has a initial/getter/setter
/resetter. | 80 // Field is stored a packed boolean flag and has a initial/getter/setter
/resetter. |
73 // TODO(shend): generalise this to "primitive" | 81 // TODO(shend): generalise this to "primitive" |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 { | 805 { |
798 name: "bottom", | 806 name: "bottom", |
799 api_class: "CSSPropertyAPIMargin", | 807 api_class: "CSSPropertyAPIMargin", |
800 api_methods: ["parseSingleValue"], | 808 api_methods: ["parseSingleValue"], |
801 converter: "convertLengthOrAuto", | 809 converter: "convertLengthOrAuto", |
802 initial: "initialOffset", | 810 initial: "initialOffset", |
803 interpolable: true, | 811 interpolable: true, |
804 keywords: ["auto"], | 812 keywords: ["auto"], |
805 supports_percentage: true, | 813 supports_percentage: true, |
806 typedom_types: ["Length"], | 814 typedom_types: ["Length"], |
| 815 field_template: "external", |
| 816 field_type_path: "platform/Length", |
| 817 field_group: "surround", |
| 818 default_value: "Length()", |
807 }, | 819 }, |
808 { | 820 { |
809 name: "box-shadow", | 821 name: "box-shadow", |
810 converter: "convertShadowList", | 822 converter: "convertShadowList", |
811 interpolable: true, | 823 interpolable: true, |
812 }, | 824 }, |
813 "box-sizing", | 825 "box-sizing", |
814 { | 826 { |
815 name: "break-after", | 827 name: "break-after", |
816 // Storage for this property also covers these legacy properties: | 828 // Storage for this property also covers these legacy properties: |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1198 { | 1210 { |
1199 name: "left", | 1211 name: "left", |
1200 api_class: "CSSPropertyAPIMargin", | 1212 api_class: "CSSPropertyAPIMargin", |
1201 api_methods: ["parseSingleValue"], | 1213 api_methods: ["parseSingleValue"], |
1202 converter: "convertLengthOrAuto", | 1214 converter: "convertLengthOrAuto", |
1203 initial: "initialOffset", | 1215 initial: "initialOffset", |
1204 interpolable: true, | 1216 interpolable: true, |
1205 keywords: ["auto"], | 1217 keywords: ["auto"], |
1206 supports_percentage: true, | 1218 supports_percentage: true, |
1207 typedom_types: ["Length"], | 1219 typedom_types: ["Length"], |
| 1220 field_template: "external", |
| 1221 field_type_path: "platform/Length", |
| 1222 field_group: "surround", |
| 1223 default_value: "Length()", |
1208 }, | 1224 }, |
1209 { | 1225 { |
1210 name: "letter-spacing", | 1226 name: "letter-spacing", |
1211 api_class: "CSSPropertyAPILetterAndWordSpacing", | 1227 api_class: "CSSPropertyAPILetterAndWordSpacing", |
1212 api_methods: ["parseSingleValue"], | 1228 api_methods: ["parseSingleValue"], |
1213 converter: "convertSpacing", | 1229 converter: "convertSpacing", |
1214 inherited: true, | 1230 inherited: true, |
1215 initial: "initialLetterWordSpacing", | 1231 initial: "initialLetterWordSpacing", |
1216 interpolable: true, | 1232 interpolable: true, |
1217 }, | 1233 }, |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 { | 1613 { |
1598 name: "right", | 1614 name: "right", |
1599 api_class: "CSSPropertyAPIMargin", | 1615 api_class: "CSSPropertyAPIMargin", |
1600 api_methods: ["parseSingleValue"], | 1616 api_methods: ["parseSingleValue"], |
1601 converter: "convertLengthOrAuto", | 1617 converter: "convertLengthOrAuto", |
1602 initial: "initialOffset", | 1618 initial: "initialOffset", |
1603 interpolable: true, | 1619 interpolable: true, |
1604 keywords: ["auto"], | 1620 keywords: ["auto"], |
1605 supports_percentage: true, | 1621 supports_percentage: true, |
1606 typedom_types: ["Length"], | 1622 typedom_types: ["Length"], |
| 1623 field_template: "external", |
| 1624 field_type_path: "platform/Length", |
| 1625 field_group: "surround", |
| 1626 default_value: "Length()", |
1607 }, | 1627 }, |
1608 { | 1628 { |
1609 name: "r", | 1629 name: "r", |
1610 api_class: "CSSPropertyAPIStrokeOrLength", | 1630 api_class: "CSSPropertyAPIStrokeOrLength", |
1611 converter: "convertLength", | 1631 converter: "convertLength", |
1612 interpolable: true, | 1632 interpolable: true, |
1613 svg: true, | 1633 svg: true, |
1614 }, | 1634 }, |
1615 { | 1635 { |
1616 name: "rx", | 1636 name: "rx", |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1915 { | 1935 { |
1916 name: "top", | 1936 name: "top", |
1917 api_class: "CSSPropertyAPIMargin", | 1937 api_class: "CSSPropertyAPIMargin", |
1918 api_methods: ["parseSingleValue"], | 1938 api_methods: ["parseSingleValue"], |
1919 converter: "convertLengthOrAuto", | 1939 converter: "convertLengthOrAuto", |
1920 initial: "initialOffset", | 1940 initial: "initialOffset", |
1921 interpolable: true, | 1941 interpolable: true, |
1922 keywords: ["auto"], | 1942 keywords: ["auto"], |
1923 supports_percentage: true, | 1943 supports_percentage: true, |
1924 typedom_types: ["Length"], | 1944 typedom_types: ["Length"], |
| 1945 field_template: "external", |
| 1946 field_type_path: "platform/Length", |
| 1947 field_group: "surround", |
| 1948 default_value: "Length()", |
1925 }, | 1949 }, |
1926 { | 1950 { |
1927 name: "touch-action", | 1951 name: "touch-action", |
1928 api_class: true, | 1952 api_class: true, |
1929 api_methods: ["parseSingleValue"], | 1953 api_methods: ["parseSingleValue"], |
1930 converter: "convertFlags<TouchAction>", | 1954 converter: "convertFlags<TouchAction>", |
1931 type_name: "TouchAction", | 1955 type_name: "TouchAction", |
1932 }, | 1956 }, |
1933 { | 1957 { |
1934 name: "transform", | 1958 name: "transform", |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2692 name: "background-position", | 2716 name: "background-position", |
2693 longhands: "background-position-x;background-position-y", | 2717 longhands: "background-position-x;background-position-y", |
2694 }, | 2718 }, |
2695 { | 2719 { |
2696 name: "background-repeat", | 2720 name: "background-repeat", |
2697 longhands: "background-repeat-x;background-repeat-y", | 2721 longhands: "background-repeat-x;background-repeat-y", |
2698 }, | 2722 }, |
2699 { | 2723 { |
2700 name: "border", | 2724 name: "border", |
2701 longhands: "border-top-color;border-top-style;border-top-width;border-righ
t-color;border-right-style;border-right-width;border-bottom-color;border-bottom-
style;border-bottom-width;border-left-color;border-left-style;border-left-width;
border-image-source;border-image-slice;border-image-width;border-image-outset;bo
rder-image-repeat", | 2725 longhands: "border-top-color;border-top-style;border-top-width;border-righ
t-color;border-right-style;border-right-width;border-bottom-color;border-bottom-
style;border-bottom-width;border-left-color;border-left-style;border-left-width;
border-image-source;border-image-slice;border-image-width;border-image-outset;bo
rder-image-repeat", |
| 2726 field_template: "storage_only", |
| 2727 field_type_path: "core/style/BorderData", |
| 2728 field_group: "surround", |
| 2729 default_value: "BorderData()" |
2702 }, | 2730 }, |
2703 { | 2731 { |
2704 name: "border-bottom", | 2732 name: "border-bottom", |
2705 longhands: "border-bottom-width;border-bottom-style;border-bottom-color", | 2733 longhands: "border-bottom-width;border-bottom-style;border-bottom-color", |
2706 }, | 2734 }, |
2707 { | 2735 { |
2708 name: "border-color", | 2736 name: "border-color", |
2709 longhands: "border-top-color;border-right-color;border-bottom-color;border
-left-color", | 2737 longhands: "border-top-color;border-right-color;border-bottom-color;border
-left-color", |
2710 }, | 2738 }, |
2711 { | 2739 { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2794 longhands: "grid-template-rows;grid-template-columns;grid-template-areas", | 2822 longhands: "grid-template-rows;grid-template-columns;grid-template-areas", |
2795 runtime_flag: "CSSGridLayout", | 2823 runtime_flag: "CSSGridLayout", |
2796 }, | 2824 }, |
2797 { | 2825 { |
2798 name: "list-style", | 2826 name: "list-style", |
2799 longhands: "list-style-type;list-style-position;list-style-image", | 2827 longhands: "list-style-type;list-style-position;list-style-image", |
2800 }, | 2828 }, |
2801 { | 2829 { |
2802 name: "margin", | 2830 name: "margin", |
2803 longhands: "margin-top;margin-right;margin-bottom;margin-left", | 2831 longhands: "margin-top;margin-right;margin-bottom;margin-left", |
| 2832 field_template: "storage_only", |
| 2833 field_type_path: "platform/LengthBox", |
| 2834 field_group: "surround", |
| 2835 default_value: "LengthBox(Fixed)", |
2804 }, | 2836 }, |
2805 { | 2837 { |
2806 name: "marker", | 2838 name: "marker", |
2807 longhands: "marker-start;marker-mid;marker-end", | 2839 longhands: "marker-start;marker-mid;marker-end", |
2808 }, | 2840 }, |
2809 { | 2841 { |
2810 name: "motion", | 2842 name: "motion", |
2811 longhands: "offset-path;offset-distance;offset-rotation", | 2843 longhands: "offset-path;offset-distance;offset-rotation", |
2812 }, | 2844 }, |
2813 { | 2845 { |
2814 name: "offset", | 2846 name: "offset", |
2815 longhands: "offset-path;offset-distance;offset-rotation", | 2847 longhands: "offset-path;offset-distance;offset-rotation", |
2816 }, | 2848 }, |
2817 { | 2849 { |
2818 name: "outline", | 2850 name: "outline", |
2819 longhands: "outline-color;outline-style;outline-width", | 2851 longhands: "outline-color;outline-style;outline-width", |
2820 }, | 2852 }, |
2821 { | 2853 { |
2822 name: "overflow", | 2854 name: "overflow", |
2823 longhands: "overflow-x;overflow-y", | 2855 longhands: "overflow-x;overflow-y", |
2824 }, | 2856 }, |
2825 { | 2857 { |
2826 name: "padding", | 2858 name: "padding", |
2827 longhands: "padding-top;padding-right;padding-bottom;padding-left", | 2859 longhands: "padding-top;padding-right;padding-bottom;padding-left", |
| 2860 field_template: "storage_only", |
| 2861 field_type_path: "platform/LengthBox", |
| 2862 field_group: "surround", |
| 2863 default_value: "LengthBox(Fixed)", |
2828 }, | 2864 }, |
2829 { | 2865 { |
2830 name: "page-break-after", | 2866 name: "page-break-after", |
2831 longhands: "break-after", | 2867 longhands: "break-after", |
2832 }, | 2868 }, |
2833 { | 2869 { |
2834 name: "page-break-before", | 2870 name: "page-break-before", |
2835 longhands: "break-before", | 2871 longhands: "break-before", |
2836 }, | 2872 }, |
2837 { | 2873 { |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3180 { | 3216 { |
3181 name: "-webkit-transition-timing-function", | 3217 name: "-webkit-transition-timing-function", |
3182 alias_for: "transition-timing-function", | 3218 alias_for: "transition-timing-function", |
3183 }, | 3219 }, |
3184 { | 3220 { |
3185 name: "-webkit-user-select", | 3221 name: "-webkit-user-select", |
3186 alias_for: "user-select", | 3222 alias_for: "user-select", |
3187 }, | 3223 }, |
3188 ], | 3224 ], |
3189 } | 3225 } |
OLD | NEW |