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 | 9 |
10 ["inset(10px)", "inset(10px 10px 10px 10px)", "inset(10px 10px 10px 10px rou
nd 0px 0px 0px 0px / 0px 0px 0px 0px)"], | 10 ["inset(10px)", "inset(10px 10px 10px 10px)", "inset(10px 10px 10px 10px rou
nd 0px 0px 0px 0px / 0px 0px 0px 0px)"], |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 // Valid length values for shape-margin and shape-padding. | 156 // Valid length values for shape-margin and shape-padding. |
157 var validShapeLengths = [ | 157 var validShapeLengths = [ |
158 "1.5ex", | 158 "1.5ex", |
159 "2em", | 159 "2em", |
160 "2.5in", | 160 "2.5in", |
161 "3cm", | 161 "3cm", |
162 "3.5mm", | 162 "3.5mm", |
163 "4pt", | 163 "4pt", |
164 "4.5pc", | 164 "4.5pc", |
165 "5px" | 165 "5px", |
| 166 "120%" |
166 ]; | 167 ]; |
167 | 168 |
168 // Invalid length values for shape-margin and shape-padding. | 169 // Invalid length values for shape-margin and shape-padding. |
169 var invalidShapeLengths = [ | 170 var invalidShapeLengths = [ |
170 "-5px", | 171 "-5px", |
171 "none", | 172 "none", |
172 "120%", | |
173 "\'string\'" | 173 "\'string\'" |
174 ]; | 174 ]; |
175 | 175 |
176 function getCSSText(property, value) | 176 function getCSSText(property, value) |
177 { | 177 { |
178 var element = document.createElement("div"); | 178 var element = document.createElement("div"); |
179 element.style.cssText = property + ": " + value; | 179 element.style.cssText = property + ": " + value; |
180 return element.style[property]; | 180 return element.style[property]; |
181 } | 181 } |
182 | 182 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 | 254 |
255 function testNotInheritedShapeProperty(property, parentValue, childValue, expect
edValue) | 255 function testNotInheritedShapeProperty(property, parentValue, childValue, expect
edValue) |
256 { | 256 { |
257 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property +
'", "' + parentValue + '", "' + childValue + '")', expectedValue); | 257 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property +
'", "' + parentValue + '", "' + childValue + '")', expectedValue); |
258 } | 258 } |
259 | 259 |
260 function applyToEachArglist(testFunction, arglists) | 260 function applyToEachArglist(testFunction, arglists) |
261 { | 261 { |
262 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist);
}); | 262 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist);
}); |
263 } | 263 } |
OLD | NEW |