Changeset 278303 in webkit
- Timestamp:
- Jun 1, 2021, 6:43:06 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
layout/formattingContexts/table/TableFormattingQuirks.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r278300 r278303 1 2021-06-01 Alan Bujtas <zalan@apple.com> 2 3 [LFC][TFC][Quirks] heightValueOfNearestContainingBlockWithFixedHeight should not need to cross formatting context boundary 4 https://bugs.webkit.org/show_bug.cgi?id=226470 5 6 Reviewed by Antti Koivisto. 7 8 Now that the incoming vertical constraint is applied properly for the cell layout, we don't need to cross 9 the formatting context boundary in heightValueOfNearestContainingBlockWithFixedHeight to check if the table 10 box has fixed height value. 11 12 * layout/formattingContexts/table/TableFormattingQuirks.cpp: 13 (WebCore::Layout::TableFormattingQuirks::heightValueOfNearestContainingBlockWithFixedHeight const): 14 1 15 2021-05-27 Sergio Villar Senin <svillar@igalia.com> 2 16 -
trunk/Source/WebCore/layout/formattingContexts/table/TableFormattingQuirks.cpp
r278253 r278303 63 63 // context. If we can't resolve it within the table subtree, we default it to 0. 64 64 // e.g <div style="height: 100px"><table><tr><td style="height: 100%"></td></tr></table></div> is resolved to 0px. 65 auto& tableBox = formattingContext().root(); 66 auto fixedLogicalHeight = [&](const auto& ancestorBox) -> std::optional<LayoutUnit> { 67 auto height = ancestorBox.style().logicalHeight(); 68 if (!height.isFixed()) 69 return { }; 70 if (&ancestorBox != &tableBox) 65 for (auto& ancestor : containingBlockChainWithinFormattingContext(layoutBox)) { 66 auto height = ancestor.style().logicalHeight(); 67 if (height.isFixed()) 71 68 return LayoutUnit { height.value() }; 72 auto& grid = formattingContext().formattingState().tableGrid();73 auto verticalSpacing = grid.verticalSpacing();74 return LayoutUnit { height.value() - ((grid.rows().size() + 1) * verticalSpacing) };75 };76 77 for (auto& ancestor : containingBlockChain(layoutBox, tableBox.containingBlock())) {78 if (auto fixedHeight = fixedLogicalHeight(ancestor))79 return *fixedHeight;80 69 } 81 70 return { };
Note:
See TracChangeset
for help on using the changeset viewer.