Changeset 273264 in webkit
- Timestamp:
- Feb 22, 2021 11:12:03 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/TestExpectations
r273245 r273264 3916 3916 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-column-012.html [ ImageOnlyFailure ] 3917 3917 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-column-015.html [ ImageOnlyFailure ] 3918 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-column-017.html [ ImageOnlyFailure ]3918 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-column-017.html [ Failure ] 3919 3919 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-007.html [ ImageOnlyFailure ] 3920 3920 webkit.org/b/219343 imported/w3c/web-platform-tests/css/css-flexbox/flex-aspect-ratio-img-row-010.html [ ImageOnlyFailure ] -
trunk/PerformanceTests/ChangeLog
r273122 r273264 1 2021-02-22 Sergio Villar Senin <svillar@igalia.com> 2 3 REGRESSION (r266695): twitch.tv: when in fullscreen, WebKit continually does 350ms layouts. Firefox and Chrome do not 4 https://bugs.webkit.org/show_bug.cgi?id=222202 5 <rdar://problem/74537782> 6 7 Reviewed by Simon Fraser. 8 9 New performance test for nested column flexboxes with percentage heights. 10 11 * Layout/nested-column-flexboxes-relative-height.html: Added. 12 1 13 2021-02-18 Myles C. Maxfield <mmaxfield@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r273263 r273264 1 2021-02-22 Sergio Villar Senin <svillar@igalia.com> 2 3 REGRESSION (r266695): twitch.tv: when in fullscreen, WebKit continually does 350ms layouts. Firefox and Chrome do not 4 https://bugs.webkit.org/show_bug.cgi?id=222202 5 <rdar://problem/74537782> 6 7 Reviewed by Simon Fraser. 8 9 The problem was that we were doing the initial layout for the children of the flex container twice in those cases where 10 the child inline axis was not the main axis (for example with column flex containers in horizontal writing modes). 11 Refactored the code (specially the way we clear overriding sizes) so that we only do it once. This saves tons of layouts 12 in pages with nested column flexboxes with relative heights. 13 14 No new tests as there is no change in functionality, we're removing duplicate extra layouts. We're however adding a new 15 performance test for column flexboxes with percentage heights. With this patch we go from 3.5 layout/s to 145 layout/s 16 which is ~4000% better. 17 18 Inspired by Blink's crrev.com/c/1614058 by <cbiesinger@chromium.org>. 19 20 * rendering/RenderFlexibleBox.cpp: 21 (WebCore::RenderFlexibleBox::computeInnerFlexBaseSizeForChild): Do not unconditionally clear overriding sizes. Also removed 22 relayoutChildren which is now unused. Do not layout the item, that should have been done in 23 computeInnerFlexBaseSizeForChild() before. Added ASSERTs to verify that child's intrinsic main size was cached as 24 a consequence of the previous layout. 25 (WebCore::RenderFlexibleBox::constructFlexItem): Do not pass relayoutChildren to computeInnerFlexBaseSizeForChild. Also no 26 need to update it after laying out the child. 27 * rendering/RenderFlexibleBox.h: 28 1 29 2021-02-22 Alex Christensen <achristensen@webkit.org> 2 30 -
trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp
r273242 r273264 923 923 924 924 925 LayoutUnit RenderFlexibleBox::computeInnerFlexBaseSizeForChild(RenderBox& child, LayoutUnit mainAxisBorderAndPadding, bool relayoutChildren) 926 { 927 child.clearOverridingContentSize(); 928 925 LayoutUnit RenderFlexibleBox::computeInnerFlexBaseSizeForChild(RenderBox& child, LayoutUnit mainAxisBorderAndPadding) 926 { 929 927 Length flexBasis = flexBasisForChild(child); 930 928 if (childMainSizeIsDefinite(child, flexBasis)) … … 936 934 } 937 935 938 // The flex basis is indefinite (=auto), so we need to compute the actual 939 // width of the child. For the logical width axis we just use the preferred 940 // width; for the height we need to lay out the child. 936 // The flex basis is indefinite (=auto), so we need to compute the actual width of the child. 941 937 LayoutUnit mainAxisExtent; 942 938 if (!mainAxisIsChildInlineAxis(child)) { 943 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, child); 944 if (child.needsLayout() || relayoutChildren || !m_intrinsicSizeAlongMainAxis.contains(&child)) { 945 if (!child.needsLayout()) 946 child.setChildNeedsLayout(MarkOnlyThis); 947 child.layoutIfNeeded(); 948 cacheChildMainSize(child); 949 } 939 ASSERT(!child.needsLayout()); 940 ASSERT(m_intrinsicSizeAlongMainAxis.contains(&child)); 950 941 mainAxisExtent = m_intrinsicSizeAlongMainAxis.get(&child); 951 942 } else { … … 1300 1291 FlexItem RenderFlexibleBox::constructFlexItem(RenderBox& child, bool relayoutChildren) 1301 1292 { 1293 child.clearOverridingContentSize(); 1302 1294 if (childHasIntrinsicMainAxisSize(child)) { 1303 1295 // If this condition is true, then computeMainAxisExtentForChild will call … … 1318 1310 child.layoutIfNeeded(); 1319 1311 cacheChildMainSize(child); 1320 relayoutChildren = false;1321 1312 child.clearOverridingContainingBlockContentSize(); 1322 1313 } … … 1324 1315 1325 1316 LayoutUnit borderAndPadding = isHorizontalFlow() ? child.horizontalBorderAndPaddingExtent() : child.verticalBorderAndPaddingExtent(); 1326 LayoutUnit childInnerFlexBaseSize = computeInnerFlexBaseSizeForChild(child, borderAndPadding , relayoutChildren);1317 LayoutUnit childInnerFlexBaseSize = computeInnerFlexBaseSizeForChild(child, borderAndPadding); 1327 1318 LayoutUnit childMinMaxAppliedMainAxisExtent = adjustChildSizeForMinAndMax(child, childInnerFlexBaseSize); 1328 1319 LayoutUnit margin = isHorizontalFlow() ? child.horizontalMarginExtent() : child.verticalMarginExtent(); -
trunk/Source/WebCore/rendering/RenderFlexibleBox.h
r273242 r273264 147 147 LayoutUnit computeMainSizeFromAspectRatioUsing(const RenderBox& child, Length crossSizeLength) const; 148 148 void setFlowAwareLocationForChild(RenderBox& child, const LayoutPoint&); 149 LayoutUnit computeInnerFlexBaseSizeForChild(RenderBox& child, LayoutUnit mainAxisBorderAndPadding , bool relayoutChildren);149 LayoutUnit computeInnerFlexBaseSizeForChild(RenderBox& child, LayoutUnit mainAxisBorderAndPadding); 150 150 void adjustAlignmentForChild(RenderBox& child, LayoutUnit); 151 151 ItemPosition alignmentForChild(const RenderBox& child) const;
Note: See TracChangeset
for help on using the changeset viewer.