aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-05-14 16:01:32 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-05-14 16:01:32 +0000
commit589b0bde0a07b3759eba854b4c2a5991a958f6c4 (patch)
treeae5b34288b175722b1328471a05c6c3a5c72ce79
parent[w3m-dev 03901] body with status-code 401 (diff)
downloadw3m-589b0bde0a07b3759eba854b4c2a5991a958f6c4.tar.gz
w3m-589b0bde0a07b3759eba854b4c2a5991a958f6c4.zip
[w3m-dev 03902] Re: table rendering
* table.c (check_relative_width): check n_leftcell check w <= r From: Akinori Ito <aito@fw.ipsj.or.jp>
-rw-r--r--ChangeLog8
-rw-r--r--table.c14
2 files changed, 18 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d5c2513..52c1186 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-05-15 Akinori Ito <aito@fw.ipsj.or.jp>
+
+ * [w3m-dev 03902] Re: table rendering
+ * table.c (check_relative_width): check n_leftcell
+ check w <= r
+
2003-05-14 ABE Yuji <cbo46560@pop12.odn.ne.jp>
* [w3m-dev 03901] body with status-code 401
@@ -7838,4 +7844,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.839 2003/05/13 17:38:47 ukai Exp $
+$Id: ChangeLog,v 1.840 2003/05/14 16:01:32 ukai Exp $
diff --git a/table.c b/table.c
index e1fa6ba..f03bc60 100644
--- a/table.c
+++ b/table.c
@@ -1,4 +1,4 @@
-/* $Id: table.c,v 1.43 2003/05/13 17:20:33 ukai Exp $ */
+/* $Id: table.c,v 1.44 2003/05/14 16:01:32 ukai Exp $ */
/*
* HTML table
*/
@@ -3525,10 +3525,18 @@ check_relative_width(struct table *t, int maxwidth)
else
n_leftcell++;
}
- if (w < r || (w == r && n_leftcell > 0)) {
- cell->fixed_width[i] = -100 * r;
+ if (n_leftcell == 0) {
+ /* w must be identical to r */
+ if (w != r)
+ cell->fixed_width[i] = -100*r;
}
else {
+ if (w <= r) {
+ /* make room for the left(width-unspecified) cell */
+ /* the next formula is an estimation of required width */
+ w = r*cell->colspan[i]/(cell->colspan[i]-n_leftcell);
+ cell->fixed_width[i] = -100*w;
+ }
for (j = 0; j < cell->colspan[i]; j++) {
if (rcolwidth[j + k] == 0)
rcolwidth[j + k] = (w - r) / n_leftcell;