Title: [271436] trunk
Revision
271436
Author
[email protected]
Date
2021-01-13 03:54:00 -0800 (Wed, 13 Jan 2021)

Log Message

REGRESSION(r268666) Incorrect vertical position inside grid items with padding
https://bugs.webkit.org/show_bug.cgi?id=220524

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

In r268666 we sanitized and renamed the old overrideLogicalXXX sizes so that they store what they say.
There was a mistake in one of those renames, in availableLogicalHeightForPercentageComputation() we were
returning the border box size for the case of grid items. That's clearly wrong as we should return the
content box size. That's why adding a padding to a grid item was causing their children to wrongly
evaluate the available logical height.

This fixes a WPT that was marked as failure.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const): Return the
overridingContentLogicalHeight instead of the overridingLogicalHeight.

LayoutTests:

* TestExpectations: remove web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-001.html
from the list of image failures.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (271435 => 271436)


--- trunk/LayoutTests/ChangeLog	2021-01-13 10:11:25 UTC (rev 271435)
+++ trunk/LayoutTests/ChangeLog	2021-01-13 11:54:00 UTC (rev 271436)
@@ -1,3 +1,13 @@
+2021-01-13  Sergio Villar Senin  <[email protected]>
+
+        REGRESSION(r268666) Incorrect vertical position inside grid items with padding
+        https://bugs.webkit.org/show_bug.cgi?id=220524
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        * TestExpectations: remove web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-001.html
+        from the list of image failures.
+
 2021-01-12  Antoine Quint  <[email protected]>
 
         REGRESSION (r267571): black line appears upon navigating back from apple.com shopping bag

Modified: trunk/LayoutTests/TestExpectations (271435 => 271436)


--- trunk/LayoutTests/TestExpectations	2021-01-13 10:11:25 UTC (rev 271435)
+++ trunk/LayoutTests/TestExpectations	2021-01-13 11:54:00 UTC (rev 271436)
@@ -1206,7 +1206,6 @@
 webkit.org/b/216145 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-8.html [ ImageOnlyFailure ]
 webkit.org/b/216145 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-9.html [ ImageOnlyFailure ]
 webkit.org/b/216145 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-item-no-aspect-ratio-stretch-10.html [ ImageOnlyFailure ]
-webkit.org/b/191461 imported/w3c/web-platform-tests/css/css-grid/grid-items/percentage-size-subitems-001.html [ ImageOnlyFailure ]
 webkit.org/b/191463 imported/w3c/web-platform-tests/css/css-grid/grid-items/explicitly-sized-grid-item-as-table.html [ ImageOnlyFailure ]
 webkit.org/b/191627 imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-baseline-not-applied-if-sizing-cyclic-dependency-001.html [ Failure ]
 webkit.org/b/149890 fast/css-grid-layout/grid-shorthands-style-format.html [ Failure ]

Modified: trunk/Source/WebCore/ChangeLog (271435 => 271436)


--- trunk/Source/WebCore/ChangeLog	2021-01-13 10:11:25 UTC (rev 271435)
+++ trunk/Source/WebCore/ChangeLog	2021-01-13 11:54:00 UTC (rev 271436)
@@ -1,3 +1,22 @@
+2021-01-13  Sergio Villar Senin  <[email protected]>
+
+        REGRESSION(r268666) Incorrect vertical position inside grid items with padding
+        https://bugs.webkit.org/show_bug.cgi?id=220524
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        In r268666 we sanitized and renamed the old overrideLogicalXXX sizes so that they store what they say.
+        There was a mistake in one of those renames, in availableLogicalHeightForPercentageComputation() we were
+        returning the border box size for the case of grid items. That's clearly wrong as we should return the
+        content box size. That's why adding a padding to a grid item was causing their children to wrongly
+        evaluate the available logical height.
+
+        This fixes a WPT that was marked as failure.
+
+        * rendering/RenderBlock.cpp:
+        (WebCore::RenderBlock::availableLogicalHeightForPercentageComputation const): Return the
+        overridingContentLogicalHeight instead of the overridingLogicalHeight.
+
 2021-01-12  Antoine Quint  <[email protected]>
 
         REGRESSION (r267571): black line appears upon navigating back from apple.com shopping bag

Modified: trunk/Source/WebCore/rendering/RenderBlock.cpp (271435 => 271436)


--- trunk/Source/WebCore/rendering/RenderBlock.cpp	2021-01-13 10:11:25 UTC (rev 271435)
+++ trunk/Source/WebCore/rendering/RenderBlock.cpp	2021-01-13 11:54:00 UTC (rev 271436)
@@ -3203,7 +3203,7 @@
     if (stretchedFlexHeight)
         availableHeight = stretchedFlexHeight;
     else if (isGridItem() && hasOverridingLogicalHeight())
-        availableHeight = overridingLogicalHeight();
+        availableHeight = overridingContentLogicalHeight();
     else if (styleToUse.logicalHeight().isFixed()) {
         LayoutUnit contentBoxHeight = adjustContentBoxLogicalHeightForBoxSizing((LayoutUnit)styleToUse.logicalHeight().value());
         availableHeight = std::max(0_lu, constrainContentBoxLogicalHeightByMinMax(contentBoxHeight - scrollbarLogicalHeight(), WTF::nullopt));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to