Title: [276971] trunk
Revision
276971
Author
[email protected]
Date
2021-05-04 11:19:43 -0700 (Tue, 04 May 2021)

Log Message

ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
https://bugs.webkit.org/show_bug.cgi?id=222711
<rdar://problem/75022692>

Reviewed by Alan Bujtas.

Source/WebCore:

Flexbox code was computing negative content sizes for FrameSet children because RenderFrameSet lacked
a implementation of computePreferredLogicalWidths(). Added basic preferred width computation
to RenderBox so that FrameSet and any other potential new RenderBox child could benefit from it.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePreferredLogicalWidths): Added a basic implementation that calls
computePreferredLogicalWidths(minWidth,maxWidth,borderAndPadding) and clears the flag.
* rendering/RenderBox.h:
(WebCore::RenderBox::computePreferredLogicalWidths): Deleted default implementation.

LayoutTests:

* TestExpectations: Unskipped a test that is passing now.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (276970 => 276971)


--- trunk/LayoutTests/ChangeLog	2021-05-04 18:14:48 UTC (rev 276970)
+++ trunk/LayoutTests/ChangeLog	2021-05-04 18:19:43 UTC (rev 276971)
@@ -1,3 +1,13 @@
+2021-05-04  Sergio Villar Senin  <[email protected]>
+
+        ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
+        https://bugs.webkit.org/show_bug.cgi?id=222711
+        <rdar://problem/75022692>
+
+        Reviewed by Alan Bujtas.
+
+        * TestExpectations: Unskipped a test that is passing now.
+
 2021-05-04  Antoine Quint  <[email protected]>
 
         REGRESSION (r260360): animation-wide timing function does not apply to 2-keyframe transform Web Animation

Modified: trunk/LayoutTests/TestExpectations (276970 => 276971)


--- trunk/LayoutTests/TestExpectations	2021-05-04 18:14:48 UTC (rev 276970)
+++ trunk/LayoutTests/TestExpectations	2021-05-04 18:19:43 UTC (rev 276971)
@@ -3946,9 +3946,6 @@
 # Painting order in flexbox
 webkit.org/b/221482 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-paint-ordering-002.xhtml [ ImageOnlyFailure ]
 
-# Test ASSERTing in Debug.
-webkit.org/b/222711 [ Debug ] imported/w3c/web-platform-tests/css/css-flexbox/frameset-crash.html [ Skip ]
-
 # Newly imported Canvas WPT tests that are failing.
 imported/w3c/web-platform-tests/html/canvas/element/building-paths/canvas_complexshapes_arcto_001.htm [ ImageOnlyFailure Pass ]
 imported/w3c/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html [ Failure Pass ]

Modified: trunk/Source/WebCore/ChangeLog (276970 => 276971)


--- trunk/Source/WebCore/ChangeLog	2021-05-04 18:14:48 UTC (rev 276970)
+++ trunk/Source/WebCore/ChangeLog	2021-05-04 18:19:43 UTC (rev 276971)
@@ -1,3 +1,21 @@
+2021-05-04  Sergio Villar Senin  <[email protected]>
+
+        ASSERTION FAILED: contentSize >= 0 in WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax
+        https://bugs.webkit.org/show_bug.cgi?id=222711
+        <rdar://problem/75022692>
+
+        Reviewed by Alan Bujtas.
+
+        Flexbox code was computing negative content sizes for FrameSet children because RenderFrameSet lacked
+        a implementation of computePreferredLogicalWidths(). Added basic preferred width computation
+        to RenderBox so that FrameSet and any other potential new RenderBox child could benefit from it.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::computePreferredLogicalWidths): Added a basic implementation that calls
+        computePreferredLogicalWidths(minWidth,maxWidth,borderAndPadding) and clears the flag.
+        * rendering/RenderBox.h:
+        (WebCore::RenderBox::computePreferredLogicalWidths): Deleted default implementation.
+
 2021-05-04  Antoine Quint  <[email protected]>
 
         REGRESSION (r260360): animation-wide timing function does not apply to 2-keyframe transform Web Animation

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (276970 => 276971)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2021-05-04 18:14:48 UTC (rev 276970)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2021-05-04 18:19:43 UTC (rev 276971)
@@ -3223,6 +3223,14 @@
 #endif
 }
 
+void RenderBox::computePreferredLogicalWidths()
+{
+    ASSERT(preferredLogicalWidthsDirty());
+
+    computePreferredLogicalWidths(style().logicalMinWidth(), style().logicalMaxWidth(), borderAndPaddingLogicalWidth());
+    setPreferredLogicalWidthsDirty(false);
+}
+
 void RenderBox::computePreferredLogicalWidths(const Length& minWidth, const Length& maxWidth, LayoutUnit borderAndPadding)
 {
     if (shouldComputeLogicalHeightFromAspectRatio()) {

Modified: trunk/Source/WebCore/rendering/RenderBox.h (276970 => 276971)


--- trunk/Source/WebCore/rendering/RenderBox.h	2021-05-04 18:14:48 UTC (rev 276970)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2021-05-04 18:19:43 UTC (rev 276971)
@@ -760,7 +760,7 @@
     // This function calculates the minimum and maximum preferred widths for an object.
     // These values are used in shrink-to-fit layout systems.
     // These include tables, positioned objects, floats and flexible boxes.
-    virtual void computePreferredLogicalWidths() { setPreferredLogicalWidthsDirty(false); }
+    virtual void computePreferredLogicalWidths();
 
     LayoutRect frameRectForStickyPositioning() const final { return frameRect(); }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to