| 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, 2008, 2009, 2010, 2013 Apple Inc. | 7 * Copyright (C) 2003, 2004, 2005, 2006, 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 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1107 totalPercent); | 1107 totalPercent); |
| 1108 distributeExtraLogicalHeightToAutoRows(remainingExtraLogicalHeight, | 1108 distributeExtraLogicalHeightToAutoRows(remainingExtraLogicalHeight, |
| 1109 autoRowsCount); | 1109 autoRowsCount); |
| 1110 distributeRemainingExtraLogicalHeight(remainingExtraLogicalHeight); | 1110 distributeRemainingExtraLogicalHeight(remainingExtraLogicalHeight); |
| 1111 return extraLogicalHeight - remainingExtraLogicalHeight; | 1111 return extraLogicalHeight - remainingExtraLogicalHeight; |
| 1112 } | 1112 } |
| 1113 | 1113 |
| 1114 static bool shouldFlexCellChild(LayoutObject* cellDescendant) { | 1114 static bool shouldFlexCellChild(LayoutObject* cellDescendant) { |
| 1115 return cellDescendant->isAtomicInlineLevel() || | 1115 return cellDescendant->isAtomicInlineLevel() || |
| 1116 (cellDescendant->isBox() && | 1116 (cellDescendant->isBox() && |
| 1117 toLayoutBox(cellDescendant)->scrollsOverflow()); | 1117 toLayoutBox(cellDescendant)->style()->overflowY() != |
| 1118 OverflowVisible && |
| 1119 toLayoutBox(cellDescendant)->style()->overflowY() != OverflowHidden); |
| 1118 } | 1120 } |
| 1119 | 1121 |
| 1120 void LayoutTableSection::layoutRows() { | 1122 void LayoutTableSection::layoutRows() { |
| 1121 #if ENABLE(ASSERT) | 1123 #if ENABLE(ASSERT) |
| 1122 SetLayoutNeededForbiddenScope layoutForbiddenScope(*this); | 1124 SetLayoutNeededForbiddenScope layoutForbiddenScope(*this); |
| 1123 #endif | 1125 #endif |
| 1124 | 1126 |
| 1125 ASSERT(!needsLayout()); | 1127 ASSERT(!needsLayout()); |
| 1126 | 1128 |
| 1127 LayoutAnalyzer::Scope analyzer(*this); | 1129 LayoutAnalyzer::Scope analyzer(*this); |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1889 // do, but it will clip the cells that spill out of the table section. | 1891 // do, but it will clip the cells that spill out of the table section. |
| 1890 // strict mode, Mozilla and WinIE both regrow the table to accommodate the | 1892 // strict mode, Mozilla and WinIE both regrow the table to accommodate the |
| 1891 // new height of the cell (thus letting the percentages cause growth one | 1893 // new height of the cell (thus letting the percentages cause growth one |
| 1892 // time only). We may also not be handling row-spanning cells correctly. | 1894 // time only). We may also not be handling row-spanning cells correctly. |
| 1893 // | 1895 // |
| 1894 // Note also the oddity where replaced elements always flex, and yet blocks/ | 1896 // Note also the oddity where replaced elements always flex, and yet blocks/ |
| 1895 // tables do not necessarily flex. WinIE is crazy and inconsistent, and we | 1897 // tables do not necessarily flex. WinIE is crazy and inconsistent, and we |
| 1896 // can't hope to match the behavior perfectly, but we'll continue to refine it | 1898 // can't hope to match the behavior perfectly, but we'll continue to refine it |
| 1897 // as we discover new bugs. :) | 1899 // as we discover new bugs. :) |
| 1898 bool cellChildrenFlex = false; | 1900 bool cellChildrenFlex = false; |
| 1899 bool flexAllChildren = cell.style()->logicalHeight().isFixed() || | 1901 bool flexAllChildren = cell.style()->logicalHeight().isSpecified() || |
| 1900 (!table()->style()->logicalHeight().isAuto() && | 1902 (!table()->style()->logicalHeight().isAuto() && |
| 1901 rowHeight != cell.logicalHeight()); | 1903 rowHeight != cell.logicalHeight()); |
| 1902 | 1904 |
| 1903 for (LayoutObject* child = cell.firstChild(); child; | 1905 for (LayoutObject* child = cell.firstChild(); child; |
| 1904 child = child->nextSibling()) { | 1906 child = child->nextSibling()) { |
| 1905 if (!child->isText() && child->style()->logicalHeight().isPercentOrCalc() && | 1907 if (!child->isText() && child->style()->logicalHeight().isPercentOrCalc() && |
| 1906 (flexAllChildren || shouldFlexCellChild(child)) && | 1908 (flexAllChildren || shouldFlexCellChild(child)) && |
| 1907 (!child->isTable() || toLayoutTable(child)->hasSections())) { | 1909 (!child->isTable() || toLayoutTable(child)->hasSections())) { |
| 1908 cellChildrenFlex = true; | 1910 cellChildrenFlex = true; |
| 1909 break; | 1911 break; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2078 // the header in all columns. | 2080 // the header in all columns. |
| 2079 // Note that this is in flow thread coordinates, not visual coordinates. The | 2081 // Note that this is in flow thread coordinates, not visual coordinates. The |
| 2080 // enclosing LayoutFlowThread will convert to visual coordinates. | 2082 // enclosing LayoutFlowThread will convert to visual coordinates. |
| 2081 if (table()->header() == this && isRepeatingHeaderGroup()) | 2083 if (table()->header() == this && isRepeatingHeaderGroup()) |
| 2082 rect.setHeight(table()->logicalHeight()); | 2084 rect.setHeight(table()->logicalHeight()); |
| 2083 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rect, | 2085 return LayoutTableBoxComponent::mapToVisualRectInAncestorSpace(ancestor, rect, |
| 2084 flags); | 2086 flags); |
| 2085 } | 2087 } |
| 2086 | 2088 |
| 2087 } // namespace blink | 2089 } // namespace blink |
| OLD | NEW |