Commit a1d1ae1a authored by Anders Hartvoll Ruud's avatar Anders Hartvoll Ruud Committed by Commit Bot

[mpc] Make margin/padding properties computed_value_comparable

Bug: 1057072
Change-Id: I9b50b4f02c7ceb31a406464552d2c02613f6bf5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2210420
Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772608}
parent 145c948f
...@@ -2416,6 +2416,7 @@ ...@@ -2416,6 +2416,7 @@
keywords: ["auto"], keywords: ["auto"],
typedom_types: ["Keyword", "Length", "Percentage"], typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true, valid_for_first_letter: true,
computed_value_comparable: true,
}, },
{ {
name: "margin-left", name: "margin-left",
...@@ -2430,6 +2431,7 @@ ...@@ -2430,6 +2431,7 @@
keywords: ["auto"], keywords: ["auto"],
typedom_types: ["Keyword", "Length", "Percentage"], typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true, valid_for_first_letter: true,
computed_value_comparable: true,
}, },
{ {
name: "margin-right", name: "margin-right",
...@@ -2444,6 +2446,7 @@ ...@@ -2444,6 +2446,7 @@
keywords: ["auto"], keywords: ["auto"],
typedom_types: ["Keyword", "Length", "Percentage"], typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true, valid_for_first_letter: true,
computed_value_comparable: true,
}, },
{ {
name: "margin-top", name: "margin-top",
...@@ -2458,6 +2461,7 @@ ...@@ -2458,6 +2461,7 @@
keywords: ["auto"], keywords: ["auto"],
typedom_types: ["Keyword", "Length", "Percentage"], typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true, valid_for_first_letter: true,
computed_value_comparable: true,
}, },
{ {
name: "marker-end", name: "marker-end",
...@@ -2897,6 +2901,7 @@ ...@@ -2897,6 +2901,7 @@
computed_style_custom_functions: ["setter"], computed_style_custom_functions: ["setter"],
typedom_types: ["Keyword", "Length", "Percentage"], typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true, valid_for_first_letter: true,
computed_value_comparable: true,
}, },
{ {
name: "padding-left", name: "padding-left",
...@@ -2910,6 +2915,7 @@ ...@@ -2910,6 +2915,7 @@
computed_style_custom_functions: ["setter"], computed_style_custom_functions: ["setter"],
typedom_types: ["Keyword", "Length", "Percentage"], typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true, valid_for_first_letter: true,
computed_value_comparable: true,
}, },
{ {
name: "padding-right", name: "padding-right",
...@@ -2923,6 +2929,7 @@ ...@@ -2923,6 +2929,7 @@
computed_style_custom_functions: ["setter"], computed_style_custom_functions: ["setter"],
typedom_types: ["Keyword", "Length", "Percentage"], typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true, valid_for_first_letter: true,
computed_value_comparable: true,
}, },
{ {
name: "padding-top", name: "padding-top",
...@@ -2936,6 +2943,7 @@ ...@@ -2936,6 +2943,7 @@
computed_style_custom_functions: ["setter"], computed_style_custom_functions: ["setter"],
typedom_types: ["Keyword", "Length", "Percentage"], typedom_types: ["Keyword", "Length", "Percentage"],
valid_for_first_letter: true, valid_for_first_letter: true,
computed_value_comparable: true,
}, },
{ {
name: "page", name: "page",
......
...@@ -160,6 +160,8 @@ const char* justify_content_examples[] = {"normal", "stretch", "safe end", ...@@ -160,6 +160,8 @@ const char* justify_content_examples[] = {"normal", "stretch", "safe end",
"left", nullptr}; "left", nullptr};
const char* length_or_auto_examples[] = {"auto", "1px", "2px", "5%", nullptr}; const char* length_or_auto_examples[] = {"auto", "1px", "2px", "5%", nullptr};
const char* length_or_none_examples[] = {"none", "1px", "2px", "5%", nullptr}; const char* length_or_none_examples[] = {"none", "1px", "2px", "5%", nullptr};
const char* length_percentage_examples[] = {"1px", "2%", "calc(1% + 2px)",
nullptr};
const char* length_size_examples[] = {"4px", "1px 2px", "3%", "calc(1% + 1px)", const char* length_size_examples[] = {"4px", "1px 2px", "3%", "calc(1% + 1px)",
nullptr}; nullptr};
const char* line_width_examples[] = {"medium", "thin", "100px", nullptr}; const char* line_width_examples[] = {"medium", "thin", "100px", nullptr};
...@@ -207,10 +209,18 @@ struct ComputedValuesEqualData { ...@@ -207,10 +209,18 @@ struct ComputedValuesEqualData {
{"justify-items", self_align_examples}, {"justify-items", self_align_examples},
{"justify-self", self_align_examples}, {"justify-self", self_align_examples},
{"left", length_or_auto_examples}, {"left", length_or_auto_examples},
{"margin-bottom", length_or_auto_examples},
{"margin-left", length_or_auto_examples},
{"margin-right", length_or_auto_examples},
{"margin-top", length_or_auto_examples},
{"max-height", length_or_none_examples}, {"max-height", length_or_none_examples},
{"max-width", length_or_none_examples}, {"max-width", length_or_none_examples},
{"min-height", length_or_auto_examples}, {"min-height", length_or_auto_examples},
{"min-width", length_or_auto_examples}, {"min-width", length_or_auto_examples},
{"padding-bottom", length_percentage_examples},
{"padding-left", length_percentage_examples},
{"padding-right", length_percentage_examples},
{"padding-top", length_percentage_examples},
{"right", length_or_auto_examples}, {"right", length_or_auto_examples},
{"text-decoration-color", color_examples}, {"text-decoration-color", color_examples},
{"text-decoration-line", text_decoration_line_examples}, {"text-decoration-line", text_decoration_line_examples},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment