Title: [281895] branches/safari-612-branch
Revision
281895
Author
[email protected]
Date
2021-09-01 18:04:56 -0700 (Wed, 01 Sep 2021)

Log Message

Cherry-pick r281662. rdar://problem/82651998

    REGRESSION(r275754): Using MarkOnlyThis to make the preferred width dirty introduces unexpected state
    https://bugs.webkit.org/show_bug.cgi?id=229586
    <rdar://82141454>

    LayoutTests/imported/w3c:

    Unreviewed revert of r275754.

    * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt:
    * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt:
    * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt:

    Source/WebCore:

    Unreviewed revert.

    * rendering/RenderBlock.cpp:
    (WebCore::RenderBlock::recomputeLogicalWidth):
    (WebCore::shouldRecalculateMinMaxWidthsAffectedByAncestor): Deleted.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281662 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-612-branch/LayoutTests/imported/w3c/ChangeLog (281894 => 281895)


--- branches/safari-612-branch/LayoutTests/imported/w3c/ChangeLog	2021-09-02 01:04:52 UTC (rev 281894)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/ChangeLog	2021-09-02 01:04:56 UTC (rev 281895)
@@ -1,3 +1,44 @@
+2021-09-01  Russell Epstein  <[email protected]>
+
+        Cherry-pick r281662. rdar://problem/82651998
+
+    REGRESSION(r275754): Using MarkOnlyThis to make the preferred width dirty introduces unexpected state
+    https://bugs.webkit.org/show_bug.cgi?id=229586
+    <rdar://82141454>
+    
+    LayoutTests/imported/w3c:
+    
+    Unreviewed revert of r275754.
+    
+    
+    * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt:
+    * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt:
+    * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt:
+    
+    Source/WebCore:
+    
+    Unreviewed revert.
+    
+    
+    * rendering/RenderBlock.cpp:
+    (WebCore::RenderBlock::recomputeLogicalWidth):
+    (WebCore::shouldRecalculateMinMaxWidthsAffectedByAncestor): Deleted.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-08-26  Alan Bujtas  <[email protected]>
+
+            REGRESSION(r275754): Using MarkOnlyThis to make the preferred width dirty introduces unexpected state
+            https://bugs.webkit.org/show_bug.cgi?id=229586
+            <rdar://82141454>
+
+            Unreviewed revert of r275754.
+
+            * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt:
+            * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt:
+            * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt:
+
 2021-08-18  Chris Dumez  <[email protected]>
 
         Unreviewed, reverting r281206.

Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt (281894 => 281895)


--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt	2021-09-02 01:04:52 UTC (rev 281894)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt	2021-09-02 01:04:56 UTC (rev 281895)
@@ -1,10 +1,30 @@
 
-PASS .grid 1
-PASS .grid 2
+FAIL .grid 1 assert_equals:
+<div class="grid">
+  <div class="paddingLeft50Percent" data-expected-padding-left="50" data-expected-width="60" data-expected-height="10">X</div>
+  <div data-offset-x="0" data-offset-y="10" data-expected-width="100" data-expected-height="10"></div>
+</div>
+width expected 60 but got 50
+FAIL .grid 2 assert_equals:
+<div class="grid">
+  <div class="paddingRight50Percent" data-expected-padding-right="50" data-expected-width="60" data-expected-height="10">X</div>
+  <div data-offset-x="0" data-offset-y="10" data-expected-width="100" data-expected-height="10"></div>
+</div>
+width expected 60 but got 50
 PASS .grid 3
 PASS .grid 4
-PASS .grid 5
-PASS .grid 6
+FAIL .grid 5 assert_equals:
+<div class="grid directionRTL">
+  <div class="paddingLeft50Percent" data-expected-padding-left="50" data-expected-width="60" data-expected-height="10">X</div>
+  <div data-offset-x="400" data-offset-y="10" data-expected-width="100" data-expected-height="10"></div>
+</div>
+width expected 60 but got 50
+FAIL .grid 6 assert_equals:
+<div class="grid directionRTL">
+  <div class="paddingRight50Percent" data-expected-padding-right="50" data-expected-width="60" data-expected-height="10">X</div>
+  <div data-offset-x="400" data-offset-y="10" data-expected-width="100" data-expected-height="10"></div>
+</div>
+width expected 60 but got 50
 PASS .grid 7
 PASS .grid 8
 Direction LTR

Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt (281894 => 281895)


--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt	2021-09-02 01:04:52 UTC (rev 281894)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt	2021-09-02 01:04:56 UTC (rev 281895)
@@ -1,12 +1,32 @@
 
 PASS .grid 1
 PASS .grid 2
-PASS .grid 3
-PASS .grid 4
+FAIL .grid 3 assert_equals:
+<div class="grid">
+  <div class="paddingTop50Percent" data-expected-padding-top="50" data-expected-width="10" data-expected-height="60">X</div>
+  <div data-offset-x="10" data-offset-y="0" data-expected-width="10" data-expected-height="100"></div>
+</div>
+height expected 60 but got 50
+FAIL .grid 4 assert_equals:
+<div class="grid">
+  <div class="paddingBottom50Percent" data-expected-padding-bottom="50" data-expected-width="10" data-expected-height="60">X</div>
+  <div data-offset-x="10" data-offset-y="0" data-expected-width="10" data-expected-height="100"></div>
+</div>
+height expected 60 but got 50
 PASS .grid 5
 PASS .grid 6
-PASS .grid 7
-PASS .grid 8
+FAIL .grid 7 assert_equals:
+<div class="grid directionRTL">
+  <div class="paddingTop50Percent" data-expected-padding-top="50" data-expected-width="10" data-expected-height="60">X</div>
+  <div data-offset-x="10" data-offset-y="400" data-expected-width="10" data-expected-height="100"></div>
+</div>
+height expected 60 but got 50
+FAIL .grid 8 assert_equals:
+<div class="grid directionRTL">
+  <div class="paddingBottom50Percent" data-expected-padding-bottom="50" data-expected-width="10" data-expected-height="60">X</div>
+  <div data-offset-x="10" data-offset-y="400" data-expected-width="10" data-expected-height="100"></div>
+</div>
+height expected 60 but got 50
 Direction LTR
 
 Item padding-left: 50%;

Modified: branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt (281894 => 281895)


--- branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt	2021-09-02 01:04:52 UTC (rev 281894)
+++ branches/safari-612-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt	2021-09-02 01:04:56 UTC (rev 281895)
@@ -1,12 +1,32 @@
 
 PASS .grid 1
 PASS .grid 2
-PASS .grid 3
-PASS .grid 4
+FAIL .grid 3 assert_equals:
+<div class="grid">
+  <div class="paddingTop50Percent" data-expected-padding-top="50" data-expected-width="10" data-expected-height="60">X</div>
+  <div data-offset-x="0" data-offset-y="0" data-expected-width="10" data-expected-height="100"></div>
+</div>
+height expected 60 but got 50
+FAIL .grid 4 assert_equals:
+<div class="grid">
+  <div class="paddingBottom50Percent" data-expected-padding-bottom="50" data-expected-width="10" data-expected-height="60">X</div>
+  <div data-offset-x="0" data-offset-y="0" data-expected-width="10" data-expected-height="100"></div>
+</div>
+height expected 60 but got 50
 PASS .grid 5
 PASS .grid 6
-PASS .grid 7
-PASS .grid 8
+FAIL .grid 7 assert_equals:
+<div class="grid directionRTL">
+  <div class="paddingTop50Percent" data-expected-padding-top="50" data-expected-width="10" data-expected-height="60">X</div>
+  <div data-offset-x="0" data-offset-y="400" data-expected-width="10" data-expected-height="100"></div>
+</div>
+height expected 60 but got 50
+FAIL .grid 8 assert_equals:
+<div class="grid directionRTL">
+  <div class="paddingBottom50Percent" data-expected-padding-bottom="50" data-expected-width="10" data-expected-height="60">X</div>
+  <div data-offset-x="0" data-offset-y="400" data-expected-width="10" data-expected-height="100"></div>
+</div>
+height expected 60 but got 50
 Direction LTR
 
 Item padding-left: 50%;

Modified: branches/safari-612-branch/Source/WebCore/ChangeLog (281894 => 281895)


