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.)
git-svn-id: svn://10.0.0.236/trunk@11671 18797224-902f-48f8-a5cc-f745e15eee43
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.
git-svn-id: svn://10.0.0.236/trunk@11473 18797224-902f-48f8-a5cc-f745e15eee43
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.
git-svn-id: svn://10.0.0.236/trunk@10440 18797224-902f-48f8-a5cc-f745e15eee43
support for the case where a nested table is in a cell that has colspan>1
git-svn-id: svn://10.0.0.236/trunk@10105 18797224-902f-48f8-a5cc-f745e15eee43
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.
git-svn-id: svn://10.0.0.236/trunk@9655 18797224-902f-48f8-a5cc-f745e15eee43
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
git-svn-id: svn://10.0.0.236/trunk@9512 18797224-902f-48f8-a5cc-f745e15eee43
the cellmap is now built incrementally, driven by nsTableRowFrame::InitialReflow
git-svn-id: svn://10.0.0.236/trunk@8888 18797224-902f-48f8-a5cc-f745e15eee43
could select the wrong starting width for the column, causing it to have the
wrong ending width.
git-svn-id: svn://10.0.0.236/trunk@8197 18797224-902f-48f8-a5cc-f745e15eee43
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.
git-svn-id: svn://10.0.0.236/trunk@8185 18797224-902f-48f8-a5cc-f745e15eee43
* 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.
git-svn-id: svn://10.0.0.236/trunk@8020 18797224-902f-48f8-a5cc-f745e15eee43
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
git-svn-id: svn://10.0.0.236/trunk@7509 18797224-902f-48f8-a5cc-f745e15eee43
(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.
git-svn-id: svn://10.0.0.236/trunk@7132 18797224-902f-48f8-a5cc-f745e15eee43
fixed cases where we were inappropriately portioning out
a spanning cell's min width to the columns it spanned.
git-svn-id: svn://10.0.0.236/trunk@7011 18797224-902f-48f8-a5cc-f745e15eee43
added some sanity checking in BalanceColumnWidths be ensure that a column width
can never be less than the minimum element in that column.
git-svn-id: svn://10.0.0.236/trunk@6507 18797224-902f-48f8-a5cc-f745e15eee43
fixed lots of COLS related bugs.
handle min width spec (<TD width=0 or width=0% or width=0*>)
major fix to colspan handling
git-svn-id: svn://10.0.0.236/trunk@6493 18797224-902f-48f8-a5cc-f745e15eee43
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.
git-svn-id: svn://10.0.0.236/trunk@6402 18797224-902f-48f8-a5cc-f745e15eee43
* 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.
git-svn-id: svn://10.0.0.236/trunk@6145 18797224-902f-48f8-a5cc-f745e15eee43
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.)
git-svn-id: svn://10.0.0.236/trunk@5842 18797224-902f-48f8-a5cc-f745e15eee43
We now cache lots of useful info in the colframes
we now properly account for margins just as uniform cellspacing
git-svn-id: svn://10.0.0.236/trunk@5754 18797224-902f-48f8-a5cc-f745e15eee43
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
git-svn-id: svn://10.0.0.236/trunk@5322 18797224-902f-48f8-a5cc-f745e15eee43