From d9fdc968988212807221d0d71d2fb6dc19cb87a3 Mon Sep 17 00:00:00 2001 From: megacz Date: Fri, 30 Jan 2004 07:36:17 +0000 Subject: [PATCH] 2003/09/24 07:33:33 darcs-hash:20040130073617-2ba56-d85940749394d7dbccaacdd1172e18043a639582.gz --- src/org/xwt/plat/Darwin.java | 2 +- src/org/xwt/plat/GCJ.java | 3 +-- src/org/xwt/plat/Java2.java | 34 ++-------------------------------- src/org/xwt/plat/OpenGL.java | 2 +- src/org/xwt/translators/HTML.java | 13 ++++++------- src/org/xwt/util/CAB.java | 4 ++-- 6 files changed, 13 insertions(+), 45 deletions(-) diff --git a/src/org/xwt/plat/Darwin.java b/src/org/xwt/plat/Darwin.java index 7a9b749..0812a3d 100644 --- a/src/org/xwt/plat/Darwin.java +++ b/src/org/xwt/plat/Darwin.java @@ -89,7 +89,7 @@ public class Darwin extends POSIX { 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(); diff --git a/src/org/xwt/plat/GCJ.java b/src/org/xwt/plat/GCJ.java index 1a7c41b..028f0ba 100644 --- a/src/org/xwt/plat/GCJ.java +++ b/src/org/xwt/plat/GCJ.java @@ -21,10 +21,9 @@ public abstract class GCJ extends Platform { 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 { diff --git a/src/org/xwt/plat/Java2.java b/src/org/xwt/plat/Java2.java index fac1213..28522d1 100644 --- a/src/org/xwt/plat/Java2.java +++ b/src/org/xwt/plat/Java2.java @@ -137,23 +137,9 @@ public class Java2 extends AWT { 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); } @@ -279,20 +265,4 @@ public class Java2 extends AWT { 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); - } - */ - } - } diff --git a/src/org/xwt/plat/OpenGL.java b/src/org/xwt/plat/OpenGL.java index 6e89350..9f6d669 100644 --- a/src/org/xwt/plat/OpenGL.java +++ b/src/org/xwt/plat/OpenGL.java @@ -30,7 +30,7 @@ abstract class OpenGL { 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) { diff --git a/src/org/xwt/translators/HTML.java b/src/org/xwt/translators/HTML.java index b8ece56..bd6f350 100644 --- a/src/org/xwt/translators/HTML.java +++ b/src/org/xwt/translators/HTML.java @@ -37,8 +37,9 @@ import org.xwt.util.*; */ 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; @@ -87,7 +88,6 @@ public class HTML { 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) { @@ -119,8 +119,8 @@ public class HTML { cs.get(); // bodyless tags return here - for(int i=0; i