Commit 2fa761b1 authored by Darren Shen's avatar Darren Shen Committed by Commit Bot

[css-typed-om] Add support for min/max-width/height.

Add support & tests for (min/max)-(width/height).

Note that the typed om spec specifies the old specs for these properties:
https://drafts.csswg.org/css21/visudet.html

Bug: 820299
Change-Id: I9c65f7f24d84b83ea2e2f167f8fb86be967eff06
Reviewed-on: https://chromium-review.googlesource.com/968003
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: default avatarnainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543980}
parent 7b38a1f6
...@@ -19,4 +19,27 @@ runPropertyTests('height', [ ...@@ -19,4 +19,27 @@ runPropertyTests('height', [
{ syntax: '<length>', specified: assert_is_equal_with_range_handling }, { syntax: '<length>', specified: assert_is_equal_with_range_handling },
]); ]);
runPropertyTests('min-height', [
{
syntax: '<percentage>',
specified: assert_is_equal_with_range_handling
},
{
syntax: '<length>',
specified: assert_is_equal_with_range_handling
},
]);
runPropertyTests('max-height', [
{ syntax: 'none' },
{
syntax: '<percentage>',
specified: assert_is_equal_with_range_handling
},
{
syntax: '<length>',
specified: assert_is_equal_with_range_handling
},
]);
</script> </script>
...@@ -25,4 +25,27 @@ runPropertyTests('width', [ ...@@ -25,4 +25,27 @@ runPropertyTests('width', [
}, },
]); ]);
runPropertyTests('min-width', [
{
syntax: '<percentage>',
specified: assert_is_equal_with_range_handling
},
{
syntax: '<length>',
specified: assert_is_equal_with_range_handling
},
]);
runPropertyTests('max-width', [
{ syntax: 'none' },
{
syntax: '<percentage>',
specified: assert_is_equal_with_range_handling
},
{
syntax: '<length>',
specified: assert_is_equal_with_range_handling
},
]);
</script> </script>
...@@ -1826,6 +1826,8 @@ ...@@ -1826,6 +1826,8 @@
field_template: "<length>", field_template: "<length>",
default_value: "Length(kMaxSizeNone)", default_value: "Length(kMaxSizeNone)",
converter: "ConvertLengthMaxSizing", converter: "ConvertLengthMaxSizing",
keywords: ["none"],
typedom_types: ["Keyword", "Length", "Percentage"]
}, },
{ {
name: "max-width", name: "max-width",
...@@ -1836,6 +1838,8 @@ ...@@ -1836,6 +1838,8 @@
field_template: "<length>", field_template: "<length>",
default_value: "Length(kMaxSizeNone)", default_value: "Length(kMaxSizeNone)",
converter: "ConvertLengthMaxSizing", converter: "ConvertLengthMaxSizing",
keywords: ["none"],
typedom_types: ["Keyword", "Length", "Percentage"]
}, },
{ {
name: "min-height", name: "min-height",
...@@ -1846,6 +1850,7 @@ ...@@ -1846,6 +1850,7 @@
field_template: "<length>", field_template: "<length>",
default_value: "Length()", default_value: "Length()",
converter: "ConvertLengthSizing", converter: "ConvertLengthSizing",
typedom_types: ["Length", "Percentage"]
}, },
{ {
name: "min-width", name: "min-width",
...@@ -1856,6 +1861,7 @@ ...@@ -1856,6 +1861,7 @@
field_template: "<length>", field_template: "<length>",
default_value: "Length()", default_value: "Length()",
converter: "ConvertLengthSizing", converter: "ConvertLengthSizing",
typedom_types: ["Length", "Percentage"]
}, },
{ {
name: "mix-blend-mode", name: "mix-blend-mode",
......
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