| 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, 2013 Apple Inc. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. |
| 8 * All rights reserved. | 8 * All rights reserved. |
| 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
| 10 * | 10 * |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 collapsedMarginBeforeForChild(caption) + logicalHeight())); | 425 collapsedMarginBeforeForChild(caption) + logicalHeight())); |
| 426 // If LayoutTableCaption ever gets a layout() function, use it here. | 426 // If LayoutTableCaption ever gets a layout() function, use it here. |
| 427 caption.layoutIfNeeded(); | 427 caption.layoutIfNeeded(); |
| 428 } | 428 } |
| 429 // Apply the margins to the location now that they are definitely available | 429 // Apply the margins to the location now that they are definitely available |
| 430 // from layout | 430 // from layout |
| 431 LayoutUnit captionLogicalTop = | 431 LayoutUnit captionLogicalTop = |
| 432 collapsedMarginBeforeForChild(caption) + logicalHeight(); | 432 collapsedMarginBeforeForChild(caption) + logicalHeight(); |
| 433 caption.setLogicalLocation( | 433 caption.setLogicalLocation( |
| 434 LayoutPoint(caption.marginStart(), captionLogicalTop)); | 434 LayoutPoint(caption.marginStart(), captionLogicalTop)); |
| 435 if (view()->layoutState()->isPaginated()) |
| 436 updateFragmentationInfoForChild(caption); |
| 435 | 437 |
| 436 if (!selfNeedsLayout()) | 438 if (!selfNeedsLayout()) |
| 437 caption.setMayNeedPaintInvalidation(); | 439 caption.setMayNeedPaintInvalidation(); |
| 438 | 440 |
| 439 setLogicalHeight(logicalHeight() + caption.logicalHeight() + | 441 setLogicalHeight(logicalHeight() + caption.logicalHeight() + |
| 440 collapsedMarginBeforeForChild(caption) + | 442 collapsedMarginBeforeForChild(caption) + |
| 441 collapsedMarginAfterForChild(caption)); | 443 collapsedMarginAfterForChild(caption)); |
| 442 } | 444 } |
| 443 | 445 |
| 444 void LayoutTable::layoutSection(LayoutTableSection& section, | 446 void LayoutTable::layoutSection(LayoutTableSection& section, |
| 445 SubtreeLayoutScope& layouter, | 447 SubtreeLayoutScope& layouter, |
| 446 LayoutUnit logicalLeft) { | 448 LayoutUnit logicalLeft) { |
| 447 section.setLogicalLocation(LayoutPoint(logicalLeft, logicalHeight())); | 449 section.setLogicalLocation(LayoutPoint(logicalLeft, logicalHeight())); |
| 448 if (m_columnLogicalWidthChanged) | 450 if (m_columnLogicalWidthChanged) |
| 449 layouter.setChildNeedsLayout(§ion); | 451 layouter.setChildNeedsLayout(§ion); |
| 450 if (!section.needsLayout()) | 452 if (!section.needsLayout()) |
| 451 markChildForPaginationRelayoutIfNeeded(section, layouter); | 453 markChildForPaginationRelayoutIfNeeded(section, layouter); |
| 452 section.layoutIfNeeded(); | 454 section.layoutIfNeeded(); |
| 453 int sectionLogicalHeight = section.calcRowLogicalHeight(); | 455 int sectionLogicalHeight = section.calcRowLogicalHeight(); |
| 454 section.setLogicalHeight(LayoutUnit(sectionLogicalHeight)); | 456 section.setLogicalHeight(LayoutUnit(sectionLogicalHeight)); |
| 457 if (view()->layoutState()->isPaginated()) |
| 458 updateFragmentationInfoForChild(section); |
| 455 setLogicalHeight(logicalHeight() + sectionLogicalHeight); | 459 setLogicalHeight(logicalHeight() + sectionLogicalHeight); |
| 456 } | 460 } |
| 457 | 461 |
| 458 LayoutUnit LayoutTable::logicalHeightFromStyle() const { | 462 LayoutUnit LayoutTable::logicalHeightFromStyle() const { |
| 459 LayoutUnit computedLogicalHeight; | 463 LayoutUnit computedLogicalHeight; |
| 460 Length logicalHeightLength = style()->logicalHeight(); | 464 Length logicalHeightLength = style()->logicalHeight(); |
| 461 if (logicalHeightLength.isIntrinsic() || | 465 if (logicalHeightLength.isIntrinsic() || |
| 462 (logicalHeightLength.isSpecified() && logicalHeightLength.isPositive())) { | 466 (logicalHeightLength.isSpecified() && logicalHeightLength.isPositive())) { |
| 463 computedLogicalHeight = | 467 computedLogicalHeight = |
| 464 convertStyleLogicalHeightToComputedHeight(logicalHeightLength); | 468 convertStyleLogicalHeightToComputedHeight(logicalHeightLength); |
| (...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1692 } | 1696 } |
| 1693 | 1697 |
| 1694 LayoutUnit LayoutTable::paddingRight() const { | 1698 LayoutUnit LayoutTable::paddingRight() const { |
| 1695 if (collapseBorders()) | 1699 if (collapseBorders()) |
| 1696 return LayoutUnit(); | 1700 return LayoutUnit(); |
| 1697 | 1701 |
| 1698 return LayoutBlock::paddingRight(); | 1702 return LayoutBlock::paddingRight(); |
| 1699 } | 1703 } |
| 1700 | 1704 |
| 1701 } // namespace blink | 1705 } // namespace blink |
| OLD | NEW |