| OLD | NEW |
| 1 // Valid values for both shape-inside and shape-outside. Two values are specifie
d when the shape property value | 1 // Valid values for both shape-inside and shape-outside. Two values are specifie
d when the shape property value |
| 2 // differs from the specified value. Three values are specified when the compute
d shape property value differs | 2 // differs from the specified value. Three values are specified when the compute
d shape property value differs |
| 3 // from the specified value. | 3 // from the specified value. |
| 4 // eg: "specified value/CSS Text value/computed style value" | 4 // eg: "specified value/CSS Text value/computed style value" |
| 5 // or: ["specified value", "CSS Text value/computed style value"] | 5 // or: ["specified value", "CSS Text value/computed style value"] |
| 6 // or: ["specified value", "CSS Text value", "Computed style value"] | 6 // or: ["specified value", "CSS Text value", "Computed style value"] |
| 7 var validShapeValues = [ | 7 var validShapeValues = [ |
| 8 "none", | 8 "none", |
| 9 ["rectangle(10px, 20px, 30px, 40px)", "rectangle(10px, 20px, 30px, 40px)", "
rectangle(10px, 20px, 30px, 40px, 0px, 0px)"], | 9 ["rectangle(10px, 20px, 30px, 40px)", "rectangle(10px, 20px, 30px, 40px)", "
rectangle(10px, 20px, 30px, 40px, 0px, 0px)"], |
| 10 ["rectangle(10px, 20px, 30px, 40px, 5px)", "rectangle(10px, 20px, 30px, 40px
, 5px)", "rectangle(10px, 20px, 30px, 40px, 5px, 5px)"], | 10 ["rectangle(10px, 20px, 30px, 40px, 5px)", "rectangle(10px, 20px, 30px, 40px
, 5px)", "rectangle(10px, 20px, 30px, 40px, 5px, 5px)"], |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 ["ellipse(at 10px 10px)", "ellipse(at 10px 10px)", "ellipse(closest-side clo
sest-side at 10px 10px)"], | 70 ["ellipse(at 10px 10px)", "ellipse(at 10px 10px)", "ellipse(closest-side clo
sest-side at 10px 10px)"], |
| 71 ["ellipse(at top left)", "ellipse(at 0% 0%)", "ellipse(closest-side closest-
side at 0% 0%)"], | 71 ["ellipse(at top left)", "ellipse(at 0% 0%)", "ellipse(closest-side closest-
side at 0% 0%)"], |
| 72 ["ellipse(at right bottom)", "ellipse(at 100% 100%)", "ellipse(closest-side
closest-side at 100% 100%)"], | 72 ["ellipse(at right bottom)", "ellipse(at 100% 100%)", "ellipse(closest-side
closest-side at 100% 100%)"], |
| 73 ["ellipse(10px at left top 10px)", "ellipse(10px at 0% 10px)", "ellipse(10px
closest-side at 0% 10px)"], | 73 ["ellipse(10px at left top 10px)", "ellipse(10px at 0% 10px)", "ellipse(10px
closest-side at 0% 10px)"], |
| 74 ["ellipse(10px at top 10px left 10px)", "ellipse(10px at 10px 10px)", "ellip
se(10px closest-side at 10px 10px)"], | 74 ["ellipse(10px at top 10px left 10px)", "ellipse(10px at 10px 10px)", "ellip
se(10px closest-side at 10px 10px)"], |
| 75 ["ellipse(10px at right 10px bottom 10px)", "ellipse(10px at right 10px bott
om 10px)", "ellipse(10px closest-side at right 10px bottom 10px)"], | 75 ["ellipse(10px at right 10px bottom 10px)", "ellipse(10px at right 10px bott
om 10px)", "ellipse(10px closest-side at right 10px bottom 10px)"], |
| 76 ["ellipse(10px 20px at left top 10px)", "ellipse(10px 20px at 0% 10px)"], | 76 ["ellipse(10px 20px at left top 10px)", "ellipse(10px 20px at 0% 10px)"], |
| 77 ["ellipse(10px 20px at top 10px left 10px)", "ellipse(10px 20px at 10px 10px
)"], | 77 ["ellipse(10px 20px at top 10px left 10px)", "ellipse(10px 20px at 10px 10px
)"], |
| 78 ["ellipse(10px 20px at right 10px bottom 10px)", "ellipse(10px 20px at right
10px bottom 10px)"], | 78 ["ellipse(10px 20px at right 10px bottom 10px)", "ellipse(10px 20px at right
10px bottom 10px)"], |
| 79 | 79 |
| 80 ["polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30
px 40px, 40px 50px)"], | 80 ["polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(10px 20px, 30px 40px,
40px 50px)"], |
| 81 ["polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px
20px, 30px 40px, 40px 50px)"], | 81 ["polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px
20px, 30px 40px, 40px 50px)"], |
| 82 ["polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px
20px, 30px 40px, 40px 50px)"], | 82 ["polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)", "polygon(10px 20px, 30
px 40px, 40px 50px)"], |
| 83 | 83 |
| 84 "content-box", | 84 "content-box", |
| 85 "padding-box", | 85 "padding-box", |
| 86 "border-box", | 86 "border-box", |
| 87 "margin-box", | 87 "margin-box", |
| 88 | 88 |
| 89 "polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) content-box", | 89 ["polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) content-box", "polygon(1
0px 10px, 20px 20px, 30px 30px) content-box"], |
| 90 "polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) padding-box", | 90 ["polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) padding-box", "polygon(1
0px 10px, 20px 20px, 30px 30px) padding-box"], |
| 91 "polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) border-box", | 91 ["polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) border-box", "polygon(1
0px 10px, 20px 20px, 30px 30px) border-box"], |
| 92 "polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) margin-box", | 92 ["polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) margin-box", "polygon(1
0px 10px, 20px 20px, 30px 30px) margin-box"], |
| 93 | 93 |
| 94 ["content-box polygon(nonzero, 10px 10px, 20px 20px, 30px 30px)", "content-b
ox polygon(nonzero, 10px 10px, 20px 20px, 30px 30px)", "polygon(nonzero, 10px 10
px, 20px 20px, 30px 30px) content-box"], | 94 ["content-box polygon(nonzero, 10px 10px, 20px 20px, 30px 30px)", "content-b
ox polygon(10px 10px, 20px 20px, 30px 30px)", "polygon(10px 10px, 20px 20px, 30p
x 30px) content-box"], |
| 95 ["padding-box polygon(nonzero, 10px 10px, 20px 20px, 30px 30px)", "padding-b
ox polygon(nonzero, 10px 10px, 20px 20px, 30px 30px)", "polygon(nonzero, 10px 10
px, 20px 20px, 30px 30px) padding-box"], | 95 ["padding-box polygon(nonzero, 10px 10px, 20px 20px, 30px 30px)", "padding-b
ox polygon(10px 10px, 20px 20px, 30px 30px)", "polygon(10px 10px, 20px 20px, 30p
x 30px) padding-box"], |
| 96 ["border-box polygon(nonzero, 10px 10px, 20px 20px, 30px 30px)", "border-box
polygon(nonzero, 10px 10px, 20px 20px, 30px 30px)", "polygon(nonzero, 10px 10px
, 20px 20px, 30px 30px) border-box"], | 96 ["border-box polygon(nonzero, 10px 10px, 20px 20px, 30px 30px)", "border-box
polygon(10px 10px, 20px 20px, 30px 30px)", "polygon(10px 10px, 20px 20px, 30px
30px) border-box"], |
| 97 ["margin-box polygon(nonzero, 10px 10px, 20px 20px, 30px 30px)", "margin-box
polygon(nonzero, 10px 10px, 20px 20px, 30px 30px)", "polygon(nonzero, 10px 10px
, 20px 20px, 30px 30px) margin-box"] | 97 ["margin-box polygon(nonzero, 10px 10px, 20px 20px, 30px 30px)", "margin-box
polygon(10px 10px, 20px 20px, 30px 30px)", "polygon(10px 10px, 20px 20px, 30px
30px) margin-box"] |
| 98 ]; | 98 ]; |
| 99 | 99 |
| 100 // Invalid values for both shape-inside and shape-outside. When an invalid shape
value is specified, the | 100 // Invalid values for both shape-inside and shape-outside. When an invalid shape
value is specified, the |
| 101 // shape property's computed value is the same as its default. | 101 // shape property's computed value is the same as its default. |
| 102 var invalidShapeValues = [ | 102 var invalidShapeValues = [ |
| 103 "calc()", | 103 "calc()", |
| 104 "auto", | 104 "auto", |
| 105 | 105 |
| 106 "rectangle()", | 106 "rectangle()", |
| 107 "rectangle(10px)", | 107 "rectangle(10px)", |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 281 |
| 282 function testNotInheritedShapeProperty(property, parentValue, childValue, expect
edValue) | 282 function testNotInheritedShapeProperty(property, parentValue, childValue, expect
edValue) |
| 283 { | 283 { |
| 284 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property +
'", "' + parentValue + '", "' + childValue + '")', expectedValue); | 284 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property +
'", "' + parentValue + '", "' + childValue + '")', expectedValue); |
| 285 } | 285 } |
| 286 | 286 |
| 287 function applyToEachArglist(testFunction, arglists) | 287 function applyToEachArglist(testFunction, arglists) |
| 288 { | 288 { |
| 289 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist);
}); | 289 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist);
}); |
| 290 } | 290 } |
| OLD | NEW |