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
from the prior available width. Some real-world test cases sped up
1-2 orders of magnitude for resize reflow. Initial reflow is unchanged because
we still need to get pass1 metrics on all content.
fixed nsCSSBlockFrame.cpp to take margins into account when computing parent's available width
fixed distribution of excess space to table cells when table is bigger than the content it holds.
not quite finished yet, but better.
git-svn-id: svn://10.0.0.236/trunk@4905 18797224-902f-48f8-a5cc-f745e15eee43
of subsequent cells in reflow pass 1
we correctly distribute extra space in a table proportionately.
We try to give the extra space to auto-width columns first,
and if there are none we distribute it to all columns.
The percentage is based on the cell content's desired size.
git-svn-id: svn://10.0.0.236/trunk@4722 18797224-902f-48f8-a5cc-f745e15eee43
now work correctly.
extra space is now properly apportioned in the "table fits" case when the table contains auto-width cells.
git-svn-id: svn://10.0.0.236/trunk@4683 18797224-902f-48f8-a5cc-f745e15eee43
misc. nav4 compatibility enhancements
added the ability to QueryInterface for some specific table frame types
git-svn-id: svn://10.0.0.236/trunk@4348 18797224-902f-48f8-a5cc-f745e15eee43