Commit Graph

180 Commits

Author SHA1 Message Date
buster@netscape.com
cdb15ff15e fixed calculation for width of auto-width cells in constrained layout 1998-10-06 08:00:07 +00:00
buster@netscape.com
00fd82459f fixed coord-width colspan handling in some complex cases 1998-10-02 20:34:11 +00:00
troy@netscape.com
ee0a3c543f Eliminated nsIRunaround interface, and folded space manager parameter into
nsHTMLReflowState structure
1998-10-02 04:10:00 +00:00
buster@netscape.com
e7900d487d much better backwards compatibility for autowidth tables
now autowidth columns as assigned a width starting from their minimum.  The remaining
space is proportionately divided among them, never allowing a column to go over its max (for
autowidth tables only.)
1998-10-01 18:39:31 +00:00
buster@netscape.com
9c56008541 fixed a minor bug in colspan layout
the layout strategy can now query the outer frame for the caption min width,
and use it to expand the table if necessary
did some related cleanup while I was in there.
1998-09-29 23:15:01 +00:00
buster@netscape.com
e819ae9c00 set all the groundwork for FAST table layout based on CSS-2 table-layout property 1998-09-22 23:36:06 +00:00
buster@netscape.com
1aa76fdef5 added ColIsSpannedInto, ColHasSpanningCells
moved *IsSpannedInto and *HasSpanningCells into cellmap, giving us the oppurtunity
to easily cache results if we want.  These methods are still accessed through nsTableFrame.
changed nsTableFrame::GetCellAt to nsTableFrame::GetCellFrameAt to make it more clear what
the method returns:  a frame, not content.
1998-09-18 22:37:14 +00:00
buster@netscape.com
279673f032 better handling of non-cell frames in rowFrames
support for the case where a nested table is in a cell that has colspan>1
1998-09-16 00:48:14 +00:00
buster@netscape.com
1516c28a7a many fixes that effect http://www.mozilla.org and related pages.
these fixes are for nested tables with percent widths, for tables including both rowspan and colspan,
and for tables with only a single column.
some rounding errors were eliminated.
more debugging output, and some new assertions.
1998-09-09 20:00:40 +00:00
buster@netscape.com
6498a113d6 fixed 2 small errors in computing table widths.
1) sometimes we were adding 1 too many pixels in constrained tables
2) sometimes we were using the wrong value for the max width as an input to constrained tables
1998-09-08 19:11:14 +00:00
buster@netscape.com
83730647c4 reimplemented cell map in terms of nsVoidArrays for incremental building.
the cellmap is now built incrementally, driven by nsTableRowFrame::InitialReflow
1998-08-31 21:23:28 +00:00
buster@netscape.com
0264893319 fixed a minor bug handling tables with COLS attribute 1998-08-26 17:53:47 +00:00
buster@netscape.com
7f17f04514 verify that proportionate-width columns (1* format, or COLS attribute)
get sized to at least their minimum width
1998-08-20 17:31:20 +00:00
buster@netscape.com
2696b43e02 fixes a layout bug where subsequent cells in a column when colspans are involved
could select the wrong starting width for the column, causing it to have the
wrong ending width.
1998-08-19 20:41:06 +00:00
buster@netscape.com
0f443c9118 improved colspan handling.
cells with colspans and specified widths divide their width provisionally between the columns they span. This provisional division is ammended by any cell in any of the effected columns that:
1) has a colspan=1, and
2) has a width specified
the widths of all other columns must be adjusted for cells like these.  Further complicating matters is that it seems <faith> that if multiple colspanning cells intersect a column and each has a width
specified such that the column would have a different width depending on which is used, only the first such cell is used </faith>.  I can neither confirm nor deny this reading the mozilla code.

I also taught the cell map how to deal with this situation:

 colspan=1 | colspan=2 | colspan=1
 colspan=1 | colspan=2 | colspan=1

