openGL.init();
} catch(OpenGL.NotSupportedException e) {
Log.log(this,"WARNING: OpenGL support not available: " + e);
- // FIXME: We need to fallback to Quartz2D
+ // FEATURE: fall back to quartz 2d
throw new Error("No OpenGL support");
}
natInit();
protected native InputStream _getBuiltinInputStream();
- // FIXME
protected native Picture _decodeJPEG(InputStream is, String name);
- // FIXME: This could be optimized (a lot) by using a custom hashtable
+ // FEATURE: This could be optimized (a lot) by using a custom hashtable
public final static class Retainer {
private static Hash table = new Hash();
private final static class Key {
public Java2Surface(Box root, boolean framed) { super(root, framed); }
- public void blit(PixelBuffer s, int sx, int sy, int dx, int dy, int dx2, int dy2) {
- if (ourGraphics == null) {
- ourGraphics = window.getGraphics();
-
- // sometimes jdk1.4 doesn't set the clip properly when we're in the middle of a resize
- ourGraphics.setClip(insets.left, insets.top, root.width + insets.left, root.height + insets.top);
- }
- _doDrawImage(window.getGraphics(), ((AWTPixelBuffer)s).i, dx + insets.left, dy + insets.top, dx2 + insets.left, dy2 + insets.top,
- sx, sy, sx + (dx2 - dx), sy + (dy2 - dy), null);
- }
-
protected void _setMinimized(boolean b) {
- if (frame == null) {
- if (Log.on) Log.log(this, "JDK 1.2 can only minimize frames, not windows");
- return;
- }
- if (b) frame.setState(java.awt.Frame.ICONIFIED);
+ if (frame == null) Log.log(this, "JDK 1.2 can only minimize frames, not windows");
+ else if (b) frame.setState(java.awt.Frame.ICONIFIED);
else frame.setState(java.awt.Frame.NORMAL);
}
protected String getDescriptiveName() { return isJava14 ? "Java 1.4+ JVM" : "Java 1.2+ JVM"; }
- protected void _newBrowserWindow(String url) {
- /*
- FIXME
- if (Main.applet == null) {
- if (Log.on) Log.log(this, "Main.applet is null; cannot invoke showDocument()");
- return;
- }
- if (Log.on) Log.log(this, "asking browser to show URL " + url);
- try {
- Main.applet.getAppletContext().showDocument(new URL(url), "_blank");
- } catch (MalformedURLException e) {
- if (Log.on) Log.log(this, e);
- }
- */
- }
-
}
public void init() throws NotSupportedException {
natInit();
float v = parseVersion(version);
- // FIXME: enable linear filtering for OpenGL >= 1.2
+ // FEATURE: enable linear filtering for OpenGL >= 1.2
// If we disable linear filtering (and therefor GL_CLAMP_TO_EDGE) we could probably get by with less
if(v < 1.1) throw new NotSupportedException("OpenGL 1.1 or greater is required. (you have: " + version +" - " + v + ")");
if(pretendToBeACrappyVideoCard) {
*/
public class HTML {
- // FIXME: fill in
- private final static String[] bodylessTags = new String[] { "br", "hr", "input", "img", "isindex" };
+ private final static String[] noEndTag =
+ new String[] { "area", "base", "basefont", "br", "col", "frame", "hr", "img",
+ "input", "isindex", "link", "meta", "param" };
/** we keep a char[] around for use by removeRedundantWhitespace() */
private static char[] cbuf = null;
while(Character.isSpace(cs.peek())) cs.get();
String elementName = parseElementName(cs);
- // FIXME: this might not deal correctly with EOFExceptions
boolean saveWithinLI = withinLI;
if (elementName.equals("li")) {
if (withinLI) {
cs.get();
// bodyless tags return here
- for(int i=0; i<bodylessTags.length; i++)
- if (bodylessTags[i].equals(elementName))
+ for(int i=0; i<noEndTag.length; i++)
+ if (noEndTag[i].equals(elementName))
return null;
// scan body
sb.append("\"");
i = nextamp + 6;
} else if (s.regionMatches(nextamp, " ", 0, 6)) {
- // FIXME: should have a way to indicate this...
+ // FEATURE: perhaps we should distinguish this somehow
sb.append(" ");
i = nextamp + 6;
} else {
return sb.toString();
}
- // FIXME double check this
/** removes all redundant whitespace */
private static String removeRedundantWhitespace(String s) {
fileSize = readLittleInt(dis);
uncompressedOffsetInCFFOLDER = readLittleInt(dis);
folderIndex = readLittleShort(dis);
- readLittleShort(dis); // FIXME: date
- readLittleShort(dis); // FIXME: time
+ readLittleShort(dis); // date
+ readLittleShort(dis); // time
attrs = readLittleShort(dis);
readOnly = (attrs & 0x1) != 0;
hidden = (attrs & 0x2) != 0;