Changeset 273785 in webkit
- Timestamp:
- Mar 2, 2021, 7:08:15 PM (6 years ago)
- Location:
- branches/safari-612.1.5-branch
- Files:
-
- 1 added
- 5 edited
-
LayoutTests/TestExpectations (modified) (1 diff)
-
PerformanceTests/ChangeLog (modified) (1 diff)
-
PerformanceTests/Layout/nested-column-flexboxes-relative-height.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderFlexibleBox.cpp (modified) (5 diffs)
-
Source/WebCore/rendering/RenderFlexibleBox.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612.1.5-branch/LayoutTests/TestExpectations
r273203 r273785 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 ] -
branches/safari-612.1.5-branch/PerformanceTests/ChangeLog
r273122 r273785 1 2021-03-02 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r273264. rdar://problem/74952900 4 5 REGRESSION (r266695): twitch.tv: when in fullscreen, WebKit continually does 350ms layouts. Firefox and Chrome do not 6 https://bugs.webkit.org/show_bug.cgi?id=222202 7 <rdar://problem/74537782> 8 9 Reviewed by Simon Fraser. 10 11 PerformanceTests: 12 13 New performance test for nested column flexboxes with percentage heights. 14 15 * Layout/nested-column-flexboxes-relative-height.html: Added. 16 17 Source/WebCore: 18 19 The problem was that we were doing the initial layout for the children of the flex container twice in those cases where 20 the child inline axis was not the main axis (for example with column flex containers in horizontal writing modes). 21 Refactored the code (specially the way we clear overriding sizes) so that we only do it once. This saves tons of layouts 22 in pages with nested column flexboxes with relative heights. 23 24 No new tests as there is no change in functionality, we're removing duplicate extra layouts. We're however adding a new 25 performance test for column flexboxes with percentage heights. With this patch we go from 3.5 layout/s to 145 layout/s 26 which is ~4000% better. 27 28 Inspired by Blink's crrev.com/c/1614058 by <cbiesinger@chromium.org>. 29 30 * rendering/RenderFlexibleBox.cpp: 31 (WebCore::RenderFlexibleBox::computeInnerFlexBaseSizeForChild): Do not unconditionally clear overriding sizes. Also removed 32 relayoutChildren which is now unused. Do not layout the item, that should have been done in 33 computeInnerFlexBaseSizeForChild() before. Added ASSERTs to verify that child's intrinsic main size was cached as 34 a consequence of the previous layout. 35 (WebCore::RenderFlexibleBox::constructFlexItem): Do not pass relayoutChildren to computeInnerFlexBaseSizeForChild. Also no 36 need to update it after laying out the child. 37 * rendering/RenderFlexibleBox.h: 38 39 40 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273264 268f45cc-cd09-0410-ab3c-d52691b4dbfc 41 42 2021-02-22 Sergio Villar Senin <svillar@igalia.com> 43 44 REGRESSION (r266695): twitch.tv: when in fullscreen, WebKit continually does 350ms layouts. Firefox and Chrome do not 45 https://bugs.webkit.org/show_bug.cgi?id=222202 46 <rdar://problem/74537782> 47 48 Reviewed by Simon Fraser. 49 50 New performance test for nested column flexboxes with percentage heights. 51 52 * Layout/nested-column-flexboxes-relative-height.html: Added. 53 1 54 2021-02-18 Myles C. Maxfield <mmaxfield@apple.com> 2 55 -
branches/safari-612.1.5-branch/Source/WebCore/ChangeLog
r273227 r273785 1 2021-03-02 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r273264. rdar://problem/74952900 4 5 REGRESSION (r266695): twitch.tv: when in fullscreen, WebKit continually does 350ms layouts. Firefox and Chrome do not 6 https://bugs.webkit.org/show_bug.cgi?id=222202 7 <rdar://problem/74537782> 8 9 Reviewed by Simon Fraser. 10 11 PerformanceTests: 12 13 New performance test for nested column flexboxes with percentage heights. 14 15 * Layout/nested-column-flexboxes-relative-height.html: Added. 16 17 Source/WebCore: 18 19 The problem was that we were doing the initial layout for the children of the flex container twice in those cases where 20 the child inline axis was not the main axis (for example with column flex containers in horizontal writing modes). 21 Refactored the code (specially the way we clear overriding sizes) so that we only do it once. This saves tons of layouts 22 in pages with nested column flexboxes with relative heights. 23 24 No new tests as there is no change in functionality, we're removing duplicate extra layouts. We're however adding a new 25 performance test for column flexboxes with percentage heights. With this patch we go from 3.5 layout/s to 145 layout/s 26 which is ~4000% better. 27 28 Inspired by Blink's crrev.com/c/1614058 by <cbiesinger@chromium.org>. 29 30 * rendering/RenderFlexibleBox.cpp: 31 (WebCore::RenderFlexibleBox::computeInnerFlexBaseSizeForChild): Do not unconditionally clear overriding sizes. Also removed 32 relayoutChildren which is now unused. Do not layout the item, that should have been done in 33 computeInnerFlexBaseSizeForChild() before. Added ASSERTs to verify that child's intrinsic main size was cached as 34 a consequence of the previous layout. 35 (WebCore::RenderFlexibleBox::constructFlexItem): Do not pass relayoutChildren to computeInnerFlexBaseSizeForChild. Also no 36 need to update it after laying out the child. 37 * rendering/RenderFlexibleBox.h: 38 39 40 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273264 268f45cc-cd09-0410-ab3c-d52691b4dbfc 41 42 2021-02-22 Sergio Villar Senin <svillar@igalia.com> 43 44 REGRESSION (r266695): twitch.tv: when in fullscreen, WebKit continually does 350ms layouts. Firefox and Chrome do not 45 https://bugs.webkit.org/show_bug.cgi?id=222202 46 <rdar://problem/74537782> 47 48 Reviewed by Simon Fraser. 49 50 The problem was that we were doing the initial layout for the children of the flex container twice in those cases where 51 the child inline axis was not the main axis (for example with column flex containers in horizontal writing modes). 52 Refactored the code (specially the way we clear overriding sizes) so that we only do it once. This saves tons of layouts 53 in pages with nested column flexboxes with relative heights. 54 55 No new tests as there is no change in functionality, we're removing duplicate extra layouts. We're however adding a new 56 performance test for column flexboxes with percentage heights. With this patch we go from 3.5 layout/s to 145 layout/s 57 which is ~4000% better. 58 59 Inspired by Blink's crrev.com/c/1614058 by <cbiesinger@chromium.org>. 60 61 * rendering/RenderFlexibleBox.cpp: 62 (WebCore::RenderFlexibleBox::computeInnerFlexBaseSizeForChild): Do not unconditionally clear overriding sizes. Also removed 63 relayoutChildren which is now unused. Do not layout the item, that should have been done in 64 computeInnerFlexBaseSizeForChild() before. Added ASSERTs to verify that child's intrinsic main size was cached as 65 a consequence of the previous layout. 66 (WebCore::RenderFlexibleBox::constructFlexItem): Do not pass relayoutChildren to computeInnerFlexBaseSizeForChild. Also no 67 need to update it after laying out the child. 68 * rendering/RenderFlexibleBox.h: 69 1 70 2021-02-21 Andres Gonzalez <andresg_22@apple.com> 2 71 -
branches/safari-612.1.5-branch/Source/WebCore/rendering/RenderFlexibleBox.cpp
r273193 r273785 895 895 896 896 897 LayoutUnit RenderFlexibleBox::computeInnerFlexBaseSizeForChild(RenderBox& child, LayoutUnit mainAxisBorderAndPadding, bool relayoutChildren) 898 { 899 child.clearOverridingContentSize(); 900 897 LayoutUnit RenderFlexibleBox::computeInnerFlexBaseSizeForChild(RenderBox& child, LayoutUnit mainAxisBorderAndPadding) 898 { 901 899 Length flexBasis = flexBasisForChild(child); 902 900 if (childMainSizeIsDefinite(child, flexBasis)) … … 908 906 } 909 907 910 // The flex basis is indefinite (=auto), so we need to compute the actual 911 // width of the child. For the logical width axis we just use the preferred 912 // width; for the height we need to lay out the child. 908 // The flex basis is indefinite (=auto), so we need to compute the actual width of the child. 913 909 LayoutUnit mainAxisExtent; 914 910 if (!mainAxisIsChildInlineAxis(child)) { 915 updateBlockChildDirtyBitsBeforeLayout(relayoutChildren, child); 916 if (child.needsLayout() || relayoutChildren || !m_intrinsicSizeAlongMainAxis.contains(&child)) { 917 if (!child.needsLayout()) 918 child.setChildNeedsLayout(MarkOnlyThis); 919 child.layoutIfNeeded(); 920 cacheChildMainSize(child); 921 } 911 ASSERT(!child.needsLayout()); 912 ASSERT(m_intrinsicSizeAlongMainAxis.contains(&child)); 922 913 mainAxisExtent = m_intrinsicSizeAlongMainAxis.get(&child); 923 914 } else { … … 1272 1263 FlexItem RenderFlexibleBox::constructFlexItem(RenderBox& child, bool relayoutChildren) 1273 1264 { 1265 child.clearOverridingContentSize(); 1274 1266 if (childHasIntrinsicMainAxisSize(child)) { 1275 1267 // If this condition is true, then computeMainAxisExtentForChild will call … … 1290 1282 child.layoutIfNeeded(); 1291 1283 cacheChildMainSize(child); 1292 relayoutChildren = false;1293 1284 child.clearOverridingContainingBlockContentSize(); 1294 1285 } … … 1296 1287 1297 1288 LayoutUnit borderAndPadding = isHorizontalFlow() ? child.horizontalBorderAndPaddingExtent() : child.verticalBorderAndPaddingExtent(); 1298 LayoutUnit childInnerFlexBaseSize = computeInnerFlexBaseSizeForChild(child, borderAndPadding , relayoutChildren);1289 LayoutUnit childInnerFlexBaseSize = computeInnerFlexBaseSizeForChild(child, borderAndPadding); 1299 1290 LayoutUnit childMinMaxAppliedMainAxisExtent = adjustChildSizeForMinAndMax(child, childInnerFlexBaseSize); 1300 1291 LayoutUnit margin = isHorizontalFlow() ? child.horizontalMarginExtent() : child.verticalMarginExtent(); -
branches/safari-612.1.5-branch/Source/WebCore/rendering/RenderFlexibleBox.h
r273072 r273785 145 145 LayoutUnit computeMainSizeFromAspectRatioUsing(const RenderBox& child, Length crossSizeLength) const; 146 146 void setFlowAwareLocationForChild(RenderBox& child, const LayoutPoint&); 147 LayoutUnit computeInnerFlexBaseSizeForChild(RenderBox& child, LayoutUnit mainAxisBorderAndPadding , bool relayoutChildren);147 LayoutUnit computeInnerFlexBaseSizeForChild(RenderBox& child, LayoutUnit mainAxisBorderAndPadding); 148 148 void adjustAlignmentForChild(RenderBox& child, LayoutUnit); 149 149 ItemPosition alignmentForChild(const RenderBox& child) const;
Note:
See TracChangeset
for help on using the changeset viewer.