2003/09/24 07:33:33
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:36:17 +0000 (07:36 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 07:36:17 +0000 (07:36 +0000)
darcs-hash:20040130073617-2ba56-d85940749394d7dbccaacdd1172e18043a639582.gz

src/org/xwt/plat/Darwin.java
src/org/xwt/plat/GCJ.java
src/org/xwt/plat/Java2.java
src/org/xwt/plat/OpenGL.java
src/org/xwt/translators/HTML.java
src/org/xwt/util/CAB.java

index 7a9b749..0812a3d 100644 (file)
@@ -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();
index 1a7c41b..028f0ba 100644 (file)
@@ -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 {
index fac1213..28522d1 100644 (file)
@@ -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);
-        }
-        */
-    }
-
 }
index 6e89350..9f6d669 100644 (file)
@@ -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) {
index b8ece56..bd6f350 100644 (file)
@@ -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<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
@@ -270,7 +270,7 @@ public class HTML {
                 sb.append("\"");
                 i = nextamp + 6;
             } else if (s.regionMatches(nextamp, "&nbsp;", 0, 6)) {
-                // FIXME: should have a way to indicate this...
+                // FEATURE: perhaps we should distinguish this somehow
                 sb.append(" ");
                 i = nextamp + 6;
             } else {
@@ -281,7 +281,6 @@ public class HTML {
         return sb.toString();
     }
 
-    // FIXME double check this
     /** removes all redundant whitespace */
     private static String removeRedundantWhitespace(String s) {
 
index ebea9c1..529bdae 100644 (file)
@@ -262,8 +262,8 @@ public class CAB {
             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;