Changeset 295283 in webkit
- Timestamp:
- Jun 6, 2022 6:11:21 AM (2 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/layout/formattingContexts/flex/FlexFormattingContext.cpp
r295276 r295283 58 58 LayoutUnit FlexFormattingContext::usedContentHeight() const 59 59 { 60 auto& lines = formattingState().lines(); 61 return LayoutUnit { lines.last().bottom() - lines.first().top() }; 60 auto contentTop = LayoutUnit::max(); 61 auto contentBottom = LayoutUnit::min(); 62 for (auto& flexItem : childrenOfType<Box>(root())) { 63 auto marginBox = Layout::BoxGeometry::marginBoxRect(geometryForBox(flexItem)); 64 contentTop = std::min(contentTop, marginBox.top()); 65 contentBottom = std::max(contentBottom, marginBox.bottom()); 66 } 67 return std::max(0_lu, contentBottom - contentTop); 62 68 } 63 69 -
trunk/Source/WebCore/layout/integration/flex/LayoutIntegrationFlexLayout.cpp
r295051 r295283 172 172 LayoutUnit FlexLayout::contentLogicalHeight() const 173 173 { 174 return { };174 return Layout::FlexFormattingContext { rootLayoutBox(), m_flexFormattingState }.usedContentHeight(); 175 175 } 176 176 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r295275 r295283 2367 2367 } 2368 2368 m_flexLayout->layout(); 2369 setLogicalHeight(std::max(logicalHeight(), borderBefore() + paddingBefore() + m_flexLayout->contentLogicalHeight() + borderAfter() + paddingAfter())); 2370 updateLogicalHeight(); 2369 2371 } 2370 2372 #endif
Note: See TracChangeset
for help on using the changeset viewer.