Changeset 275758 in webkit


Ignore:
Timestamp:
Apr 9, 2021 4:35:30 AM (16 months ago)
Author:
commit-queue@webkit.org
Message:

[css-flexbox] max-height percentages are wrongly resolved for replaced grid items in nested percentage flexboxes
https://bugs.webkit.org/show_bug.cgi?id=223931

Patch by Ziran Sun <Ziran Sun> on 2021-04-09
Reviewed by Javier Fernandez.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-flexbox/percentage-max-height-004-expected.html: Added.
  • web-platform-tests/css/css-flexbox/percentage-max-height-004.html: Added.

Source/WebCore:

This change is to make sure that when overridingContainingBlockContentLogicalHeight of a replaced's containing block
element is indefinite, % max-height of the replaced element is resolved to none.

Test: imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004.html

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight const):

Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r275754 r275758  
     12021-04-09  Ziran Sun  <zsun@igalia.com>
     2
     3        [css-flexbox] max-height percentages are wrongly resolved for replaced grid items in nested percentage flexboxes
     4        https://bugs.webkit.org/show_bug.cgi?id=223931
     5
     6        Reviewed by Javier Fernandez.
     7
     8        * web-platform-tests/css/css-flexbox/percentage-max-height-004-expected.html: Added.
     9        * web-platform-tests/css/css-flexbox/percentage-max-height-004.html: Added.
     10
    1112021-04-09  Ziran Sun  <zsun@igalia.com>
    212
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/w3c-import.log

    r274721 r275758  
    15571557/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-003-expected.xht
    15581558/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-003.html
     1559/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004-expected.html
     1560/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004.html
    15591561/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-width-cross-axis.html
    15601562/LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/percentage-padding-001.html
  • trunk/Source/WebCore/ChangeLog

    r275757 r275758  
     12021-04-09  Ziran Sun  <zsun@igalia.com>
     2
     3        [css-flexbox] max-height percentages are wrongly resolved for replaced grid items in nested percentage flexboxes
     4        https://bugs.webkit.org/show_bug.cgi?id=223931
     5
     6        Reviewed by Javier Fernandez.
     7
     8        This change is to make sure that when overridingContainingBlockContentLogicalHeight of a replaced's containing block
     9        element is indefinite, % max-height of the replaced element  is resolved to none.
     10
     11        Test: imported/w3c/web-platform-tests/css/css-flexbox/percentage-max-height-004.html
     12
     13        * rendering/RenderBoxModelObject.cpp:
     14        (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight const):
     15
    1162021-04-09  Philippe Normand  <pnormand@igalia.com>
    217
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r274708 r275758  
    289289    if (!cb || (document().inQuirksMode() && !cb->isFlexibleBoxIncludingDeprecated()))
    290290        return false;
    291 
     291    if (thisBox && thisBox->hasOverridingContainingBlockContentLogicalHeight())
     292        return thisBox->overridingContainingBlockContentLogicalHeight() == WTF::nullopt;
    292293    return !cb->hasDefiniteLogicalHeight();
    293294}
Note: See TracChangeset for help on using the changeset viewer.