Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2c5b45546cbb71e62c00d1fefb3f20afbb74f0d0
      
https://github.com/WebKit/WebKit/commit/2c5b45546cbb71e62c00d1fefb3f20afbb74f0d0
  Author: Sammy Gill <[email protected]>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-with-aspect-ratio-uses-content-box-height-for-track-sizing-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-with-aspect-ratio-uses-content-box-height-for-track-sizing.html
    M Source/WebCore/rendering/RenderBox.cpp

  Log Message:
  -----------
  [css-grid][aspect-ratio] availableLogicalHeightUsing needs to consider 
AvailableLogicalHeightType when computing logical height from the aspect ratio
https://bugs.webkit.org/show_bug.cgi?id=263310
rdar://117138268

Reviewed by Alan Baradlay.

When availableLogicalHeightUsing determines that it needs to use the
box's logical width and aspect-ratio to compute the logical height, it
simply returns the value given from blockSizeFromAspectRatio. This is
not correct because blockSizeFromAspectRatio returns the computed border
box size which is not what the caller may want depending on the
specified value of heightType.

If the caller specifies a heightType of ExcludeMarginBorderPadding,
then we should remove the border and padding from the block sides of the
box. This is what grid expects when calling
availableLogicalHeight(ExcludeMarginBorderPadding)) to compute the
definite free space for the rows for the track sizing algorithm.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-with-aspect-ratio-uses-content-box-height-for-track-sizing-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-with-aspect-ratio-uses-content-box-height-for-track-sizing.html:
 Added.
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::availableLogicalHeightUsing const):

Canonical link: https://commits.webkit.org/270098@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to