OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) | 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org) |
3 * (C) 1997 Torben Weis (weis@kde.org) | 3 * (C) 1997 Torben Weis (weis@kde.org) |
4 * (C) 1998 Waldo Bastian (bastian@kde.org) | 4 * (C) 1998 Waldo Bastian (bastian@kde.org) |
5 * (C) 1999 Lars Knoll (knoll@kde.org) | 5 * (C) 1999 Lars Knoll (knoll@kde.org) |
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 6 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r
ights reserved. |
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 | 303 |
304 // Finally, with our true width determined, compute our margins for real. | 304 // Finally, with our true width determined, compute our margins for real. |
305 setMarginStart(0); | 305 setMarginStart(0); |
306 setMarginEnd(0); | 306 setMarginEnd(0); |
307 if (!hasPerpendicularContainingBlock) { | 307 if (!hasPerpendicularContainingBlock) { |
308 LayoutUnit containerLogicalWidthForAutoMargins = availableLogicalWidth; | 308 LayoutUnit containerLogicalWidthForAutoMargins = availableLogicalWidth; |
309 if (avoidsFloats() && cb->containsFloats()) | 309 if (avoidsFloats() && cb->containsFloats()) |
310 containerLogicalWidthForAutoMargins = containingBlockAvailableLineWi
dth(); | 310 containerLogicalWidthForAutoMargins = containingBlockAvailableLineWi
dth(); |
311 ComputedMarginValues marginValues; | 311 ComputedMarginValues marginValues; |
312 bool hasInvertedDirection = cb->style()->isLeftToRightDirection() == st
yle()->isLeftToRightDirection(); | 312 bool hasInvertedDirection = cb->style()->isLeftToRightDirection() == st
yle()->isLeftToRightDirection(); |
313 computeInlineDirectionMargins(cb, containerLogicalWidthForAutoMargins, l
ogicalWidth(), | 313 computeInlineDirectionMargins(cb, availableLogicalWidth, containerLogica
lWidthForAutoMargins, logicalWidth(), |
314 hasInvertedDirection ? marginValues.m_start : marginValues.m_end, | 314 hasInvertedDirection ? marginValues.m_start : marginValues.m_end, |
315 hasInvertedDirection ? marginValues.m_end : marginValues.m_start); | 315 hasInvertedDirection ? marginValues.m_end : marginValues.m_start); |
316 setMarginStart(marginValues.m_start); | 316 setMarginStart(marginValues.m_start); |
317 setMarginEnd(marginValues.m_end); | 317 setMarginEnd(marginValues.m_end); |
318 } else { | 318 } else { |
319 setMarginStart(minimumValueForLength(style()->marginStart(), availableLo
gicalWidth)); | 319 setMarginStart(minimumValueForLength(style()->marginStart(), availableLo
gicalWidth)); |
320 setMarginEnd(minimumValueForLength(style()->marginEnd(), availableLogica
lWidth)); | 320 setMarginEnd(minimumValueForLength(style()->marginEnd(), availableLogica
lWidth)); |
321 } | 321 } |
322 | 322 |
323 // We should NEVER shrink the table below the min-content logical width, or
else the table can't accomodate | 323 // We should NEVER shrink the table below the min-content logical width, or
else the table can't accomodate |
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1458 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel
l* cell) const | 1458 const BorderValue& RenderTable::tableEndBorderAdjoiningCell(const RenderTableCel
l* cell) const |
1459 { | 1459 { |
1460 ASSERT(cell->isFirstOrLastCellInRow()); | 1460 ASSERT(cell->isFirstOrLastCellInRow()); |
1461 if (hasSameDirectionAs(cell->row())) | 1461 if (hasSameDirectionAs(cell->row())) |
1462 return style()->borderEnd(); | 1462 return style()->borderEnd(); |
1463 | 1463 |
1464 return style()->borderStart(); | 1464 return style()->borderStart(); |
1465 } | 1465 } |
1466 | 1466 |
1467 } | 1467 } |
OLD | NEW |