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)", | 10 "inset(10px)", |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 // Valid length values for shape-margin and shape-padding. | 164 // Valid length values for shape-margin and shape-padding. |
165 var validShapeLengths = [ | 165 var validShapeLengths = [ |
166 "1.5ex", | 166 "1.5ex", |
167 "2em", | 167 "2em", |
168 "2.5in", | 168 "2.5in", |
169 "3cm", | 169 "3cm", |
170 "3.5mm", | 170 "3.5mm", |
171 "4pt", | 171 "4pt", |
172 "4.5pc", | 172 "4.5pc", |
173 "5px" | 173 "5px", |
| 174 "120%" |
174 ]; | 175 ]; |
175 | 176 |
176 // Invalid length values for shape-margin and shape-padding. | 177 // Invalid length values for shape-margin and shape-padding. |
177 var invalidShapeLengths = [ | 178 var invalidShapeLengths = [ |
178 "-5px", | 179 "-5px", |
179 "none", | 180 "none", |
180 "120%", | |
181 "\'string\'" | 181 "\'string\'" |
182 ]; | 182 ]; |
183 | 183 |
184 function getCSSText(property, value) | 184 function getCSSText(property, value) |
185 { | 185 { |
186 var element = document.createElement("div"); | 186 var element = document.createElement("div"); |
187 element.style.cssText = property + ": " + value; | 187 element.style.cssText = property + ": " + value; |
188 return element.style[property]; | 188 return element.style[property]; |
189 } | 189 } |
190 | 190 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 262 |
263 function testNotInheritedShapeProperty(property, parentValue, childValue, expect
edValue) | 263 function testNotInheritedShapeProperty(property, parentValue, childValue, expect
edValue) |
264 { | 264 { |
265 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property +
'", "' + parentValue + '", "' + childValue + '")', expectedValue); | 265 shouldBeEqualToString('getParentAndChildComputedStylesString("' + property +
'", "' + parentValue + '", "' + childValue + '")', expectedValue); |
266 } | 266 } |
267 | 267 |
268 function applyToEachArglist(testFunction, arglists) | 268 function applyToEachArglist(testFunction, arglists) |
269 { | 269 { |
270 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist);
}); | 270 arglists.forEach(function(arglist, i, a) {testFunction.apply(null, arglist);
}); |
271 } | 271 } |
OLD | NEW |