REGRESSION(r280078): broke fast/images/exif-orientation-composited.html on windows
https://bugs.webkit.org/show_bug.cgi?id=228325

Reviewed by Javier Fernandez.

Source/WebCore:

The is to fix regression caused by r280078. After updating overridingLogicalWidth,
there is no need to reset the logicalWidth.

No test needed. Test fast/images/exif-orientation-composited.html is enough to cover
the affected code.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):

LayoutTests:

* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@282008 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index e25d10e..01e90fd 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2021-09-03  Ziran Sun  <zsun@igalia.com>
+
+        REGRESSION(r280078): broke fast/images/exif-orientation-composited.html on windows
+        https://bugs.webkit.org/show_bug.cgi?id=228325
+
+        Reviewed by Javier Fernandez.
+
+        * platform/win/TestExpectations:
+
 2021-09-03  Ayumi Kojima  <ayumi_kojima@apple.com>
 
         [ iOS EWS ] imported/w3c/web-platform-tests/content-security-policy/worker-src/service-* tests are flaky failing.
diff --git a/LayoutTests/platform/win/TestExpectations b/LayoutTests/platform/win/TestExpectations
index f43c2dd..db196f9 100644
--- a/LayoutTests/platform/win/TestExpectations
+++ b/LayoutTests/platform/win/TestExpectations
@@ -3786,8 +3786,6 @@
 
 webkit.org/b/177216 fast/images/animated-image-mp4.html [ Skip ]
 
-webkit.org/b/228325 fast/images/exif-orientation-composited.html [ Pass ImageOnlyFailure ]
-
 webkit.org/b/177234 http/wpt/resource-timing/rt-cors.html [ Skip ]
 webkit.org/b/177234 http/wpt/resource-timing/rt-cors.worker.html [ Skip ]
 
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 3991b5f..061c07f 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2021-09-03  Ziran Sun  <zsun@igalia.com>
+
+        REGRESSION(r280078): broke fast/images/exif-orientation-composited.html on windows
+        https://bugs.webkit.org/show_bug.cgi?id=228325
+
+        Reviewed by Javier Fernandez.
+
+        The is to fix regression caused by r280078. After updating overridingLogicalWidth,
+        there is no need to reset the logicalWidth.
+
+        No test needed. Test fast/images/exif-orientation-composited.html is enough to cover
+        the affected code.
+   
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
+
 2021-09-03  Peng Liu  <peng.liu6@apple.com>
 
         [iOS] Media playback continues after backgrounding Safari
diff --git a/Source/WebCore/rendering/RenderGrid.cpp b/Source/WebCore/rendering/RenderGrid.cpp
index b243b55..b0f7376 100644
--- a/Source/WebCore/rendering/RenderGrid.cpp
+++ b/Source/WebCore/rendering/RenderGrid.cpp
@@ -1177,10 +1177,8 @@
         LayoutUnit stretchedLogicalWidth = availableAlignmentSpaceForChildBeforeStretching(GridLayoutFunctions::overridingContainingBlockContentSizeForChild(child, childInlineDirection).value(), child);
         LayoutUnit desiredLogicalWidth = constrainLogicalWidthInFragmentByMinMax(stretchedLogicalWidth, contentWidth(), *this, nullptr);
         child.setOverridingLogicalWidth(desiredLogicalWidth);
-        if (desiredLogicalWidth != child.logicalWidth()) {
-            child.setLogicalWidth(0_lu);
+        if (desiredLogicalWidth != child.logicalWidth())
             child.setNeedsLayout(MarkOnlyThis);
-        }
     } 
 }