This table "really" has 4 columns, but the middle cells are treated as if they have no colspan.
Trust me, it matters.  The original colspan attributes can't simply be thrown away because Mr. DOM
could come along at any time and add/remove a cell that would make them important.
1998-08-19 15:43:51 +00:00
buster@netscape.com
51041cd2c3 fixed nested tables for the case where both parent and child table are %-width,
and the columns are any variety of width types
1998-08-17 23:37:04 +00:00
buster@netscape.com
d1f77a833b * migrated and improved some fixes from the branch to the tip
* fixes sample6, yahoo resizing
* added BasicTableLayoutStrategy::ColIsSpecifiedAsMinimumWidth helper function,
which tells us if the given column has a width attribute that means "make me as small as possible"
* nsTableFrame methods now no longer use mCellMap directly, they ask for it from
GetCellMap which gets the cell map from the first-in-flow.  Only the first-in-flow has a
cell map because the cellmap refers to the table as a single object, not to each table frame.
* Likewise, continuing table frames do not call BalanceColumnWidths or SetTableWidth
which are "global" operations.  Responsibility for these lies with the first-in-flow.
1998-08-14 16:16:43 +00:00
buster@netscape.com
604e2dcffd first cut at implementing %-width columns inside of auto-width tables.
This is about 50% done, which covers about 90% of the cases.
1998-08-11 18:42:10 +00:00
buster@netscape.com
35fe484983 synch with branch
fixed the following bugs: 312653 312656 312655
the fixes were:

1. cells now inherit their bgcolor from the row, if available.  This is the
Nav4 way of drawing row bgcolor, rather than having the row paint its own bgcolor. (Troy, I intend to make this conditional
based on the compatibility mode)

2. colspans across cols that are all specified width no longer try to proportionately
divide the width of the span between the cols.  see http://www.city.net (now it's really fixed, without breaking nested tables in
constrained situations.)  A happy side effect is nested tables in general behave better when constrained.

3. min table sizes are fixed, so min width changes to content now effect the
table correctly during incremental reflow.  This fixes the table layout portion of the bugs on the http://www.aol.com/corp tree.
Rick will check in the other half of this fix soon.  Until then, don't expect to see much improvement.

