Commit Graph

227 Commits

Author SHA1 Message Date
buster%netscape.com
1e386bbc7c modified the resize reflow optimization so max element size is returned
if requested without triggering a reflow if the width hasn't changed.
1998-08-19 18:40:33 +00:00
buster%netscape.com
2515e08aee 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
a42be9cf57 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
49d858783e fixed a memory leak where a style context was not being released when
the table cell set the table column's style.
1998-08-17 19:03:36 +00:00
buster%netscape.com
c024161837 * 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
troy%netscape.com
d8d09aa319 Eliminated circular reference between table row and table cell 1998-08-12 04:45:17 +00:00
troy%netscape.com
82af4aaaf5 Added release of row group context object 1998-08-12 04:09:43 +00:00
buster%netscape.com
fad1e52668 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
0824132571 percent-width nested tables in fixed-width cells now use the computed
column width if available for computing their own width.
1998-08-10 02:16:18 +00:00
troy%netscape.com
acaa6d2f0e Change to object lifetime management. Views are no longer ref counted 1998-08-08 04:23:33 +00:00
buster%netscape.com
43c4537038 bug #312932. fixes nested tables with percent widths that also have
content with percent widths.
1998-08-07 21:53:27 +00:00
troy%netscape.com
a09b9a211e Removed MoveTo() and SizeTo() member functions that were for debug
purposes, and are no longer needed
1998-08-07 18:17:34 +00:00
buster%netscape.com
79c1b74a7a 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
f8fb32ab12 removed an overly-aggressive assertion that prevents nested tables from laying out 1998-08-04 17:16:56 +00:00
buster%netscape.com
3aa831cc71 backed out a mistake from my last checkin. table min sizes are ok again 1998-08-04 00:56:57 +00:00
troy%netscape.com
51a8b8dc9a Added ASSERT for the case where we get passed a reflow reason of initial
when we've already been reflowed once
1998-08-03 23:29:35 +00:00
buster%netscape.com
5fb7fd0dc2 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
d1810c5bd8 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
a45b2ebb58 *** empty log message *** 1998-08-01 02:36:31 +00:00
buster%netscape.com
1d94952b0c *** empty log message *** 1998-08-01 02:32:27 +00:00
buster%netscape.com
c0e2de3c56 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
705f18b571 fixed a memory leak on a style context 1998-08-01 02:30:35 +00:00
peterl%netscape.com
714146a525 rounding support 1998-07-31 23:34:45 +00:00
buster%netscape.com
ff35c20a64 we now paint backgrounds regardless of our content. Cell borders are
still conditionally painted based on whether the cell's content has
0=size or not.
1998-07-31 00:32:27 +00:00
buster%netscape.com
0e9212b3a8 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
troy%netscape.com
961f75c4e0 Changed BuildCellMap() to iterate table cell frames using the sibling
list instead of ChildAt()
1998-07-30 04:50:38 +00:00
troy%netscape.com
3766ec4048 Changed nsString to nsAutoString to eliminate heap allocation 1998-07-30 02:49:13 +00:00
kipp%netscape.com
7ff5d0e7ce Remove most compiler warnings on IRIX 1998-07-29 20:19:08 +00:00
buster%netscape.com
906c36bf12 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
ef37113511 more span fixes 1998-07-27 23:47:54 +00:00
kostello%netscape.com
f6774809de Added support for the copy command (converting the selection to XIF)
Changed XIF interface
1998-07-27 18:11:14 +00:00
buster%netscape.com
fb448713fb empty cells do not render border or background color 1998-07-27 07:37:57 +00:00
buster%netscape.com
01cb1091bc minor fixes for spans 1998-07-27 07:20:03 +00:00
buster%netscape.com
4aa30464e2 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
5bc08af6bc *** empty log message *** 1998-07-27 03:02:32 +00:00
buster%netscape.com
b0820f4994 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
cb77901bc4 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
c2cb496f85 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
ccdd156af5 turn off debug 1998-07-24 17:15:12 +00:00
buster%netscape.com
cc50c03239 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
8194f070cf fixed column balancing for case where minColWidth > specifiedFixedColumnWidth 1998-07-24 03:53:59 +00:00
buster%netscape.com
911380aeb5 any table with a nonsense rowspan lays out better 1998-07-24 00:43:09 +00:00
buster%netscape.com
4ad5fcf455 completed AdjustTableThatIsTooWide, now gets the table down to the right width. 1998-07-23 21:55:45 +00:00
peterl%netscape.com
2207f21400 factored backgound finding code to nsStyleUtil 1998-07-23 18:05:03 +00:00
buster%netscape.com
bf6286bcc1 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
250fdeafde BasicTableLayoutStrategy::Initialize now properly re-iinitializes instance variables 1998-07-22 18:22:12 +00:00
buster%netscape.com
35edf8df81 fixed table width problems when there are colspanning cells 1998-07-22 05:38:41 +00:00
troy%netscape.com
048270ffb0 Changed PaintBorder() to use the (x,y) that's passed in 1998-07-22 05:02:07 +00:00
buster%netscape.com
878f3fa809 * 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
troy%netscape.com
789a2dbe45 Changed nsCSSRendering::PaintBorder() so the entire rect is used
and not just the width and height
1998-07-22 02:46:00 +00:00