Changeset 272992 in webkit


Ignore:
Timestamp:
Feb 17, 2021 2:37:55 AM (3 years ago)
Author:
commit-queue@webkit.org
Message:

Improve percentage height in shouldComputeLogicalWidthFromAspectRatio
https://bugs.webkit.org/show_bug.cgi?id=221405

Patch by Rob Buis <rbuis@igalia.com> on 2021-02-17
Reviewed by Simon Fraser.

Source/WebCore:

When checking whether the percentage logical height can be used to
calculate the logical width, we need to also check that it is resolvable.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatio const):

LayoutTests:

Enable some tests that pass now.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r272983 r272992  
     12021-02-17  Rob Buis  <rbuis@igalia.com>
     2
     3        Improve percentage height in shouldComputeLogicalWidthFromAspectRatio
     4        https://bugs.webkit.org/show_bug.cgi?id=221405
     5
     6        Reviewed by Simon Fraser.
     7
     8        Enable some tests that pass now.
     9
     10        * TestExpectations:
     11
    1122021-02-16  Manuel Rego Casasnovas  <rego@igalia.com>
    213
  • trunk/LayoutTests/TestExpectations

    r272927 r272992  
    45604560webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-024.html [ ImageOnlyFailure ]
    45614561webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-028.html [ ImageOnlyFailure ]
    4562 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-030.html [ ImageOnlyFailure ]
    45634562webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-001.html [ ImageOnlyFailure ]
    45644563webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/flex-aspect-ratio-002.html [ ImageOnlyFailure ]
     
    45844583webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-005.html [ ImageOnlyFailure ]
    45854584webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-006.html [ ImageOnlyFailure ]
    4586 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-007.html [ ImageOnlyFailure ]
    45874585webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-008.html [ ImageOnlyFailure ]
    45884586webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/intrinsic-size-010.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r272987 r272992  
     12021-02-17  Rob Buis  <rbuis@igalia.com>
     2
     3        Improve percentage height in shouldComputeLogicalWidthFromAspectRatio
     4        https://bugs.webkit.org/show_bug.cgi?id=221405
     5
     6        Reviewed by Simon Fraser.
     7
     8        When checking whether the percentage logical height can be used to
     9        calculate the logical width, we need to also check that it is resolvable.
     10
     11        * rendering/RenderBox.cpp:
     12        (WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatio const):
     13
    1142021-02-16  Sam Weinig  <weinig@apple.com>
    215
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r272805 r272992  
    51015101        return false;
    51025102
    5103     if (!shouldComputeLogicalWidthFromAspectRatioAndInsets() && !style().logicalHeight().isFixed() && !style().logicalHeight().isPercentOrCalculated())
     5103    auto isResolvablePercentageHeight = [this] () {
     5104        return style().logicalHeight().isPercentOrCalculated() && (isOutOfFlowPositioned() || percentageLogicalHeightIsResolvable());
     5105    };
     5106    if (!shouldComputeLogicalWidthFromAspectRatioAndInsets() && !style().logicalHeight().isFixed() && !isResolvablePercentageHeight())
    51045107        return false;
    51055108
Note: See TracChangeset for help on using the changeset viewer.