--- branches/safari-612-branch/Source/WebCore/ChangeLog	2021-09-02 01:04:52 UTC (rev 281894)
+++ branches/safari-612-branch/Source/WebCore/ChangeLog	2021-09-02 01:04:56 UTC (rev 281895)
@@ -1,5 +1,46 @@
 2021-09-01  Russell Epstein  <[email protected]>
 
+        Cherry-pick r281662. rdar://problem/82651998
+
+    REGRESSION(r275754): Using MarkOnlyThis to make the preferred width dirty introduces unexpected state
+    https://bugs.webkit.org/show_bug.cgi?id=229586
+    <rdar://82141454>
+    
+    LayoutTests/imported/w3c:
+    
+    Unreviewed revert of r275754.
+    
+    
+    * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-002-expected.txt:
+    * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-lr-002-expected.txt:
+    * web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-vertical-rl-002-expected.txt:
+    
+    Source/WebCore:
+    
+    Unreviewed revert.
+    
+    
+    * rendering/RenderBlock.cpp:
+    (WebCore::RenderBlock::recomputeLogicalWidth):
+    (WebCore::shouldRecalculateMinMaxWidthsAffectedByAncestor): Deleted.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@281662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-08-26  Alan Bujtas  <[email protected]>
+
+            REGRESSION(r275754): Using MarkOnlyThis to make the preferred width dirty introduces unexpected state
+            https://bugs.webkit.org/show_bug.cgi?id=229586
+            <rdar://82141454>
+
+            Unreviewed revert.
+
+            * rendering/RenderBlock.cpp:
+            (WebCore::RenderBlock::recomputeLogicalWidth):
+            (WebCore::shouldRecalculateMinMaxWidthsAffectedByAncestor): Deleted.
+
+2021-09-01  Russell Epstein  <[email protected]>
+
         Cherry-pick r281367. rdar://problem/82651467
 
     Prevent AudioSession category from moving out of PlayAndRecord too quickly

Modified: branches/safari-612-branch/Source/WebCore/rendering/RenderBlock.cpp (281894 => 281895)


--- branches/safari-612-branch/Source/WebCore/rendering/RenderBlock.cpp	2021-09-02 01:04:52 UTC (rev 281894)
+++ branches/safari-612-branch/Source/WebCore/rendering/RenderBlock.cpp	2021-09-02 01:04:56 UTC (rev 281895)
@@ -629,31 +629,10 @@
         fragmentedFlow->logicalWidthChangedInFragmentsForBlock(this, relayoutChildren);
 }
 
-static bool shouldRecalculateMinMaxWidthsAffectedByAncestor(const RenderBox* box)
-{
-    // If the preferred widths are already dirty at this point (during layout), it actually means that we never need to calculate them, since that should
-    // have been carried out by an ancestor that's sized based on preferred widths (a shrink-to-fit container, for instance). In such cases the
-    // object will be left as dirty indefinitely, and it would just be a waste of time to calculate the preferred withs when nobody needs them.
-    if (box->preferredLogicalWidthsDirty())
-        return false;
-    // If our containing block also has min/max widths that are affected by the ancestry, we have already dealt with this object as well. Avoid
-    // unnecessary work and O(n^2) time complexity.
-    if (const RenderBox* cb = box->containingBlock()) {
-        if (cb->needsPreferredWidthsRecalculation() && !cb->preferredLogicalWidthsDirty())
-            return false;
-    }
-    return true;
-}
-
 bool RenderBlock::recomputeLogicalWidth()
 {
     LayoutUnit oldWidth = logicalWidth();
 
-    // Laying out this object means that its containing block is also being laid out. This object is special, in that its min/max widths depend on
-    // the ancestry (min/max width calculation should ideally be strictly bottom-up, but that's not always the case), so since the containing
-    // block size may have changed, we need to recalculate the min/max widths of this object, and every child that has the same issue, recursively.
-    if (needsPreferredWidthsRecalculation() && shouldRecalculateMinMaxWidthsAffectedByAncestor(this))
-        setPreferredLogicalWidthsDirty(true, MarkOnlyThis);
     updateLogicalWidth();
     
     bool hasBorderOrPaddingLogicalWidthChanged = this->hasBorderOrPaddingLogicalWidthChanged();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to