Changeset 272363 in webkit


Ignore:
Timestamp:
Feb 4, 2021 1:11:28 AM (3 years ago)
Author:
commit-queue@webkit.org
Message:

Make shouldComputeLogicalWidthFromAspectRatioAndInsets writing mode aware
https://bugs.webkit.org/show_bug.cgi?id=221328

Patch by Rob Buis <rbuis@igalia.com> on 2021-02-04
Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

Commit r271061 added support for aspect-ratio on positioned elements, taking into account
insets, but it failed to take writing-mode into account when checking insets. This change fixes
that by asking logical values.

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatioAndInsets const):

LayoutTests:

Enable some tests that pass now.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r272361 r272363  
     12021-02-04  Rob Buis  <rbuis@igalia.com>
     2
     3        Make shouldComputeLogicalWidthFromAspectRatioAndInsets writing mode aware
     4        https://bugs.webkit.org/show_bug.cgi?id=221328
     5
     6        Reviewed by Manuel Rego Casasnovas.
     7
     8        Enable some tests that pass now.
     9
     10        * TestExpectations:
     11
    1122021-02-04  Miguel Gomez  <magomez@igalia.com>
    213
  • trunk/LayoutTests/TestExpectations

    r272360 r272363  
    44094409webkit.org/b/214462 imported/w3c/web-platform-tests/css/css-scoping/slotted-placeholder.html [ ImageOnlyFailure ]
    44104410
    4411 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/abspos-004.html [ ImageOnlyFailure ]
    44124411webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/abspos-012.html [ ImageOnlyFailure ]
    44134412webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/abspos-013.html [ ImageOnlyFailure ]
    44144413webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/abspos-014.html [ ImageOnlyFailure ]
    4415 webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/abspos-015.html [ ImageOnlyFailure ]
    44164414webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-004.html [ ImageOnlyFailure ]
    44174415webkit.org/b/214463 imported/w3c/web-platform-tests/css/css-sizing/aspect-ratio/block-aspect-ratio-006.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r272361 r272363  
     12021-02-04  Rob Buis  <rbuis@igalia.com>
     2
     3        Make shouldComputeLogicalWidthFromAspectRatioAndInsets writing mode aware
     4        https://bugs.webkit.org/show_bug.cgi?id=221328
     5
     6        Reviewed by Manuel Rego Casasnovas.
     7
     8        Commit r271061 added support for aspect-ratio on positioned elements, taking into account
     9        insets, but it failed to take writing-mode into account when checking insets. This change fixes
     10        that by asking logical values.
     11
     12        * rendering/RenderBox.cpp:
     13        (WebCore::RenderBox::shouldComputeLogicalWidthFromAspectRatioAndInsets const):
     14
    1152021-02-04  Miguel Gomez  <magomez@igalia.com>
    216
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r272360 r272363  
    51015101        return false;
    51025102    // FIXME: see if this can become a helper on RenderStyle.
    5103     if (style().width().isAuto() && style().height().isAuto() && !style().top().isAuto() && !style().bottom().isAuto() && (style().left().isAuto() || style().right().isAuto()))
     5103    if (style().width().isAuto() && style().height().isAuto() && !style().logicalTop().isAuto() && !style().logicalBottom().isAuto() && (style().logicalLeft().isAuto() || style().logicalRight().isAuto()))
    51045104        return true;
    51055105    return false;
Note: See TracChangeset for help on using the changeset viewer.