projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
UNDO: backed out broken part of 500 fix
[org.ibex.core.git]
/
src
/
org
/
ibex
/
Box.java
diff --git
a/src/org/ibex/Box.java
b/src/org/ibex/Box.java
index
180a652
..
524cb7c
100644
(file)
--- a/
src/org/ibex/Box.java
+++ b/
src/org/ibex/Box.java
@@
-218,7
+218,7
@@
public final class Box extends JSScope implements Scheduler.Task {
private static LENGTH[] colMaxWidth = new LENGTH[65535];
private static LENGTH[] rowHeight = new LENGTH[65535];
private static LENGTH[] rowMaxHeight = new LENGTH[65535];
private static LENGTH[] colMaxWidth = new LENGTH[65535];
private static LENGTH[] rowHeight = new LENGTH[65535];
private static LENGTH[] rowMaxHeight = new LENGTH[65535];
- static { for(int i=0; i<rowMaxHeight.length; i++) { rowMaxHeight[i] = 0; colMaxWidth[i] = 0; } }
+ static { for(int i=0; i<rowMaxHeight.length; i++) { rowMaxHeight[i] = MAX_LENGTH; colMaxWidth[i] = MAX_LENGTH; } }
Box nextPackedSibling() { Box b = nextSibling(); return b == null || (b.test(PACKED | VISIBLE)) ? b : b.nextPackedSibling(); }
Box firstPackedChild() { Box b = getChild(0); return b == null || (b.test(PACKED | VISIBLE)) ? b : b.nextPackedSibling(); }
Box nextPackedSibling() { Box b = nextSibling(); return b == null || (b.test(PACKED | VISIBLE)) ? b : b.nextPackedSibling(); }
Box firstPackedChild() { Box b = getChild(0); return b == null || (b.test(PACKED | VISIBLE)) ? b : b.nextPackedSibling(); }
@@
-302,7
+302,7
@@
public final class Box extends JSScope implements Scheduler.Task {
x_slack += colWidth[i];
colWidth[i] = max(colWidth[i], child.contentwidth / child.colspan);
x_slack -= colWidth[i];
x_slack += colWidth[i];
colWidth[i] = max(colWidth[i], child.contentwidth / child.colspan);
x_slack -= colWidth[i];
- colMaxWidth[i] = max(colMaxWidth[i], (child.test(HSHRINK) ? child.contentwidth : child.maxwidth) / child.colspan);
+ colMaxWidth[i] = min(colMaxWidth[i], child.test(HSHRINK) ? child.contentwidth : child.maxwidth) / child.colspan;
}
// PHASE 2: hand out slack
}
// PHASE 2: hand out slack
@@
-348,8
+348,8
@@
public final class Box extends JSScope implements Scheduler.Task {
}
// cleanup
}
// cleanup
- for(int i=0; i<cols; i++) { colWidth[i] = 0; colMaxWidth[i] = 0; }
- for(int i=0; i<rows; i++) { rowHeight[i] = 0; rowMaxHeight[i] = 0; }
+ for(int i=0; i<cols; i++) { colWidth[i] = 0; colMaxWidth[i] = MAX_LENGTH; }
+ for(int i=0; i<rows; i++) { rowHeight[i] = 0; rowMaxHeight[i] = MAX_LENGTH; }
for(Box child = getChild(0); child != null; child = child.nextSibling())
if (test(VISIBLE))
for(Box child = getChild(0); child != null; child = child.nextSibling())
if (test(VISIBLE))
@@
-685,6
+685,7
@@
public final class Box extends JSScope implements Scheduler.Task {
fillcolor = newfillcolor;
} else if(value instanceof JS) {
texture = Picture.load((JS)value, this);
fillcolor = newfillcolor;
} else if(value instanceof JS) {
texture = Picture.load((JS)value, this);
+ if (texture != null) perform();
} else {
throw new JSExn("fill must be null, a String, or a stream, not a " + value.getClass());
}
} else {
throw new JSExn("fill must be null, a String, or a stream, not a " + value.getClass());
}