Bladeren bron

LibWeb: Allow intrinsic size keywords for `min-height` and `max-height`

Andreas Kling 9 maanden geleden
bovenliggende
commit
c5a54f1166

+ 4 - 4
Tests/LibWeb/Text/expected/wpt-import/css/css-sizing/parsing/max-height-computed.txt

@@ -6,12 +6,12 @@ Rerun
 
 Found 12 tests
 
-4 Pass
-8 Fail
+6 Pass
+6 Fail
 Details
 Result	Test Name	MessagePass	Property max-height value 'none'	
-Fail	Property max-height value 'min-content'	assert_true: 'min-content' is a supported value for max-height. expected true got false
-Fail	Property max-height value 'max-content'	assert_true: 'max-content' is a supported value for max-height. expected true got false
+Pass	Property max-height value 'min-content'	
+Pass	Property max-height value 'max-content'	
 Pass	Property max-height value '10px'	
 Pass	Property max-height value '20%'	
 Pass	Property max-height value 'calc(10% + 40px)'	

+ 4 - 4
Tests/LibWeb/Text/expected/wpt-import/css/css-sizing/parsing/max-height-valid.txt

@@ -6,12 +6,12 @@ Rerun
 
 Found 10 tests
 
-4 Pass
-6 Fail
+6 Pass
+4 Fail
 Details
 Result	Test Name	MessagePass	e.style['max-height'] = "none" should set the property value	
-Fail	e.style['max-height'] = "min-content" should set the property value	assert_not_equals: property should be set got disallowed value ""
-Fail	e.style['max-height'] = "max-content" should set the property value	assert_not_equals: property should be set got disallowed value ""
+Pass	e.style['max-height'] = "min-content" should set the property value	
+Pass	e.style['max-height'] = "max-content" should set the property value	
 Pass	e.style['max-height'] = "0" should set the property value	
 Pass	e.style['max-height'] = "10%" should set the property value	
 Pass	e.style['max-height'] = "0.5em" should set the property value	

+ 4 - 4
Tests/LibWeb/Text/expected/wpt-import/css/css-sizing/parsing/min-height-computed.txt

@@ -6,11 +6,11 @@ Rerun
 
 Found 11 tests
 
-3 Pass
-8 Fail
+5 Pass
+6 Fail
 Details
-Result	Test Name	MessageFail	Property min-height value 'min-content'	assert_true: 'min-content' is a supported value for min-height. expected true got false
-Fail	Property min-height value 'max-content'	assert_true: 'max-content' is a supported value for min-height. expected true got false
+Result	Test Name	MessagePass	Property min-height value 'min-content'	
+Pass	Property min-height value 'max-content'	
 Pass	Property min-height value '10px'	
 Pass	Property min-height value '20%'	
 Pass	Property min-height value 'calc(10% + 40px)'	

+ 4 - 4
Tests/LibWeb/Text/expected/wpt-import/css/css-sizing/parsing/min-height-valid.txt

@@ -6,12 +6,12 @@ Rerun
 
 Found 10 tests
 
-4 Pass
-6 Fail
+6 Pass
+4 Fail
 Details
 Result	Test Name	MessagePass	e.style['min-height'] = "auto" should set the property value	
-Fail	e.style['min-height'] = "min-content" should set the property value	assert_not_equals: property should be set got disallowed value ""
-Fail	e.style['min-height'] = "max-content" should set the property value	assert_not_equals: property should be set got disallowed value ""
+Pass	e.style['min-height'] = "min-content" should set the property value	
+Pass	e.style['min-height'] = "max-content" should set the property value	
 Pass	e.style['min-height'] = "0" should set the property value	
 Pass	e.style['min-height'] = "10%" should set the property value	
 Pass	e.style['min-height'] = "0.5em" should set the property value	

+ 7 - 1
Userland/Libraries/LibWeb/CSS/Properties.json

@@ -1905,6 +1905,9 @@
       "percentage [0,∞]"
     ],
     "valid-identifiers": [
+      "fit-content",
+      "max-content",
+      "min-content",
       "none"
     ],
     "percentages-resolve-to": "length",
@@ -1947,7 +1950,10 @@
       "percentage [0,∞]"
     ],
     "valid-identifiers": [
-      "auto"
+      "auto",
+      "fit-content",
+      "max-content",
+      "min-content"
     ],
     "percentages-resolve-to": "length",
     "quirks": [