File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,11 @@ $WTC$$.registerCSS = function (clazzName, cssText) {
178178 var location = window . location . href . toString ( ) ;
179179 //if (protocol == "file:" || host == "") {
180180 var idx = location . lastIndexOf ( "/" ) ;
181- if ( idx != - 1 ) {
181+ if ( idx != - 1 && prefix . indexOf ( "http://" ) != 0
182+ && prefix . indexOf ( "https://" ) != 0
183+ && prefix . indexOf ( "file://" ) != 0
184+ && prefix . indexOf ( "ftp://" ) != 0
185+ && prefix . indexOf ( "javascript://" ) != 0 ) {
182186 prefix = location . substring ( 0 , idx + 1 ) + prefix ;
183187 }
184188 //}
@@ -273,18 +277,18 @@ $wt = org.eclipse.swt;
273277 ClazzLoader . registerPackages ( "org.eclipse.swt" , [
274278 "accessibility" ,
275279 "browser" ,
276- "custom" ,
280+ "custom" ,
277281 "dnd" ,
278- "events" ,
282+ "events" ,
279283 "graphics" ,
280- "internal" ,
281- "internal.dnd" ,
282- "internal.browser" ,
283- "internal.struct" ,
284+ "internal" ,
285+ "internal.dnd" ,
286+ "internal.browser" ,
287+ "internal.struct" ,
284288 "layout" ,
285289 "printing" ,
286290 "program" ,
287- "widgets" ] ) ;
291+ "widgets" ] ) ;
288292
289293 var path = ClazzLoader . getClasspathFor ( "org.eclipse.swt.*" ) ;
290294
You can’t perform that action at this time.
0 commit comments