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 "auto", | 8 "auto", |
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)"], |
11 "rectangle(10px, 20px, 30px, 40px, 5px, 10px)", | 11 "rectangle(10px, 20px, 30px, 40px, 5px, 10px)", |
12 | 12 |
13 ["inset-rectangle(10px, 20px, 30px, 40px)", "inset-rectangle(10px, 20px, 30p
x, 40px)", "inset-rectangle(10px, 20px, 30px, 40px, 0px, 0px)"], | 13 ["inset-rectangle(10px, 20px, 30px, 40px)", "inset-rectangle(10px, 20px, 30p
x, 40px)", "inset-rectangle(10px, 20px, 30px, 40px, 0px, 0px)"], |
14 ["inset-rectangle(10px, 20px, 30px, 40px, 5px)", "inset-rectangle(10px, 20px
, 30px, 40px, 5px)", "inset-rectangle(10px, 20px, 30px, 40px, 5px, 5px)"], | 14 ["inset-rectangle(10px, 20px, 30px, 40px, 5px)", "inset-rectangle(10px, 20px
, 30px, 40px, 5px)", "inset-rectangle(10px, 20px, 30px, 40px, 5px, 5px)"], |
15 "inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)", | 15 "inset-rectangle(10px, 20px, 30px, 40px, 5px, 10px)", |
16 | 16 |
17 "circle(10px, 20px, 30px)", // FIXME remove with deprecated circle | 17 "circle(10px, 20px, 30px)", // FIXME: Remove this test once we do not suppor
t the deprecated CSS Shapes syntax anymore. |
18 | 18 |
19 ["circle()", "circle()", "circle(closest-side at 50% 50%)"], | 19 ["circle()", "circle()", "circle(closest-side at 50% 50%)"], |
20 ["circle(10px)", "circle(10px)", "circle(10px at 50% 50%)"], | 20 ["circle(10px)", "circle(10px)", "circle(10px at 50% 50%)"], |
21 ["circle(10px at 10px)", "circle(10px at 10px 50%)"], | 21 ["circle(10px at 10px)", "circle(10px at 10px 50%)"], |
22 "circle(10px at 10px 10px)", | 22 "circle(10px at 10px 10px)", |
23 ["circle(at 10px)", "circle(at 10px 50%)", "circle(closest-side at 10px 50%)
"], | 23 ["circle(at 10px)", "circle(at 10px 50%)", "circle(closest-side at 10px 50%)
"], |
24 ["circle(at 10px)", "circle(at 10px 50%)", "circle(closest-side at 10px 50%)
"], | |
25 ["circle(at 10px 10px)", "circle(at 10px 10px)", "circle(closest-side at 10p
x 10px)"], | 24 ["circle(at 10px 10px)", "circle(at 10px 10px)", "circle(closest-side at 10p
x 10px)"], |
26 ["circle(at top left)", "circle(at 0% 0%)", "circle(closest-side at 0% 0%)"]
, | 25 ["circle(at top left)", "circle(at 0% 0%)", "circle(closest-side at 0% 0%)"]
, |
27 ["circle(at right bottom)", "circle(at 100% 100%)", "circle(closest-side at
100% 100%)"], | 26 ["circle(at right bottom)", "circle(at 100% 100%)", "circle(closest-side at
100% 100%)"], |
28 ["circle(10px at left top 10px)", "circle(10px at left 0% top 10px)"], | 27 ["circle(10px at left top 10px)", "circle(10px at left 0% top 10px)"], |
29 ["circle(10px at top 10px left 10px)", "circle(10px at left 10px top 10px)"]
, | 28 ["circle(10px at top 10px left 10px)", "circle(10px at left 10px top 10px)"]
, |
30 ["circle(10px at right 10px bottom 10px)", "circle(10px at right 10px bottom
10px)"], | 29 ["circle(10px at right 10px bottom 10px)", "circle(10px at right 10px bottom
10px)"], |
31 | 30 |
32 "ellipse(10px, 20px, 30px, 40px)", | 31 "ellipse(10px, 20px, 30px, 40px)", // FIXME: Remove this test once we do not
support the deprecated CSS Shapes syntax anymore. |
| 32 |
| 33 ["ellipse()", "ellipse()", "ellipse(closest-side closest-side at 50% 50%)"], |
| 34 ["ellipse(10px)", "ellipse(10px)", "ellipse(10px closest-side at 50% 50%)"], |
| 35 ["ellipse(10px 20px)", "ellipse(10px 20px)", "ellipse(10px 20px at 50% 50%)"
], |
| 36 ["ellipse(10px at 10px)", "ellipse(10px at 10px 50%)", "ellipse(10px closest
-side at 10px 50%)"], |
| 37 ["ellipse(10px 20px at 10px)", "ellipse(10px 20px at 10px 50%)"], |
| 38 ["ellipse(10px at 10px 10px)", "ellipse(10px at 10px 10px)", "ellipse(10px c
losest-side at 10px 10px)"], |
| 39 ["ellipse(at 10px)", "ellipse(at 10px 50%)", "ellipse(closest-side closest-s
ide at 10px 50%)"], |
| 40 ["ellipse(at 10px 10px)", "ellipse(at 10px 10px)", "ellipse(closest-side clo
sest-side at 10px 10px)"], |
| 41 ["ellipse(at top left)", "ellipse(at 0% 0%)", "ellipse(closest-side closest-
side at 0% 0%)"], |
| 42 ["ellipse(at right bottom)", "ellipse(at 100% 100%)", "ellipse(closest-side
closest-side at 100% 100%)"], |
| 43 ["ellipse(10px at left top 10px)", "ellipse(10px at left 0% top 10px)", "ell
ipse(10px closest-side at left 0% top 10px)"], |
| 44 ["ellipse(10px at top 10px left 10px)", "ellipse(10px at left 10px top 10px)
", "ellipse(10px closest-side at left 10px top 10px)"], |
| 45 ["ellipse(10px at right 10px bottom 10px)", "ellipse(10px at right 10px bott
om 10px)", "ellipse(10px closest-side at right 10px bottom 10px)"], |
| 46 ["ellipse(10px 20px at left top 10px)", "ellipse(10px 20px at left 0% top 10
px)"], |
| 47 ["ellipse(10px 20px at top 10px left 10px)", "ellipse(10px 20px at left 10px
top 10px)"], |
| 48 ["ellipse(10px 20px at right 10px bottom 10px)", "ellipse(10px 20px at right
10px bottom 10px)"], |
33 | 49 |
34 ["polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30
px 40px, 40px 50px)"], | 50 ["polygon(10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px 20px, 30
px 40px, 40px 50px)"], |
35 ["polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px
20px, 30px 40px, 40px 50px)"], | 51 ["polygon(evenodd, 10px 20px, 30px 40px, 40px 50px)", "polygon(evenodd, 10px
20px, 30px 40px, 40px 50px)"], |
36 ["polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px
20px, 30px 40px, 40px 50px)"], | 52 ["polygon(nonzero, 10px 20px, 30px 40px, 40px 50px)", "polygon(nonzero, 10px
20px, 30px 40px, 40px 50px)"], |
37 | 53 |
38 "content-box", | 54 "content-box", |
39 "padding-box", | 55 "padding-box", |
40 "border-box", | 56 "border-box", |
41 "margin-box", | 57 "margin-box", |
42 | 58 |
(...skipping 21 matching lines...) Expand all Loading... |
64 "rectangle(10px 20px 30px 40px)", | 80 "rectangle(10px 20px 30px 40px)", |
65 "rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)", | 81 "rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)", |
66 | 82 |
67 "inset-rectangle()", | 83 "inset-rectangle()", |
68 "inset-rectangle(10px)", | 84 "inset-rectangle(10px)", |
69 "inset-rectangle(10px, 10px)", | 85 "inset-rectangle(10px, 10px)", |
70 "inset-rectangle(10px, 20px, 30px)", | 86 "inset-rectangle(10px, 20px, 30px)", |
71 "inset-rectangle(10px 20px 30px 40px)", | 87 "inset-rectangle(10px 20px 30px 40px)", |
72 "inset-rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)", | 88 "inset-rectangle(10px, 20px, 30px, 40px, 50px, 60px, 70px)", |
73 | 89 |
74 "circle(10px, 20px)", // FIXME remove with deprecated circle | 90 "circle(10px, 20px)", // FIXME: Remove this test once we do not support the
deprecated CSS Shapes syntax anymore. |
75 "circle(10px 20px 30px)", // FIXME remove with deprecated circle | 91 "circle(10px 20px 30px)", // FIXME: Remove this test once we do not support
the deprecated CSS Shapes syntax anymore. |
76 "circle(10px, 20px, 30px, 40px)", // FIXME remove with deprecated circle | 92 "circle(10px, 20px, 30px, 40px)", // FIXME: Remove this test once we do not
support the deprecated CSS Shapes syntax anymore. |
77 | 93 |
78 "circle(10px 20px)", | 94 "circle(10px 20px)", |
79 "circle(10px at 10px 10px 10px)", | 95 "circle(10px at 10px 10px 10px)", |
80 "circle(10px at 10px 10px at center)", | 96 "circle(10px at 10px 10px at center)", |
81 "circle(10px at center center 10px)", | 97 "circle(10px at center center 10px)", |
82 "circle(at 10px 10px 10px)", | 98 "circle(at 10px 10px 10px)", |
83 "circle(at 10px 10px at center)", | 99 "circle(at 10px 10px at center)", |
84 "circle(at center center 10px)", | 100 "circle(at center center 10px)", |
85 | 101 |
86 "ellipse()", | 102 "ellipse(10px, 20px)", // FIXME: Remove this test once we do not support the
deprecated CSS Shapes syntax anymore. |
87 "ellipse(10px)", | 103 "ellipse(10px, 20px, 30px)", // FIXME: Remove this test once we do not suppo
rt the deprecated CSS Shapes syntax anymore. |
88 "ellipse(10px, 20px)", | 104 "ellipse(10px 20px 30px 40px)", // FIXME: Remove this test once we do not su
pport the deprecated CSS Shapes syntax anymore. |
89 "ellipse(10px, 20px, 30px)", | 105 |
90 "ellipse(10px 20px 30px 40px)", | 106 "ellipse(10px 20px 30px)", |
| 107 "ellipse(10px at 10px 10px 10px)", |
| 108 "ellipse(10px at 10px 10px at center)", |
| 109 "ellipse(10px at center center 10px)", |
| 110 "ellipse(10px 20px 30px at center center 10px)", |
| 111 "ellipse(at 10px 10px 10px)", |
| 112 "ellipse(at 10px 10px at center)", |
| 113 "ellipse(at center center 10px)", |
91 | 114 |
92 "polygon()", | 115 "polygon()", |
93 "polygon(evenodd 10px 20px, 30px 40px, 40px 50px)", | 116 "polygon(evenodd 10px 20px, 30px 40px, 40px 50px)", |
94 "polygon(nonzero 10px 20px, 30px 40px, 40px 50px)", | 117 "polygon(nonzero 10px 20px, 30px 40px, 40px 50px)", |
95 "polygon(nonzero)", | 118 "polygon(nonzero)", |
96 "polygon(evenodd)", | 119 "polygon(evenodd)", |
97 "polygon(10px)", | 120 "polygon(10px)", |
98 "polygon(nonzero,10px)", | 121 "polygon(nonzero,10px)", |
99 "polygon(evenodd,12px)", | 122 "polygon(evenodd,12px)", |
100 "polygon(10px, 20px, 30px, 40px, 40px, 50px)", | 123 "polygon(10px, 20px, 30px, 40px, 40px, 50px)", |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 235 |
213 function testNotInheritedShapeProperty(property, parentValue, childValue, expect
edValue) | 236 function testNotInheritedShapeProperty(property, parentValue, childValue, expect
edValue) |
214 { | 237 { |
215 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property +
'", "' + parentValue + '", "' + childValue + '")', expectedValue); | 238 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property +
'", "' + parentValue + '", "' + childValue + '")', expectedValue); |
216 } | 239 } |
217 | 240 |
218 function applyToEachArglist(testFunction, arglists) | 241 function applyToEachArglist(testFunction, arglists) |
219 { | 242 { |
220 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist);
}); | 243 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist);
}); |
221 } | 244 } |
OLD | NEW |