lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev [PATCH 2.8.4dev.19] table colspan


From: Ilya Zakharevich
Subject: lynx-dev [PATCH 2.8.4dev.19] table colspan
Date: Sat, 17 Mar 2001 02:47:16 -0500
User-agent: Mutt/1.2.5i

The treatement of colspans in TRST turns out to be completely broken.
It works in a very limited set of situations only.  I did not realize
this, so put a wrong workaround for one of the bugs of TRST.

This patch does not fix the botched colspan logic (it requires
preserving more info, basically, for each pair of columns the maximal
width of colspans which happen to start/end at this pair), but it
makes it work again in one of the special cases it worked before.
Another bug was in interaction of justification and tables.

I also marked more TRACEs as "BUG"s.

Enjoy,
Ilya

--- ./src/GridText.c-as-sent    Tue Mar 13 21:55:18 2001
+++ ./src/GridText.c    Sat Mar 17 02:02:18 2001
@@ -582,7 +582,7 @@ PRIVATE void * LY_check_calloc ARGS2(
        if (t == HTMainText)
            t = NULL;           /* shouldn't happen */
        {
-       CTRACE((tfp, "\r *** Emergency freeing document %d/%d for '%s'%s!\n",
+       CTRACE((tfp, "\nBUG *** Emergency freeing document %d/%d for '%s'%s!\n",
                    i + 1, n,
                    ((t && t->node_anchor &&
                      t->node_anchor->address) ?
@@ -3092,6 +3092,7 @@ PRIVATE void split_line ARGS2(
 
     if (this_line_was_split
      && spare
+     && !text->stbl    /* We don't inform TRST on the cell width change yet */
      && justify_max_void_percent > 0
      && justify_max_void_percent <= 100
      && justify_max_void_percent >= ((100*spare)
@@ -3221,8 +3222,8 @@ PRIVATE void split_line ARGS2(
             * to end paragraph - we must substitute HT_NON_BREAK_SPACEs with
             * spaces in previous line
             */
-           if (line->size) {
-                 CTRACE((tfp,"justification: shouldn't happen - new line is 
not empty!\n"));
+           if (line->size && !text->stbl) {
+                 CTRACE((tfp,"BUG: justification: shouldn't happen - new line 
is not empty!\n"));
            }
 
            for (p=previous->data;*p;++p)
@@ -4589,7 +4590,7 @@ PRIVATE int HText_insertBlanksInStblLine
         *  Still not enough.  Something went wrong.  Try the best we
         *  can do.
         */
-       CTRACE((tfp, "insertBlanks: resulting table too wide by %d positions!",
+       CTRACE((tfp, "BUG: insertBlanks: resulting table too wide by %d 
positions!\n",
               -spare));
        indent = spare = 0;
     }
@@ -4954,7 +4955,7 @@ PRIVATE int HText_endAnchor0 ARGS3(
         */
 
        CTRACE((tfp,
-          "HText_endAnchor0: internal error: last anchor was input field!\n"));
+          "BUG: HText_endAnchor0: internal error: last anchor was input 
field!\n"));
        return 0;
     }
     if (a->number) {
--- ./src/TRSTable.c~   Wed Mar 14 01:48:46 2001
+++ ./src/TRSTable.c    Sat Mar 17 02:27:12 2001
@@ -1685,7 +1685,7 @@ PUBLIC int Stbl_finishCellInTable ARGS4(
     if (len == -1)
        return len;
     xlen = (len > 0) ? len : s->pending_len; /* ##890 use xlen if fixed_line?: 
*/
-    if (lastrow->fixed_line && lastrow->Line == lineno)
+    if (lastrow->Line == lineno)
        len = xlen;
     if (lastrow->cells[icell].colspan > 1) {
        /*
@@ -1775,7 +1775,10 @@ PUBLIC int Stbl_finishCellInTable ARGS4(
 
     if (!end_td)
        lastrow->ended = ROW_ended_by_splitline;
-#ifndef EXP_NESTED_TABLES /* maxlen may already include contribution of a cell 
in this column */
+#ifdef EXP_NESTED_TABLES /* maxlen may already include contribution of a cell 
in this column */
+    if (me->maxlen > MAX_STBL_POS)
+       return -1;
+#else
     if (me->maxlen + (xlen - len) > MAX_STBL_POS)
        return -1;
 #endif

; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]