4. fixed bug 312799.  Table cell now always reserve at least the maxElementSize
of its content, fixing problems when desiredSize<maxElementSize
1998-08-07 02:11:51 +00:00
buster@netscape.com
edd7ce7708 backed out a mistake from my last checkin. table min sizes are ok again 1998-08-04 00:56:57 +00:00
buster@netscape.com
f71d32961d fixed this case: (an image tag with no width attribute) inside (a specified-width column) inside
(a nested table with specified width) inside (an auto-width column)
inside (a specified-width table).  Got that?
The problem was that we we not setting state correctly during incremental reflow
when the image returned its proper metrics after giving default metrics that
were for its ALT text.
1998-08-03 20:27:59 +00:00
buster@netscape.com
454f6e3a8b made auto-width tables that have all-fixed-width columns act like
fixed-width tables.
1998-08-01 20:31:40 +00:00
buster@netscape.com
b60cd1054c *** empty log message *** 1998-08-01 02:36:31 +00:00
buster@netscape.com
060fc80a09 *** empty log message *** 1998-08-01 02:32:27 +00:00
buster@netscape.com
2bb3616b5e fixed cases where we were not computing the table width correctly
fixed cases where we were inappropriately portioning out
a spanning cell's min width to the columns it spanned.
1998-08-01 02:31:55 +00:00
buster@netscape.com
a42db8bb35 fixed an error where min width of col spanners were getting proportionately distributed
only desired width gets distributed, not min size.
1998-07-31 00:31:09 +00:00
buster@netscape.com
a671ce3e5d fix for distributing spanned width that is less than the column minimums it spans. 1998-07-28 00:23:01 +00:00
buster@netscape.com
fc1744103a more span fixes 1998-07-27 23:47:54 +00:00
buster@netscape.com
e7d7d1a606 minor fixes for spans 1998-07-27 07:20:03 +00:00
buster@netscape.com
3f0401abf8 cleaner version of earlier code. still buggy on some pages for no apparent reason. 1998-07-27 05:32:50 +00:00
buster@netscape.com
1ba371b79e *** empty log message *** 1998-07-27 03:02:32 +00:00
buster@netscape.com
4bdbdf0fc5 much better handling of tables who have fixed-width columns that make the table wider than it is allowed to be
added some sanity checking in BalanceColumnWidths be ensure that a column width
can never be less than the minimum element in that column.
1998-07-27 02:15:37 +00:00
buster@netscape.com
14deff94a9 COLS attribute ignored if any column width info is specified (like <TD width=100>)
fixed lots of COLS related bugs.
handle min width spec (<TD width=0 or width=0% or width=0*>)
major fix to colspan handling
1998-07-26 04:23:01 +00:00
buster@netscape.com
fc113fa007 NOWRAP turned off in fixed-width cells for backwards compatibility
we handle inconsistent width attributes better
1998-07-24 23:26:23 +00:00
buster@netscape.com
5d7e9c8d9e turn off debug 1998-07-24 17:15:12 +00:00
buster@netscape.com
5971394e6f GetColCount now returns the effective column count of the table, adjusted
for nonsense COLSPANs at the edge of a table.  Fixed some bugs this uncovered
where the cell was being asked for its colspan attribute rather than the table
being asked for the cell's effective col span.
1998-07-24 16:51:16 +00:00
buster@netscape.com
987f47d3f9 fixed column balancing for case where minColWidth > specifiedFixedColumnWidth 1998-07-24 03:53:59 +00:00
buster@netscape.com
8024653e01 completed AdjustTableThatIsTooWide, now gets the table down to the right width. 1998-07-23 21:55:45 +00:00
buster@netscape.com
7f3bca38d8 fixed-width columns now respected when their content desired width exceeds
the specified width.
1998-07-22 20:06:31 +00:00
buster@netscape.com
f84b8e4370 BasicTableLayoutStrategy::Initialize now properly re-iinitializes instance variables 1998-07-22 18:22:12 +00:00
buster@netscape.com
1f39275344 * reworked the way colspan and rowspans are handled in table layout strategy. We do less work, and we look better.
* fixed more margin code.  we're inching towards correctness.
* the width contributed by a colspanning cell is now proportionately distributed to the columns based on the columns "effective width"
* added logic for handling illegal COLS attribute on a table (like COLS=4 in a 3-column table).  See nsTableFrame::GetEffectiveCOLSAttribute()
* added logic for handling illegal COLSPAN attribute on a cell (like COLSPAN=4 in a 3-column table).  See nsTableFrame::GetEffectiveColSpan().  This is wrong, and will get reworked soon.
* added the ability for cell width attributes to effect column width like Nav4.
1998-07-22 03:53:43 +00:00
buster@netscape.com
bbbfa96ac5 fixed a space leak/logic error handling colspans
added backwards compatibility for percent width tables inside of auto width tables (see http://webreview.com/wr/pub  warning:  you'll have to look at a local copy until
Troy/Vidur/somebody fixes an image problem.)
1998-07-17 21:02:28 +00:00
buster@netscape.com
dd4bdb9539 fixed table maxElementSize 1998-07-17 17:51:55 +00:00
buster@netscape.com
dd50384b0a fundemental overhaul of the BasicTableLayoutStrategy
We now cache lots of useful info in the colframes
we now properly account for margins just as uniform cellspacing
1998-07-16 23:23:31 +00:00
buster
942afeb2e6 turned debug noise off 1998-07-13 20:44:07 +00:00
buster
418fd7223a for Nav compatibility, 0-width cells do not have insets 1998-07-13 20:41:38 +00:00
buster
d9e15c6a11 fixed 2 minor space leaks having to do with temporary structs allocated
to handle colspans
1998-07-13 18:11:12 +00:00
buster
0f3a064a10 major hackage to the table data structures. slimmer, simpler, faster
this work exposed a few bugs and slow spots, which have been fixed
for the aol page, I added some additional backwards compatibility code
to proportionately distribute width when a fixed-width cell has colspans
1998-07-11 00:00:31 +00:00
buster
c5522f4239 fix for empty tables. we now support tables that have no content. 1998-07-07 00:20:21 +00:00
buster
39c93691c4 fixed a few bugs with distributing excess/restricted space inappropriately.
we now pass around info about whether we're an auto width table.
1998-07-06 22:48:19 +00:00