Stylistic tweaks following review comments

This commit is contained in:
Stu Cox
2013-02-26 23:17:34 +00:00
parent 5f6cf2c1e0
commit 6acf06cc54
3 changed files with 7 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
define(function() {
// Helper function for e.g. boxSizing -> box-sizing
function domToHyphenated (name) {
function domToHyphenated( name ) {
return name.replace(/([A-Z])/g, function(str, m1) {
return '-' + m1.toLowerCase();
}).replace(/^ms-/, '-ms-');

View File

@@ -34,9 +34,7 @@ define(['injectElementWithStyles', 'domToHyphenated'], function ( injectElementW
node.currentStyle)['position'] == 'absolute';
});
}
else {
return undefined;
}
return undefined;
}
return nativeTestProps;
});

View File

@@ -28,7 +28,7 @@ define(['contains', 'mStyle', 'createElement', 'nativeTestProps', 'is'], functio
}
// Otherwise do it properly
var afterInit;
var afterInit, i, j, prop, value;
// If we don't have a style element, that means
// we're running async or after the core tests,
@@ -48,15 +48,15 @@ define(['contains', 'mStyle', 'createElement', 'nativeTestProps', 'is'], functio
}
}
for ( var i in props ) {
var prop = props[i];
for ( i in props ) {
prop = props[i];
if ( !contains(prop, "-") && mStyle.style[prop] !== undefined ) {
// If values to test have been passed in, do a set-and-check test
if (!is(values, 'undefined')) {
var j = values.length;
j = values.length;
while (j--) {
var value = values[j];
value = values[j];
mStyle.style[prop] = value;
if (mStyle.style[prop] == value) {
cleanElems();