Changeset 271223 in webkit
- Timestamp:
- Jan 6, 2021 10:11:14 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r271218 r271223 1 2021-01-06 Rob Buis <rbuis@igalia.com> 2 3 Fix aspect ratio handling in RenderBox::computeLogicalWidthInFragment 4 https://bugs.webkit.org/show_bug.cgi?id=220138 5 6 Reviewed by Simon Fraser. 7 8 Enable some tests that pass now. 9 10 * TestExpectations: 11 1 12 2021-01-06 Aditya Keerthi <akeerthi@apple.com> 2 13 -
trunk/LayoutTests/TestExpectations
r271146 r271223 4438 4438 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-023.html [ ImageOnlyFailure ] 4439 4439 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-024.html [ ImageOnlyFailure ] 4440 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-025.html [ ImageOnlyFailure ]4441 4440 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-026.html [ ImageOnlyFailure ] 4442 4441 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-027.html [ ImageOnlyFailure ] … … 4449 4448 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-011.html [ ImageOnlyFailure ] 4450 4449 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-012.html [ ImageOnlyFailure ] 4451 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-013.html [ ImageOnlyFailure ]4452 4450 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-014.html [ ImageOnlyFailure ] 4453 4451 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-015.html [ ImageOnlyFailure ] … … 4458 4456 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-021.html [ ImageOnlyFailure ] 4459 4457 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-022.html [ ImageOnlyFailure ] 4460 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-024.html [ ImageOnlyFailure ]4461 4458 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-001.html [ ImageOnlyFailure ] 4462 4459 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-002.html [ ImageOnlyFailure ] -
trunk/Source/WebCore/ChangeLog
r271220 r271223 1 2021-01-06 Rob Buis <rbuis@igalia.com> 2 3 Fix aspect ratio handling in RenderBox::computeLogicalWidthInFragment 4 https://bugs.webkit.org/show_bug.cgi?id=220138 5 6 Reviewed by Simon Fraser. 7 8 The existing code does not respect min/max-height in the logical height 9 calculation, the computeLogicalWidthFromAspectRatio helper does, so use 10 it. 11 12 * rendering/RenderBox.cpp: 13 (WebCore::RenderBox::computeLogicalWidthInFragment const): 14 1 15 2021-01-06 Fujii Hironori <Hironori.Fujii@sony.com> 2 16 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r271061 r271223 2500 2500 containerWidthInInlineDirection = perpendicularContainingBlockLogicalHeight(); 2501 2501 2502 Optional<LayoutUnit> logicalHeight;2503 if (style().hasAspectRatio() && style().logicalWidth().isAuto() && (style().logicalHeight().isFixed() || style().logicalHeight().isPercentOrCalculated()))2504 logicalHeight = computeLogicalHeightUsing(MainOrPreferredSize, style().logicalHeight(), { });2505 2506 2502 // Width calculations 2507 if (logicalHeight) { 2508 LayoutUnit logicalWidth = inlineSizeFromAspectRatio(horizontalBorderAndPaddingExtent(), verticalBorderAndPaddingExtent(), style().logicalAspectRatio(), style().boxSizing(), *logicalHeight); 2509 computedValues.m_extent = constrainLogicalWidthInFragmentByMinMax(logicalWidth, containerWidthInInlineDirection, cb, fragment); 2503 if (shouldComputeLogicalWidthFromAspectRatio() && style().logicalWidth().isAuto()) { 2504 computedValues.m_extent = computeLogicalWidthFromAspectRatio(fragment); 2510 2505 } else if (treatAsReplaced) { 2511 2506 computedValues.m_extent = logicalWidthLength.value() + borderAndPaddingLogicalWidth();
Note: See TracChangeset
for help on using the changeset viewer.