Title: [272367] trunk
Revision
272367
Author
commit-qu...@webkit.org
Date
2021-02-04 04:48:46 -0800 (Thu, 04 Feb 2021)

Log Message

Unreviewed, reverting r272338.
https://bugs.webkit.org/show_bug.cgi?id=221403

Broke a layout test percentage-height-in-flexbox.html

Reverted changeset:

"the nested grid container which has replaced item with 'max-
height' has wrong width(0px)."
https://bugs.webkit.org/show_bug.cgi?id=219194
https://trac.webkit.org/changeset/272338

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (272366 => 272367)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-02-04 12:01:29 UTC (rev 272366)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-02-04 12:48:46 UTC (rev 272367)
@@ -1,3 +1,17 @@
+2021-02-04  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, reverting r272338.
+        https://bugs.webkit.org/show_bug.cgi?id=221403
+
+        Broke a layout test percentage-height-in-flexbox.html
+
+        Reverted changeset:
+
+        "the nested grid container which has replaced item with 'max-
+        height' has wrong width(0px)."
+        https://bugs.webkit.org/show_bug.cgi?id=219194
+        https://trac.webkit.org/changeset/272338
+
 2021-02-04  Martin Robinson  <mrobin...@webkit.org>
 
         Improve the serialization of scroll-snap-type and scroll-snap-align

Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001-expected.html (272366 => 272367)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001-expected.html	2021-02-04 12:01:29 UTC (rev 272366)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001-expected.html	2021-02-04 12:48:46 UTC (rev 272367)
@@ -1,14 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Reference: 100x100 green square image in the middle</title>
-<link rel="author" title="Hyunjune Kim" href=""
-<style>
-  img {
-    display: block;
-    margin: auto;
-  }
-</style>
-<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
-<div>
-  <img src=""
-</div>

Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html (272366 => 272367)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html	2021-02-04 12:01:29 UTC (rev 272366)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html	2021-02-04 12:48:46 UTC (rev 272367)
@@ -1,47 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>CSS Grid Layout Test: Margin auto and replaced grid item</title>
-<link rel="author" title="Hyunjune Kim" href=""
-<link rel="help" href=""
-<meta name="assert" content="Checks width of the nested grid container applied 'margin:auto' with a replaced item which has a property called max-height.">
-<link rel="match" href=""
-<style>
-  #reference-overlapped-red {
-    position: absolute;
-    background-color: red;
-    width: 100px;
-    height: 100px;
-    left:0;
-    right:0;
-    margin: auto;
-    z-index: -1;
-  }
-  .grid {
-    display: grid;
-  }
-  .nested-grid {
-    display: grid;
-    margin: auto;
-  }
-  img {
-    max-height: 100%;
-  }
-</style>
-
-<body _onload_="loadImage()">
-
-<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
-
-<div class="grid">
-  <div id="reference-overlapped-red"></div>
-  <div class="nested-grid">
-    <img id="replaced">
-  </div>
-</div>
-
-<script>
-function loadImage() {
-  var replaced = document.getElementById("replaced");
-  replaced.src = ""
-}
-</script>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/w3c-import.log (272366 => 272367)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/w3c-import.log	2021-02-04 12:01:29 UTC (rev 272366)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/w3c-import.log	2021-02-04 12:48:46 UTC (rev 272367)
@@ -18,7 +18,6 @@
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/anonymous-grid-item-001.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/explicitly-sized-grid-item-as-table-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/explicitly-sized-grid-item-as-table.html
-/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-auto-margin-and-replaced-item-001.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-automatic-minimum-intrinsic-aspect-ratio-001.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-img-item-percent-max-height-001.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-inline-items-001-expected.xht

Modified: trunk/Source/WebCore/ChangeLog (272366 => 272367)


--- trunk/Source/WebCore/ChangeLog	2021-02-04 12:01:29 UTC (rev 272366)
+++ trunk/Source/WebCore/ChangeLog	2021-02-04 12:48:46 UTC (rev 272367)
@@ -1,3 +1,17 @@
+2021-02-04  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, reverting r272338.
+        https://bugs.webkit.org/show_bug.cgi?id=221403
+
+        Broke a layout test percentage-height-in-flexbox.html
+
+        Reverted changeset:
+
+        "the nested grid container which has replaced item with 'max-
+        height' has wrong width(0px)."
+        https://bugs.webkit.org/show_bug.cgi?id=219194
+        https://trac.webkit.org/changeset/272338
+
 2021-02-04  Martin Robinson  <mrobin...@webkit.org>
 
         Improve the serialization of scroll-snap-type and scroll-snap-align

Modified: trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp (272366 => 272367)


--- trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp	2021-02-04 12:01:29 UTC (rev 272366)
+++ trunk/Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp	2021-02-04 12:48:46 UTC (rev 272367)
@@ -775,8 +775,6 @@
     if (direction() == childInlineDirection) {
         // FIXME: It's unclear if we should return the intrinsic width or the preferred width.
         // See http://lists.w3.org/Archives/Public/www-style/2013Jan/0245.html
-        if (child.needsPreferredWidthsRecalculation())
-            child.setPreferredLogicalWidthsDirty(true);
         return child.minPreferredLogicalWidth() + GridLayoutFunctions::marginLogicalSizeForChild(*renderGrid(), childInlineDirection, child) + m_algorithm.baselineOffsetForChild(child, gridAxisForDirection(direction()));
     }
 
@@ -791,8 +789,6 @@
     if (direction() == childInlineDirection) {
         // FIXME: It's unclear if we should return the intrinsic width or the preferred width.
         // See http://lists.w3.org/Archives/Public/www-style/2013Jan/0245.html
-        if (child.needsPreferredWidthsRecalculation())
-            child.setPreferredLogicalWidthsDirty(true);
         return child.maxPreferredLogicalWidth() + GridLayoutFunctions::marginLogicalSizeForChild(*renderGrid(), childInlineDirection, child) + m_algorithm.baselineOffsetForChild(child, gridAxisForDirection(direction()));
     }
 

Modified: trunk/Source/WebCore/rendering/RenderReplaced.cpp (272366 => 272367)


--- trunk/Source/WebCore/rendering/RenderReplaced.cpp	2021-02-04 12:01:29 UTC (rev 272366)
+++ trunk/Source/WebCore/rendering/RenderReplaced.cpp	2021-02-04 12:48:46 UTC (rev 272367)
@@ -792,10 +792,4 @@
     return visibleRect.intersects(contentRect);
 }
 
-bool RenderReplaced::needsPreferredWidthsRecalculation() const
-{
-    // If the height is a percentage and the width is auto, then the containingBlocks's height changing can cause this node to change it's preferred width because it maintains aspect ratio.
-    return hasRelativeLogicalHeight() && style().logicalWidth().isAuto();
 }
-
-}

Modified: trunk/Source/WebCore/rendering/RenderReplaced.h (272366 => 272367)


--- trunk/Source/WebCore/rendering/RenderReplaced.h	2021-02-04 12:01:29 UTC (rev 272366)
+++ trunk/Source/WebCore/rendering/RenderReplaced.h	2021-02-04 12:48:46 UTC (rev 272367)
@@ -45,7 +45,6 @@
     RoundedRect roundedContentBoxRect() const;
     
     bool isContentLikelyVisibleInViewport();
-    bool needsPreferredWidthsRecalculation() const override;
 
 protected:
     RenderReplaced(Element&, RenderStyle&&);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to