Home | History | Annotate | Download | only in rendering

Lines Matching full:width

80                     // a min/max width of at least 1px for this column now.
99 // ignore width=0
100 if (w.value() > 0 && (int)l.width.type() != Percent) {
102 if (l.width.isFixed()) {
104 if ((wval > l.width.value()) ||
105 ((l.width.value() == wval) && (maxContributor == cell))) {
106 l.width.setValue(wval);
110 l.width.setValue(Fixed, wval);
117 if (w.isPositive() && (!l.width.isPercent() || w.rawValue() > l.width.rawValue()))
118 l.width = w;
123 if (w.isAuto() || (w.isRelative() && w.value() > l.width.rawValue()))
124 l.width = w;
131 // a min/max width of at least 1px for this column now.
144 if (l.width.isFixed()) {
145 if (m_table->style()->htmlHacks() && l.maxWidth > l.width.value() && fixedContributor != maxContributor) {
146 l.width = Length();
175 grpWidth = col->style()->width();
177 Length w = col->style()->width();
185 m_layoutStruct[cEffCol].width = w;
213 // A special case. If this table is not fixed width and contained inside
217 Length tw = table->style()->width();
221 cb->style()->width().isAuto() && !cb->isPositioned())
226 (cb->style()->width().isAuto() || cb->style()->width().isPercent())) {
231 if (cell->colSpan() > 1 || cell->table()->style()->width().isAuto())
286 Length tw = m_table->style()->width();
295 effWidth is the same as width for cells without colspans. If we have colspans, they get modified.
305 m_layoutStruct[i].effWidth = m_layoutStruct[i].width;
333 switch (m_layoutStruct[lastCol].width.type()) {
335 totalPercent += m_layoutStruct[lastCol].width.rawValue();
339 if (m_layoutStruct[lastCol].width.value() > 0) {
340 fixedWidth += m_layoutStruct[lastCol].width.value();
351 // If the column is a percentage width, do not let the spanning cell overwrite the
352 // width value. This caused a mis-rendering on amazon.com.
354 // <table border=2 width=100%><
356 // <tr><td>1</td><td colspan=2 width=100%>2-3</td></tr>
376 // adjust table max width if needed
412 int w = max(m_layoutStruct[pos].effMinWidth, cMinWidth * m_layoutStruct[pos].width.value() / fixedWidth);
413 fixedWidth -= m_layoutStruct[pos].width.value();
424 if (m_layoutStruct[pos].width.isFixed() && haveAuto && fixedWidth <= cMinWidth) {
425 int w = max(m_layoutStruct[pos].effMinWidth, m_layoutStruct[pos].width.value());
426 fixedWidth -= m_layoutStruct[pos].width.value();
435 if (!(m_layoutStruct[pos].width.isFixed() && haveAuto && fixedWidth <= cMinWidth)) {
503 int tableWidth = m_table->width() - m_table->bordersPaddingAndSpacing();
531 Length& width = m_layoutStruct[i].effWidth;
532 switch (width.type()) {
535 totalPercent += width.rawValue();
539 totalRelative += width.value();
561 // allocate width to percent cols
564 Length &width = m_layoutStruct[i].effWidth;
565 if (width.isPercent()) {
566 int w = max(int(m_layoutStruct[i].effMinWidth), width.calcMinValue(tableWidth));
588 // then allocate width to fixed cols
591 Length &width = m_layoutStruct[i].effWidth;
592 if (width.isFixed() && width.value() > m_layoutStruct[i].calcWidth) {
593 available += m_layoutStruct[i].calcWidth - width.value();
594 m_layoutStruct[i].calcWidth = width.value();
602 Length &width = m_layoutStruct[i].effWidth;
603 if (width.isRelative() && width.value() != 0) {
604 // width=0* gets effMinWidth.
605 int w = width.value() * tableWidth / totalRelative;
616 Length &width = m_layoutStruct[i].effWidth;
617 if (width.isAuto() && totalAuto != 0 && !m_layoutStruct[i].emptyCellsOnly) {
628 // still have some width to spread, distribute to fixed columns
630 Length &width = m_layoutStruct[i].effWidth;
631 if (width.isFixed()) {
642 // still have some width to spread, distribute weighted to percent columns
644 Length &width = m_layoutStruct[i].effWidth;
645 if (width.isPercent()) {
646 int w = available * width.rawValue() / totalPercent;
648 totalPercent -= width.rawValue();
658 // still have some width to spread
661 // variable columns with empty cells only don't get any width
671 // If we have overallocated, reduce every cell according to the difference between desired width and minwidth
672 // this seems to produce to the pixel exact results with IE. Wonder is some of this also holds for width distributing.
683 Length &width = m_layoutStruct[i].effWidth;
684 if (width.isAuto())
689 Length &width = m_layoutStruct[i].effWidth;
690 if (width.isAuto()) {
705 Length& width = m_layoutStruct[i].effWidth;
706 if (width.isRelative())
711 Length& width = m_layoutStruct[i].effWidth;
712 if (width.isRelative()) {
727 Length& width = m_layoutStruct[i].effWidth;
728 if (width.isFixed())
733 Length& width = m_layoutStruct[i].effWidth;
734 if (width.isFixed()) {
749 Length& width = m_layoutStruct[i].effWidth;
750 if (width.isPercent())
755 Length& width = m_layoutStruct[i].effWidth;
756 if (width.isPercent()) {
782 if (m_layoutStruct[i].width.isPercent())
783 totalPercent += m_layoutStruct[i].width.rawValue();