Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/CSSProperties.json5 |
| diff --git a/third_party/WebKit/Source/core/css/CSSProperties.json5 b/third_party/WebKit/Source/core/css/CSSProperties.json5 |
| index 1499c31198485e782dbc7458d9e3dddca8d7569a..1166fc3461a0a092e0e4ec0bfec4a1db7224e796 100644 |
| --- a/third_party/WebKit/Source/core/css/CSSProperties.json5 |
| +++ b/third_party/WebKit/Source/core/css/CSSProperties.json5 |
| @@ -114,7 +114,9 @@ |
| // Can only be set if the field template is storage_only. |
| wrapper_pointer_name: { |
| valid_type: "str", |
| - valid_values: ["RefPtr", "Persistent"], |
| + // TODO(shend): Remove DataRef once we generate all of |
| + // StyleRareNonInheritedData. |
| + valid_values: ["RefPtr", "Persistent", "std::unique_ptr", "DataPersistent", "DataRef"], |
| }, |
| // - keywords: ["keyword1", "keyword2"] |
| @@ -591,6 +593,11 @@ |
| api_class: "CSSPropertyAPIAlignOrJustifyContent", |
| converter: "ConvertContentAlignmentData", |
| initial: "InitialContentAlignment", |
| + field_template: "storage_only", |
| + type_name: "StyleContentAlignmentData", |
| + field_group: "rare-non-inherited", |
| + default_value: "StyleContentAlignmentData(kContentPositionNormal, kContentDistributionDefault, kOverflowAlignmentDefault)", |
| + include_paths: ["core/style/StyleContentAlignmentData.h"], |
| }, |
| { |
| name: "align-items", |
| @@ -598,6 +605,11 @@ |
| api_methods: ["parseSingleValue"], |
| converter: "ConvertSelfOrDefaultAlignmentData", |
| initial: "InitialDefaultAlignment", |
| + field_template: "storage_only", |
| + type_name: "StyleSelfAlignmentData", |
| + field_group: "rare-non-inherited", |
| + default_value: "StyleSelfAlignmentData(RuntimeEnabledFeatures::CSSGridLayoutEnabled() ? kItemPositionNormal : kItemPositionStretch, kOverflowAlignmentDefault)", |
|
alancutter (OOO until 2018)
2017/06/13 03:49:29
This is getting kind of crazy. We should seriously
shend
2017/06/13 20:54:43
Sounds like a good idea. Another approach is to pu
|
| + include_paths: ["core/style/StyleSelfAlignmentData.h"], |
| }, |
| { |
| name: "alignment-baseline", |
| @@ -609,6 +621,11 @@ |
| api_methods: ["parseSingleValue"], |
| converter: "ConvertSelfOrDefaultAlignmentData", |
| initial: "InitialSelfAlignment", |
| + field_template: "storage_only", |
| + type_name: "StyleSelfAlignmentData", |
| + field_group: "rare-non-inherited", |
| + default_value: "StyleSelfAlignmentData(kItemPositionAuto, kOverflowAlignmentDefault)", |
| + include_paths: ["core/style/StyleSelfAlignmentData.h"], |
| }, |
| { |
| name: "backdrop-filter", |
| @@ -619,6 +636,11 @@ |
| }, |
| { |
| name: "backface-visibility", |
| + field_template: "storage_only", |
| + type_name: "EBackfaceVisibility", |
| + field_group: "rare-non-inherited", |
| + default_value: "kBackfaceVisibilityVisible", |
| + field_size: 1, |
| }, |
| { |
| name: "background-attachment", |
| @@ -918,6 +940,11 @@ |
| name: "box-shadow", |
| converter: "ConvertShadowList", |
| interpolable: true, |
| + field_template: "storage_only", |
| + type_name: "ShadowList", |
| + field_group: "rare-non-inherited", |
| + default_value: "nullptr", |
| + wrapper_pointer_name: "RefPtr", |
| }, |
| { |
| name: "box-sizing", |
| @@ -1007,6 +1034,12 @@ |
| api_methods: ["parseSingleValue"], |
| converter: "ConvertClipPath", |
| interpolable: true, |
| + field_template: "storage_only", |
| + type_name: "ClipPathOperation", |
| + field_group: "rare-non-inherited", |
| + default_value: "nullptr", |
| + wrapper_pointer_name: "RefPtr", |
| + include_paths: ["core/style/ClipPathOperation.h"], |
| }, |
| { |
| name: "clip-rule", |
| @@ -1040,6 +1073,12 @@ |
| api_methods: ["parseSingleValue"], |
| converter: "ConvertFlags<Containment>", |
| runtime_flag: "CSSContainment", |
| + name_for_methods: "Contain", |
| + type_name: "Containment", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + field_size: 4, |
| + default_value: "kContainsNone", |
| }, |
| { |
| name: "content", |
| @@ -1048,6 +1087,12 @@ |
| custom_all: true, |
| separator: ",", |
| typedom_types: ["Image"], |
| + type_name: "ContentData", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + default_value: "nullptr", |
| + wrapper_pointer_name: "Persistent", |
| + include_paths: ["core/style/ContentData.h"], |
| }, |
| { |
| name: "counter-increment", |
| @@ -1318,6 +1363,11 @@ |
| }, |
| { |
| name: "isolation", |
| + type_name: "EIsolation", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + field_size: 1, |
| + default_value: "kIsolationAuto", |
| }, |
| { |
| name: "justify-content", |
| @@ -1325,6 +1375,11 @@ |
| api_methods: ["parseSingleValue"], |
| converter: "ConvertContentAlignmentData", |
| initial: "InitialContentAlignment", |
| + field_template: "storage_only", |
| + type_name: "StyleContentAlignmentData", |
| + field_group: "rare-non-inherited", |
| + default_value: "StyleContentAlignmentData(kContentPositionNormal, kContentDistributionDefault, kOverflowAlignmentDefault)", |
| + include_paths: ["core/style/StyleContentAlignmentData.h"], |
| }, |
| { |
| name: "justify-items", |
| @@ -1333,6 +1388,11 @@ |
| converter: "ConvertSelfOrDefaultAlignmentData", |
| initial: "InitialSelfAlignment", |
| runtime_flag: "CSSGridLayout", |
| + field_template: "storage_only", |
| + type_name: "StyleSelfAlignmentData", |
| + field_group: "rare-non-inherited", |
| + default_value: "StyleSelfAlignmentData(kItemPositionAuto, kOverflowAlignmentDefault)", |
| + include_paths: ["core/style/StyleSelfAlignmentData.h"], |
| }, |
| { |
| name: "justify-self", |
| @@ -1341,6 +1401,11 @@ |
| converter: "ConvertSelfOrDefaultAlignmentData", |
| initial: "InitialSelfAlignment", |
| runtime_flag: "CSSGridLayout", |
| + field_template: "storage_only", |
| + type_name: "StyleSelfAlignmentData", |
| + field_group: "rare-non-inherited", |
| + default_value: "StyleSelfAlignmentData(kItemPositionAuto, kOverflowAlignmentDefault)", |
| + include_paths: ["core/style/StyleSelfAlignmentData.h"], |
| }, |
| { |
| name: "left", |
| @@ -1572,11 +1637,19 @@ |
| { |
| name: "object-fit", |
| type_name: "ObjectFit", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + field_size: 3, |
| + default_value: "kObjectFitFill", |
| }, |
| { |
| name: "object-position", |
| converter: "ConvertPosition", |
| interpolable: true, |
| + field_template: "storage_only", |
| + type_name: "LengthPoint", |
| + field_group: "rare-non-inherited", |
| + default_value: "LengthPoint(Length(50.0, kPercent), Length(50.0, kPercent))", |
| }, |
| { |
| name: "offset-anchor", |
| @@ -1612,19 +1685,26 @@ |
| converter: "ConvertOffsetRotate", |
| interpolable: true, |
| }, |
| + // Whether or not we're transparent. |
| { |
| name: "opacity", |
| api_class: "CSSPropertyAPIOpacity", |
| api_methods: ["parseSingleValue"], |
| interpolable: true, |
| + field_template: "storage_only", |
| type_name: "float", |
| + field_group: "rare-non-inherited", |
| + default_value: "1.0", |
| }, |
| { |
| name: "order", |
| api_class: true, |
| api_methods: ["parseSingleValue"], |
| interpolable: true, |
| + field_template: "storage_only", |
| type_name: "int", |
| + field_group: "rare-non-inherited", |
| + default_value: "0", |
| }, |
| { |
| name: "orphans", |
| @@ -1760,11 +1840,19 @@ |
| api_class: "CSSPropertyAPIPerspective", |
| converter: "ConvertPerspective", |
| interpolable: true, |
| + field_template: "storage_only", |
| + type_name: "float", |
| + field_group: "rare-non-inherited", |
| + default_value: "0.0", |
| }, |
| { |
| name: "perspective-origin", |
| converter: "ConvertPosition", |
| interpolable: true, |
| + field_template: "storage_only", |
| + type_name: "LengthPoint", |
| + field_group: "rare-non-inherited", |
| + default_value: "LengthPoint(Length(50.0, kPercent), Length(50.0, kPercent))", |
| }, |
| { |
| name: "pointer-events", |
| @@ -1802,6 +1890,11 @@ |
| { |
| name: "resize", |
| custom_value: true, |
| + type_name: "EResize", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + field_size: 2, |
| + default_value: "RESIZE_NONE", |
| }, |
| { |
| name: "right", |
| @@ -1844,11 +1937,19 @@ |
| name: "scroll-behavior", |
| runtime_flag: "CSSOMSmoothScroll", |
| type_name: "ScrollBehavior", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + field_size: 2, |
| + default_value: "kScrollBehaviorAuto", |
| }, |
| { |
| name: "scroll-snap-type", |
| runtime_flag: "CSSScrollSnapPoints", |
| type_name: "ScrollSnapType", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + field_size: 2, |
| + default_value: "kScrollSnapTypeNone", |
| }, |
| { |
| name: "scroll-snap-points-x", |
| @@ -1877,7 +1978,10 @@ |
| api_class: true, |
| api_methods: ["parseSingleValue"], |
| interpolable: true, |
| + field_template: "storage_only", |
| type_name: "float", |
| + field_group: "rare-non-inherited", |
| + default_value: "0.0", |
| }, |
| { |
| name: "shape-margin", |
| @@ -1885,6 +1989,10 @@ |
| api_methods: ["parseSingleValue"], |
| converter: "ConvertLength", |
| interpolable: true, |
| + field_template: "storage_only", |
| + type_name: "Length", |
| + field_group: "rare-non-inherited", |
| + default_value: "Length(0, kFixed)", |
| }, |
| { |
| name: "shape-outside", |
| @@ -1893,6 +2001,12 @@ |
| converter: "ConvertShapeValue", |
| interpolable: true, |
| typedom_types: ["Image"], |
| + field_template: "storage_only", |
| + type_name: "ShapeValue", |
| + field_group: "rare-non-inherited", |
| + default_value: "nullptr", |
| + wrapper_pointer_name: "Persistent", |
| + include_paths: ["core/style/ShapeValue.h"], |
| }, |
| { |
| name: "shape-rendering", |
| @@ -2069,6 +2183,10 @@ |
| custom_all: true, |
| interpolable: true, |
| runtime_flag: "CSS3TextDecorations", |
| + field_template: "storage_only", |
| + type_name: "StyleColor", |
| + field_group: "rare-non-inherited", |
| + default_value: "StyleColor::CurrentColor()", |
| }, |
| { |
| name: "text-decoration-line", |
| @@ -2095,6 +2213,10 @@ |
| name: "text-decoration-style", |
| runtime_flag: "CSS3TextDecorations", |
| type_name: "TextDecorationStyle", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + default_value: "kTextDecorationStyleSolid", |
| + field_size: 3, |
| }, |
| { |
| name: "text-indent", |
| @@ -2125,6 +2247,10 @@ |
| { |
| name: "text-overflow", |
| type_name: "TextOverflow", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + default_value: "kTextOverflowClip", |
| + field_size: 1, |
| }, |
| { |
| name: "text-shadow", |
| @@ -2192,6 +2318,11 @@ |
| api_methods: ["parseSingleValue"], |
| converter: "ConvertFlags<TouchAction>", |
| type_name: "TouchAction", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + field_size: 6, // TODO(shend): Make this use "kTouchActionBits". |
| + default_value: "TouchAction::kTouchActionAuto", |
| + include_paths: ["platform/graphics/TouchAction.h"], |
| }, |
| { |
| name: "transform", |
| @@ -2220,6 +2351,10 @@ |
| { |
| name: "transform-style", |
| name_for_methods: "TransformStyle3D", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + default_value: "kTransformStyle3DFlat", |
| + field_size: 1, |
| }, |
| { |
| name: "translate", |
| @@ -2293,6 +2428,10 @@ |
| { |
| name: "-webkit-appearance", |
| type_name: "ControlPart", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + default_value: "kNoControlPart", |
| + field_size: 6, |
| }, |
| { |
| name: "-webkit-app-region", |
| @@ -2383,6 +2522,12 @@ |
| { |
| name: "-webkit-box-reflect", |
| converter: "ConvertBoxReflect", |
| + field_template: "storage_only", |
| + type_name: "StyleReflection", |
| + field_group: "rare-non-inherited", |
| + default_value: "nullptr", |
| + wrapper_pointer_name: "RefPtr", |
| + include_paths: ["core/style/StyleReflection.h"], |
| }, |
| { |
| name: "column-count", |
| @@ -2465,19 +2610,32 @@ |
| default_value: "auto", |
| field_group: "rare-inherited", |
| }, |
| + // An Apple extension. |
| { |
| name: "-webkit-line-clamp", |
| api_class: true, |
| api_methods: ["parseSingleValue"], |
| type_name: "LineClampValue", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + default_value: "LineClampValue()", |
| + include_paths: ["core/style/LineClampValue.h"], |
| }, |
| { |
| name: "-webkit-margin-after-collapse", |
| type_name: "EMarginCollapse", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + default_value: "kMarginCollapseCollapse", |
| + field_size: 2, |
| }, |
| { |
| name: "-webkit-margin-before-collapse", |
| type_name: "EMarginCollapse", |
| + field_template: "storage_only", |
| + field_group: "rare-non-inherited", |
| + default_value: "kMarginCollapseCollapse", |
| + field_size: 2, |
| }, |
| { |
| name: "-webkit-margin-bottom-collapse", |
| @@ -2711,6 +2869,11 @@ |
| }, |
| { |
| name: "-webkit-user-drag", |
| + field_template: "storage_only", |
| + type_name: "EUserDrag", |
| + field_group: "rare-non-inherited", |
| + default_value: "DRAG_AUTO", |
| + field_size: 2, |
| }, |
| { |
| name: "-webkit-user-modify", |