@@ -90,23 +90,13 @@ function assertJasmineSuites() {
90
90
91
91
/*
92
92
* tests about the contents of source (and lib) files:
93
- * - check that we don't have any features that break in IE
94
93
* - check that we don't use getComputedStyle unexpectedly
95
94
* - check that require statements use lowercase (to match assertFileNames)
96
95
* or match the case of the source file
97
96
*/
98
97
function assertSrcContents ( ) {
99
98
var logs = [ ] ;
100
99
101
- // These are forbidden in IE *only in SVG* but since
102
- // that's 99% of what we do here, we'll forbid them entirely
103
- // until there's some HTML use case where we need them.
104
- // (not sure what we'd do then, but we'd think of something!)
105
- var IE_SVG_BLACK_LIST = [ 'innerHTML' , 'parentElement' , 'children' ] ;
106
-
107
- // Forbidden in IE in any context
108
- var IE_BLACK_LIST = [ 'classList' ] ;
109
-
110
100
// require'd built-in modules
111
101
var BUILTINS = [ 'events' ] ;
112
102
@@ -122,28 +112,8 @@ function assertSrcContents() {
122
112
// look for .classList
123
113
if ( node . type === 'MemberExpression' ) {
124
114
var source = node . source ( ) ;
125
- var parts = source . split ( '.' ) ;
126
- var lastPart = parts [ parts . length - 1 ] ;
127
-
128
- if ( source === 'Math.sign' ) {
129
- logs . push ( file + ' : contains Math.sign (IE failure)' ) ;
130
- } else if ( source === 'window.getComputedStyle' ) {
115
+ if ( source === 'window.getComputedStyle' ) {
131
116
getComputedStyleCnt ++ ;
132
- } else if ( IE_BLACK_LIST . indexOf ( lastPart ) !== - 1 ) {
133
- logs . push ( file + ' : contains .' + lastPart + ' (IE failure)' ) ;
134
- } else if ( IE_SVG_BLACK_LIST . indexOf ( lastPart ) !== - 1 ) {
135
- // add special case for sunburst, icicle and treemap where we use 'children'
136
- // off the d3-hierarchy output
137
- var dirParts = path . dirname ( file ) . split ( path . sep ) ;
138
- var filename = dirParts [ dirParts . length - 1 ] ;
139
- var isSunburstOrIcicleOrTreemap =
140
- filename === 'sunburst' ||
141
- filename === 'icicle' ||
142
- filename === 'treemap' ;
143
- var isLinkedToObject = [ 'pt' , 'd' , 'parent' , 'node' ] . indexOf ( parts [ parts . length - 2 ] ) !== - 1 ;
144
- if ( ! ( isSunburstOrIcicleOrTreemap && isLinkedToObject ) ) {
145
- logs . push ( file + ' : contains .' + lastPart + ' (IE failure in SVG)' ) ;
146
- }
147
117
}
148
118
} else if ( node . type === 'Identifier' && node . source ( ) === 'getComputedStyle' ) {
149
119
if ( node . parent . source ( ) !== 'window.getComputedStyle' ) {
0 commit comments