| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 ["ellipse(at 10px 10px)", "ellipse(at 10px 10px)", "ellipse(closest-side clo
sest-side at 10px 10px)"], | 68 ["ellipse(at 10px 10px)", "ellipse(at 10px 10px)", "ellipse(closest-side clo
sest-side at 10px 10px)"], |
| 69 ["ellipse(at top left)", "ellipse(at 0% 0%)", "ellipse(closest-side closest-
side at 0% 0%)"], | 69 ["ellipse(at top left)", "ellipse(at 0% 0%)", "ellipse(closest-side closest-
side at 0% 0%)"], |
| 70 ["ellipse(at right bottom)", "ellipse(at 100% 100%)", "ellipse(closest-side
closest-side at 100% 100%)"], | 70 ["ellipse(at right bottom)", "ellipse(at 100% 100%)", "ellipse(closest-side
closest-side at 100% 100%)"], |
| 71 ["ellipse(10px at left top 10px)", "ellipse(10px at left 0% top 10px)", "ell
ipse(10px closest-side at 0% 10px)"], | 71 ["ellipse(10px at left top 10px)", "ellipse(10px at left 0% top 10px)", "ell
ipse(10px closest-side at 0% 10px)"], |
| 72 ["ellipse(10px at top 10px left 10px)", "ellipse(10px at left 10px top 10px)
", "ellipse(10px closest-side at 10px 10px)"], | 72 ["ellipse(10px at top 10px left 10px)", "ellipse(10px at left 10px top 10px)
", "ellipse(10px closest-side at 10px 10px)"], |
| 73 ["ellipse(10px at right 10px bottom 10px)", "ellipse(10px at right 10px bott
om 10px)", "ellipse(10px closest-side at right 10px bottom 10px)"], | 73 ["ellipse(10px at right 10px bottom 10px)", "ellipse(10px at right 10px bott
om 10px)", "ellipse(10px closest-side at right 10px bottom 10px)"], |
| 74 ["ellipse(10px 20px at left top 10px)", "ellipse(10px 20px at left 0% top 10
px)", "ellipse(10px 20px at 0% 10px)"], | 74 ["ellipse(10px 20px at left top 10px)", "ellipse(10px 20px at left 0% top 10
px)", "ellipse(10px 20px at 0% 10px)"], |
| 75 ["ellipse(10px 20px at top 10px left 10px)", "ellipse(10px 20px at left 10px
top 10px)", "ellipse(10px 20px at 10px 10px)"], | 75 ["ellipse(10px 20px at top 10px left 10px)", "ellipse(10px 20px at left 10px
top 10px)", "ellipse(10px 20px at 10px 10px)"], |
| 76 ["ellipse(10px 20px at right 10px bottom 10px)", "ellipse(10px 20px at right
10px bottom 10px)"], | 76 ["ellipse(10px 20px at right 10px bottom 10px)", "ellipse(10px 20px at right
10px bottom 10px)"], |
| 77 | 77 |
| 78 ["polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30
px 40px, 40px 50px)"], | 78 ["polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(10px 20px, 30px 40px,
40px 50px)"], |
| 79 ["polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px
20px, 30px 40px, 40px 50px)"], | 79 ["polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px
20px, 30px 40px, 40px 50px)"], |
| 80 ["polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px
20px, 30px 40px, 40px 50px)"], | 80 ["polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)", "polygon(10px 20px, 30
px 40px, 40px 50px)"], |
| 81 | 81 |
| 82 "content-box", | 82 "content-box", |
| 83 "padding-box", | 83 "padding-box", |
| 84 "border-box", | 84 "border-box", |
| 85 "margin-box", | 85 "margin-box", |
| 86 | 86 |
| 87 "polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) content-box", | 87 ["polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) content-box", "polygon(1
0px 10px, 20px 20px, 30px 30px) content-box"], |
| 88 "polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) padding-box", | 88 ["polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) padding-box", "polygon(1
0px 10px, 20px 20px, 30px 30px) padding-box"], |
| 89 "polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) border-box", | 89 ["polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) border-box", "polygon(1
0px 10px, 20px 20px, 30px 30px) border-box"], |
| 90 "polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) margin-box", | 90 ["polygon(nonzero, 10px 10px, 20px 20px, 30px 30px) margin-box", "polygon(1
0px 10px, 20px 20px, 30px 30px) margin-box"], |
| 91 | 91 |
| 92 ["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"], | 92 ["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"], |
| 93 ["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"], | 93 ["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"], |
| 94 ["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"], | 94 ["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"], |
| 95 ["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"] | 95 ["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"] |
| 96 ]; | 96 ]; |
| 97 | 97 |
| 98 // Invalid values for both shape-inside and shape-outside. When an invalid shape
value is specified, the | 98 // Invalid values for both shape-inside and shape-outside. When an invalid shape
value is specified, the |
| 99 // shape property's computed value is the same as its default. | 99 // shape property's computed value is the same as its default. |
| 100 var invalidShapeValues = [ | 100 var invalidShapeValues = [ |
| 101 "calc()", | 101 "calc()", |
| 102 "auto", | 102 "auto", |
| 103 | 103 |
| 104 "rectangle()", | 104 "rectangle()", |
| 105 "rectangle(10px)", | 105 "rectangle(10px)", |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 279 |
| 280 function testNotInheritedShapeProperty(property, parentValue, childValue, expect
edValue) | 280 function testNotInheritedShapeProperty(property, parentValue, childValue, expect
edValue) |
| 281 { | 281 { |
| 282 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property +
'", "' + parentValue + '", "' + childValue + '")', expectedValue); | 282 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property +
'", "' + parentValue + '", "' + childValue + '")', expectedValue); |
| 283 } | 283 } |
| 284 | 284 |
| 285 function applyToEachArglist(testFunction, arglists) | 285 function applyToEachArglist(testFunction, arglists) |
| 286 { | 286 { |
| 287 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist);
}); | 287 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist);
}); |
| 288 } | 288 } |
| OLD | NEW |