| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
I see there were some mac test failures. A lot of times that can be do to rendering differences with text. You could try using Ahem font to see if that fixes the failures there (that's usually my first check when there are mac specific failures - if you search for ahem inside the grid lanes test directory, you should find some other tests that use this font for reference)
// Margins can affect the visual placement of the item, but should not causenit: I'd move this comment above the line above (where we set the margins)
<div style="background: aquamarine; height: 50px;" >
item 1
</div>
<div style="background: aquamarine; height: 50px;" >
item 1
</div>
<div style="background: aquamarine; height: 50px;" >
item 1
</div>nit: since more than one of these items is visible, I wonder if we should make these items 1,2,3,4,5 instead
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// Margins can affect the visual placement of the item, but should not causenit: I'd move this comment above the line above (where we set the margins)
Done
<div style="background: aquamarine; height: 50px;" >
item 1
</div>
<div style="background: aquamarine; height: 50px;" >
item 1
</div>
<div style="background: aquamarine; height: 50px;" >
item 1
</div>nit: since more than one of these items is visible, I wonder if we should make these items 1,2,3,4,5 instead
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
12 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: third_party/blink/renderer/core/layout/grid_lanes/grid_lanes_layout_algorithm.cc
Insertions: 2, Deletions: 1.
@@ -519,10 +519,11 @@
To<PhysicalBoxFragment>(result->GetPhysicalFragment());
const LogicalBoxFragment fragment(container_writing_direction,
physical_fragment);
- auto margins = ComputeMarginsFor(space, item_style, container_space);
+
// Margins can affect the visual placement of the item, but should not cause
// the running position to move backwards. If the margin size is greater
// than the size of the fragment, we should clamp the fragment size to 0.
+ auto margins = ComputeMarginsFor(space, item_style, container_space);
LayoutUnit fragment_size =
is_for_columns ? fragment.BlockSize() + margins.BlockSum()
: fragment.InlineSize() + margins.InlineSum();
```
```
The name of the file: third_party/blink/web_tests/external/wpt/css/css-grid/grid-lanes/tentative/item-placement/column-negative-margin-003-ref.html
Insertions: 2, Deletions: 2.
@@ -24,10 +24,10 @@
</div>
</div>
<div style="grid-column: 2;">
- <div class="orthogonal" style="background: lightsteelblue; width: 50px; margin-bottom: -30px; margin-top: -20px;">
+ <div class="orthogonal" style="background: lightsteelblue; width: 50px; height: 50px; margin-bottom: -30px; margin-top: -20px;">
item 2
</div>
- <div class="orthogonal" style="background: lightpink; width: 20px; margin-top: 13px; height: max-content;">
+ <div class="orthogonal" style="background: lightpink; width: 20px; height: max-content;">
item 4
</div>
</div>
```
```
The name of the file: third_party/blink/web_tests/external/wpt/css/css-grid/grid-lanes/tentative/item-placement/column-negative-margin-003.html
Insertions: 1, Deletions: 1.
@@ -25,7 +25,7 @@
item 1
</div>
<!-- Orthogonal item that should not regress the running position. -->
- <div class="orthogonal" style="background: lightsteelblue; width: 50px; margin-bottom: -30px; margin-top: -20px;">
+ <div class="orthogonal" style="background: lightsteelblue; width: 50px; height: 50px; margin-bottom: -30px; margin-top: -20px;">
item 2
</div>
<div style="background: lightblue; height: 30px;">
```
```
The name of the file: third_party/blink/web_tests/external/wpt/css/css-grid/grid-lanes/tentative/item-placement/row-negative-margin-003.html
Insertions: 3, Deletions: 2.
@@ -7,6 +7,7 @@
body, html {
color:black;
font-size:15px/1 monospace;
+ padding-left: 20px;
}
.grid-lanes {
@@ -25,13 +26,13 @@
item 1
</div>
<!-- Orthogonal item that should not regress the running position. -->
- <div class="orthogonal" style="background: lightsteelblue; height: 50px; margin-right: -30px; margin-left: -20px;">
+ <div class="orthogonal" style="background: lightsteelblue; width: 50px; margin-right: -30px; margin-left: -20px;">
item 2
</div>
<div style="background: lightblue; width: 30px;">
item 3
</div>
- <div class="orthogonal" style="background: lightpink; height: 20px;">
+ <div class="orthogonal" style="background: lightpink; height: 20px; width: max-content;">
item 4
</div>
<div class="orthogonal" style="background: yellow; width: 20px; margin-left: -10px;">
```
```
The name of the file: third_party/blink/web_tests/external/wpt/css/css-grid/grid-lanes/tentative/item-placement/column-negative-margin-001-ref.html
Insertions: 3, Deletions: 3.
@@ -10,13 +10,13 @@
item 1
</div>
<div style="background: lightblue; height: 50px;" >
- item 2
+ item 4
</div>
<div style="background: aquamarine; height: 50px;" >
- item 1
+ item 3
</div>
<div style="background: lightpink; height: 50px;">
- item 3
+ item 5
</div>
</div>
</body>
```
```
The name of the file: third_party/blink/web_tests/external/wpt/css/css-grid/grid-lanes/tentative/item-placement/column-negative-margin-001.html
Insertions: 7, Deletions: 7.
@@ -17,17 +17,17 @@
item 1
</div>
<div style="background: aquamarine; height: 50px;" >
- item 1
- </div>
- <div style="background: aquamarine; height: 50px;" >
- item 1
- </div>
- <div style="background: lightblue; height: 50px; margin-top: -100px;" >
item 2
</div>
- <div style="background: lightpink; height: 50px;">
+ <div style="background: aquamarine; height: 50px;" >
item 3
</div>
+ <div style="background: lightblue; height: 50px; margin-top: -100px;" >
+ item 4
+ </div>
+ <div style="background: lightpink; height: 50px;">
+ item 5
+ </div>
</div>
</body>
</html>
```
```
The name of the file: third_party/blink/web_tests/external/wpt/css/css-grid/grid-lanes/tentative/item-placement/row-negative-margin-003-ref.html
Insertions: 3, Deletions: 2.
@@ -5,6 +5,7 @@
body, html {
color:black;
font-size:15px/1 monospace;
+ padding-left: 20px;
}
.grid {
@@ -24,10 +25,10 @@
</div>
</div>
<div style="grid-row: 2; display: flex;">
- <div class="orthogonal" style="background: lightsteelblue; height: 50px; margin-left: -20px;">
+ <div class="orthogonal" style="background: lightsteelblue; width: 50px; margin-left: -20px; margin-right: -30px;">
item 2
</div>
- <div class="orthogonal" style="background: lightpink; height: 20px; width: 40px;">
+ <div class="orthogonal" style="background: lightpink; height: 20px; width: max-content;">
item 4
</div>
</div>
```
[Masonry] Clamp impact of negative margins on running positions to zero
Based on how the CSSWG resolved the effect of negative margins
(margin-top [1] and margin-bottom [2]), the item's VISUAL placement
should always be affected by negative margins without clamping, but the
track's running position should never go backwards -- this means that
when calculating an item's size contribution to the running position, we
should never allow the item's contribution to go below 0.
This change only tests for the running position contribution. Tests and
possible code changes needed for dense-packing will be added in a
follow-up change.
A baseline test was disabled as the negative margin handling for that
test is incorrect based on the resolution in [3].
[1] https://github.com/w3c/csswg-drafts/issues/12918
[2] https://github.com/w3c/csswg-drafts/issues/13164
[3] https://github.com/w3c/csswg-drafts/issues/13165
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/57999
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |