Changeset 274419 in webkit


Ignore:
Timestamp:
Mar 15, 2021 6:18:25 AM (16 months ago)
Author:
commit-queue@webkit.org
Message:

Treat min-intrinsic like *-content
https://bugs.webkit.org/show_bug.cgi?id=222854

Patch by Rob Buis <rbuis@igalia.com> on 2021-03-15
Reviewed by Sergio Villar Senin.

Source/WebCore:

Treat min-intrinsic like *-content for intrinsic logical
content calculations.

Test: fast/flexbox/indefinite-width-crash.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing const):
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing const):

LayoutTests:

Add test for this.

  • fast/flexbox/indefinite-width-crash-expected.txt: Added.
  • fast/flexbox/indefinite-width-crash.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r274416 r274419  
     12021-03-15  Rob Buis  <rbuis@igalia.com>
     2
     3        Treat min-intrinsic like *-content
     4        https://bugs.webkit.org/show_bug.cgi?id=222854
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        Add test for this.
     9
     10        * fast/flexbox/indefinite-width-crash-expected.txt: Added.
     11        * fast/flexbox/indefinite-width-crash.html: Added.
     12
    1132021-03-15  Imanol Fernandez  <ifernandez@igalia.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r274416 r274419  
     12021-03-15  Rob Buis  <rbuis@igalia.com>
     2
     3        Treat min-intrinsic like *-content
     4        https://bugs.webkit.org/show_bug.cgi?id=222854
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        Treat min-intrinsic like *-content for intrinsic logical
     9        content calculations.
     10
     11        Test: fast/flexbox/indefinite-width-crash.html
     12
     13        * rendering/RenderBox.cpp:
     14        (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing const):
     15        (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing const):
     16
    1172021-03-15  Imanol Fernandez  <ifernandez@igalia.com>
    218
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r274287 r274419  
    30233023    // FIXME: The CSS sizing spec is considering changing what min-content/max-content should resolve to.
    30243024    // If that happens, this code will have to change.
    3025     if (logicalHeightLength.isMinContent() || logicalHeightLength.isMaxContent() || logicalHeightLength.isFitContent()) {
    3026         if (!intrinsicContentHeight)
    3027             return intrinsicContentHeight;
    3028         if (style().boxSizing() == BoxSizing::BorderBox)
     3025    if (logicalHeightLength.isMinContent() || logicalHeightLength.isMaxContent() || logicalHeightLength.isFitContent() || logicalHeightLength.isMinIntrinsic()) {
     3026        if (intrinsicContentHeight && style().boxSizing() == BoxSizing::BorderBox)
    30293027            return intrinsicContentHeight.value() + borderAndPaddingLogicalHeight();
    30303028        return intrinsicContentHeight;
     
    30423040    // FIXME: The CSS sizing spec is considering changing what min-content/max-content should resolve to.
    30433041    // If that happens, this code will have to change.
    3044     if (height.isIntrinsic())
     3042    if (height.isIntrinsic() || height.isMinIntrinsic())
    30453043        return computeIntrinsicLogicalContentHeightUsing(height, intrinsicContentHeight, borderAndPaddingLogicalHeight());
    30463044    if (height.isFixed())
Note: See TracChangeset for help on using the changeset viewer.