Diff
Modified: trunk/LayoutTests/ChangeLog (290578 => 290579)
--- trunk/LayoutTests/ChangeLog 2022-02-28 03:24:13 UTC (rev 290578)
+++ trunk/LayoutTests/ChangeLog 2022-02-28 03:28:15 UTC (rev 290579)
@@ -1,3 +1,17 @@
+2022-02-27 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r290577.
+ https://bugs.webkit.org/show_bug.cgi?id=237264
+
+ Breaks ios-wk2 layout test.
+
+ Reverted changeset:
+
+ "Compute correct containing block override size for items that
+ are subgridden in one dimension only."
+ https://bugs.webkit.org/show_bug.cgi?id=236951
+ https://commits.webkit.org/r290577
+
2022-02-27 Matt Woodrow <[email protected]>
Compute correct containing block override size for items that are subgridden in one dimension only.
Modified: trunk/LayoutTests/TestExpectations (290578 => 290579)
--- trunk/LayoutTests/TestExpectations 2022-02-28 03:24:13 UTC (rev 290578)
+++ trunk/LayoutTests/TestExpectations 2022-02-28 03:28:15 UTC (rev 290579)
@@ -1394,6 +1394,7 @@
imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/masonry-subgrid-001.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/masonry-subgrid-002.html [ ImageOnlyFailure ]
+webkit.org/b/236951 imported/w3c/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-001.html [ ImageOnlyFailure ]
webkit.org/b/236959 imported/w3c/web-platform-tests/css/css-grid/subgrid/baseline-001.html [ ImageOnlyFailure ]
webkit.org/b/236956 imported/w3c/web-platform-tests/css/css-grid/subgrid/grid-gap-003.html [ ImageOnlyFailure ]
webkit.org/b/236957 imported/w3c/web-platform-tests/css/css-grid/subgrid/line-names-007.html [ ImageOnlyFailure ]
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (290578 => 290579)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-02-28 03:24:13 UTC (rev 290578)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-02-28 03:28:15 UTC (rev 290579)
@@ -1,3 +1,17 @@
+2022-02-27 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r290577.
+ https://bugs.webkit.org/show_bug.cgi?id=237264
+
+ Breaks ios-wk2 layout test.
+
+ Reverted changeset:
+
+ "Compute correct containing block override size for items that
+ are subgridden in one dimension only."
+ https://bugs.webkit.org/show_bug.cgi?id=236951
+ https://commits.webkit.org/r290577
+
2022-02-27 Matt Woodrow <[email protected]>
Compute correct containing block override size for items that are subgridden in one dimension only.
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-002-expected.html (290578 => 290579)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-002-expected.html 2022-02-28 03:24:13 UTC (rev 290578)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-002-expected.html 2022-02-28 03:28:15 UTC (rev 290579)
@@ -1,64 +0,0 @@
-<!DOCTYPE HTML>
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html><head>
- <meta charset="utf-8">
- <title>Reference: subgrid auto track sizing</title>
- <link rel="author" title="Matt Woodrow" href=""
- <style>
-html,body {
- color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
-}
-
-.grid {
- display: inline-grid;
- max-width: 260px;
- padding: 1px 5px;
- border: 1px solid;
- grid-template-columns: 100px;
-}
-.subgrid {
- display: grid;
- grid-template-columns: 100%;
- margin: 0px 10px 0px 10px;
- background: grey;
-}
-
- </style>
-</head>
-<body>
-
-<article class="grid">
- <div class="subgrid">
- The cat can not be separated from milk
- </div>
-</article>
-
-<article class="grid">
- <div class="subgrid">
- The cat can not be separated from milk
- </div>
-</article>
-
-<article class="grid">
- <div class="subgrid">
- The cat can not be separated from milk
- </div>
-</article>
-
-<article class="grid">
- <div class="subgrid">
- The cat can not be separated from milk
- </div>
-</article>
-
-<article class="grid">
- <div class="subgrid">
- The cat can not be separated from milk
- </div>
-</article>
-
-</body>
-</html>
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-002.html (290578 => 290579)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-002.html 2022-02-28 03:24:13 UTC (rev 290578)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-002.html 2022-02-28 03:28:15 UTC (rev 290579)
@@ -1,80 +0,0 @@
-<!DOCTYPE HTML>
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html><head>
- <meta charset="utf-8">
- <title>Test: subgrid auto track sizing</title>
- <link rel="author" title="Matt Woodrow" href=""
- <link rel="help" href=""
- <link rel="match" href=""
- <style>
-html,body {
- color:black; background-color:white; font:16px/1 monospace; padding:0; margin:0;
-}
-
-.grid {
- display: inline-grid;
- max-width: 260px;
- padding: 1px 5px;
- border: 1px solid;
- grid-template-columns: 100px;
-}
-
-.subgrid {
- display: grid;
- grid-template-rows: subgrid;
- grid-template-columns: 100%;
- margin: 0px 5px 0px 10px;
-}
-
-.inner {
- margin: 0px 5px 0px 0px;
- background: grey;
-}
- </style>
-</head>
-<body>
-
-<article class="grid">
- <div class="subgrid" style="margin: 0px 10px 0px 10px; background: grey">
- The cat can not be separated from milk
- </div>
-</article>
-
-<article class="grid">
- <div class="subgrid">
- <div class="subgrid inner">
- The cat can not be separated from milk
- </div>
- </div>
-</article>
-
-<article class="grid">
- <div class="subgrid" style="grid-template-columns: subgrid">
- <div class="subgrid inner">
- The cat can not be separated from milk
- </div>
- </div>
-</article>
-
-<article class="grid">
- <div class="subgrid">
- <div class="subgrid inner" style="grid-template-columns: subgrid">
- The cat can not be separated from milk
- </div>
- </div>
-</article>
-
-<article class="grid">
- <div class="subgrid" style="grid-template-columns: subgrid">
- <div class="subgrid inner" style="grid-template-columns: subgrid">
- The cat can not be separated from milk
- </div>
- </div>
-</article>
-
-
-</body>
-</html>
Modified: trunk/Source/WebCore/ChangeLog (290578 => 290579)
--- trunk/Source/WebCore/ChangeLog 2022-02-28 03:24:13 UTC (rev 290578)
+++ trunk/Source/WebCore/ChangeLog 2022-02-28 03:28:15 UTC (rev 290579)
@@ -1,3 +1,17 @@
+2022-02-27 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r290577.
+ https://bugs.webkit.org/show_bug.cgi?id=237264
+
+ Breaks ios-wk2 layout test.
+
+ Reverted changeset:
+
+ "Compute correct containing block override size for items that
+ are subgridden in one dimension only."
+ https://bugs.webkit.org/show_bug.cgi?id=236951
+ https://commits.webkit.org/r290577
+
2022-02-27 Wenson Hsieh <[email protected]>
Invoking "Markup Image" should preserve the existing selection range
Modified: trunk/Source/WebCore/rendering/GridLayoutFunctions.cpp (290578 => 290579)
--- trunk/Source/WebCore/rendering/GridLayoutFunctions.cpp 2022-02-28 03:24:13 UTC (rev 290578)
+++ trunk/Source/WebCore/rendering/GridLayoutFunctions.cpp 2022-02-28 03:28:15 UTC (rev 290579)
@@ -103,7 +103,7 @@
return mbp;
}
-LayoutUnit extraMarginForSubgridAncestors(GridTrackSizingDirection direction, const RenderBox& child)
+static LayoutUnit extraMarginForSubgridAncestors(GridTrackSizingDirection direction, const RenderBox& child)
{
const RenderGrid* grid = downcast<RenderGrid>(child.parent());
LayoutUnit mbp;
Modified: trunk/Source/WebCore/rendering/GridLayoutFunctions.h (290578 => 290579)
--- trunk/Source/WebCore/rendering/GridLayoutFunctions.h 2022-02-28 03:24:13 UTC (rev 290578)
+++ trunk/Source/WebCore/rendering/GridLayoutFunctions.h 2022-02-28 03:28:15 UTC (rev 290579)
@@ -50,7 +50,6 @@
bool isFlippedDirection(const RenderGrid&, GridTrackSizingDirection);
bool isSubgridReversedDirection(const RenderGrid&, GridTrackSizingDirection outerDirection, const RenderGrid& subgrid);
-LayoutUnit extraMarginForSubgridAncestors(GridTrackSizingDirection, const RenderBox& child);
}
Modified: trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp (290578 => 290579)
--- trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp 2022-02-28 03:24:13 UTC (rev 290578)
+++ trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp 2022-02-28 03:28:15 UTC (rev 290579)
@@ -965,29 +965,6 @@
if (!overrideSize)
overrideSize = m_algorithm.gridAreaBreadthForChild(child, direction);
- if (renderGrid() != child.parent()) {
- RenderGrid* grid = downcast<RenderGrid>(child.parent());
-
- GridTrackSizingDirection subgridDirection = GridLayoutFunctions::flowAwareDirectionForChild(*renderGrid(), *grid, direction);
-
- if (grid->isSubgridOf(subgridDirection, *renderGrid())) {
- // If the item is subgridded in this direction (and thus the tracks it covers are tracks
- // owned by this sizing algorithm), then we want to take the breadth of the tracks we occupy,
- // and subtract any space occupied by the subgrid itself (and any ancestor subgrids).
- *overrideSize -= GridLayoutFunctions::extraMarginForSubgridAncestors(subgridDirection, child);
- } else {
- // Otherwise the tracks that this item covers (in this non-subgridded axis) are owned
- // by one of the intermediate RenderGrids (which are subgrids in the other axis). Recurse
- // until we find an element this is directly part of this grid and set the override size
- // for that, and then layout that item so that it computes the track sizes and sets the
- // override size we need.
- bool overrideSizeHasChanged =
- updateOverridingContainingBlockContentSizeForChild(*grid, direction);
- layoutGridItemForMinSizeComputation(*grid, overrideSizeHasChanged);
- return overrideSizeHasChanged;
- }
- }
-
if (GridLayoutFunctions::hasOverridingContainingBlockContentSizeForChild(child, direction) && GridLayoutFunctions::overridingContainingBlockContentSizeForChild(child, direction) == overrideSize)
return false;
Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (290578 => 290579)
--- trunk/Source/WebCore/rendering/RenderGrid.cpp 2022-02-28 03:24:13 UTC (rev 290578)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp 2022-02-28 03:28:15 UTC (rev 290579)
@@ -1628,18 +1628,6 @@
return isSubgrid(direction);
}
-bool RenderGrid::isSubgridOf(GridTrackSizingDirection direction, const RenderGrid& ancestor)
-{
- if (!isSubgrid(direction))
- return false;
- if (parent() == &ancestor)
- return true;
-
- auto& parentGrid = *downcast<RenderGrid>(parent());
- GridTrackSizingDirection parentDirection = GridLayoutFunctions::flowAwareDirectionForParent(parentGrid, *this, direction);
- return parentGrid.isSubgridOf(parentDirection, ancestor);
-}
-
bool RenderGrid::mayBeSubgridExcludingAbsPos(GridTrackSizingDirection direction) const
{
// Should exclude cases where we establish an IFC, like contain layout.
Modified: trunk/Source/WebCore/rendering/RenderGrid.h (290578 => 290579)
--- trunk/Source/WebCore/rendering/RenderGrid.h 2022-02-28 03:24:13 UTC (rev 290578)
+++ trunk/Source/WebCore/rendering/RenderGrid.h 2022-02-28 03:28:15 UTC (rev 290579)
@@ -96,12 +96,6 @@
return isSubgrid(ForColumns);
}
bool isSubgridInParentDirection(GridTrackSizingDirection parentDirection) const;
-
- // Returns true if this grid is inheriting subgridded tracks for
- // the given direction from the specified ancestor. This handles
- // nested subgrids, where ancestor may not be our direct parent.
- bool isSubgridOf(GridTrackSizingDirection, const RenderGrid& ancestor);
-
bool mayBeSubgridExcludingAbsPos(GridTrackSizingDirection) const;
const Grid& currentGrid() const