Changeset 285495 in webkit


Ignore:
Timestamp:
Nov 9, 2021 6:35:50 AM (8 months ago)
Author:
Alan Bujtas
Message:

Rendering bug with height: min-content, position: absolute, and box-sizing: border-box
https://bugs.webkit.org/show_bug.cgi?id=232816
<rdar://problem/85154265>

Reviewed by Antti Koivisto.

Source/WebCore:

After r199895, computeIntrinsicLogicalContentHeightUsing started returning the inflated height (content height + border + padding)
as content height for border-box box sizing. While some of the callers expect this inflated height, computePositionedLogicalHeightUsing
needs the actual content height. This is also similar to what we do with the width values.

Test: fast/block/out-of-flow-intrinsic-height.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::computePositionedLogicalHeightUsing const):

LayoutTests:

  • fast/block/out-of-flow-intrinsic-height-expected.html: Added.
  • fast/block/out-of-flow-intrinsic-height.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r285493 r285495  
     12021-11-09  Alan Bujtas  <zalan@apple.com>
     2
     3        Rendering bug with height: min-content, position: absolute, and box-sizing: border-box
     4        https://bugs.webkit.org/show_bug.cgi?id=232816
     5        <rdar://problem/85154265>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        * fast/block/out-of-flow-intrinsic-height-expected.html: Added.
     10        * fast/block/out-of-flow-intrinsic-height.html: Added.
     11
    1122021-11-09  Commit Queue  <commit-queue@webkit.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r285494 r285495  
     12021-11-09  Alan Bujtas  <zalan@apple.com>
     2
     3        Rendering bug with height: min-content, position: absolute, and box-sizing: border-box
     4        https://bugs.webkit.org/show_bug.cgi?id=232816
     5        <rdar://problem/85154265>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        After r199895, computeIntrinsicLogicalContentHeightUsing started returning the inflated height (content height + border + padding)
     10        as content height for border-box box sizing. While some of the callers expect this inflated height, computePositionedLogicalHeightUsing
     11        needs the actual content height. This is also similar to what we do with the width values.
     12
     13        Test: fast/block/out-of-flow-intrinsic-height.html
     14
     15        * rendering/RenderBox.cpp:
     16        (WebCore::RenderBox::computePositionedLogicalHeightUsing const):
     17
    1182021-11-09  Commit Queue  <commit-queue@webkit.org>
    219
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r285316 r285495  
    43444344    } else {
    43454345        if (logicalHeightLength.isIntrinsic())
    4346             resolvedLogicalHeight = computeIntrinsicLogicalContentHeightUsing(logicalHeightLength, contentLogicalHeight, bordersPlusPadding).value();
     4346            resolvedLogicalHeight = adjustContentBoxLogicalHeightForBoxSizing(computeIntrinsicLogicalContentHeightUsing(logicalHeightLength, contentLogicalHeight, bordersPlusPadding).value());
    43474347        else if (fromAspectRatio) {
    43484348            resolvedLogicalHeight = blockSizeFromAspectRatio(horizontalBorderAndPaddingExtent(), verticalBorderAndPaddingExtent(), LayoutUnit(style().logicalAspectRatio()), style().boxSizingForAspectRatio(), logicalWidth());
Note: See TracChangeset for help on using the changeset viewer.