[minijoe] r66 committed - background image fix

0 views
Skip to first unread message

min...@googlecode.com

unread,
Feb 16, 2010, 9:24:22 PM2/16/10
to min...@googlegroups.com
Revision: 66
Author: stefan.haustein
Date: Tue Feb 16 18:23:23 2010
Log: background image fix
http://code.google.com/p/minijoe/source/detail?r=66

Modified:
/trunk/src/com/google/minijoe/html/css/Style.java

=======================================
--- /trunk/src/com/google/minijoe/html/css/Style.java Mon Feb 15 16:34:01
2010
+++ /trunk/src/com/google/minijoe/html/css/Style.java Tue Feb 16 18:23:23
2010
@@ -1028,9 +1028,12 @@
case CssTokenizer.TT_URI:
if (id == MULTIVALUE_BACKGROUND |
| "background-image".equals(name)) {
backgroundImage = new Image[1];
- backgroundImage[0] = (Image)
- tokenizer.htmlWidget.getResource(tokenizer.sval,
+ Image bg = (Image)
tokenizer.htmlWidget.getResource(tokenizer.sval,
SystemRequestHandler.TYPE_IMAGE, backgroundImage);
+ // null check necessary to avoid overwriting image
inserted in a separate thread!
+ if (bg != null) {
+ backgroundImage[0] = bg;
+ }
}
break;

@@ -1140,6 +1143,10 @@
System.out.println("; ");
}
}
+ if (backgroundImage != null && backgroundImage[0] != null) {
+ System.out.println(indent + "background-image: [w:" +
backgroundImage[0].getWidth() +
+ " h:" + backgroundImage[0].getHeight() + "]");
+ }
System.out.println("/* specifity: " + specificity + " */");
}

Reply all
Reply to author
Forward
0 new messages