Title: [273958] trunk
- Revision
- 273958
- Author
- [email protected]
- Date
- 2021-03-05 02:54:42 -0800 (Fri, 05 Mar 2021)
Log Message
[css-flexbox] Fix mainAxisLengthIsDefinite for orthogonal items with percentage sizes
https://bugs.webkit.org/show_bug.cgi?id=222684
Reviewed by Javier Fernandez.
Source/WebCore:
r260055 fixed a crash in flexbox code by not caching the definiteness of the logical height of the flexbox
container in case of having orthogonal items because in that case, the logical heights of the flex container
and the flex item are not in the same axis. That made a lot of sense, however we should still let the method
return whether or not the child main axis is definite instead of unconditionally return false.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::childMainSizeIsDefinite const):
LayoutTests:
* TestExpectations: Unskipped flexbox-basic-canvas-vert-001v.xhtml which is now passing.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (273957 => 273958)
--- trunk/LayoutTests/ChangeLog 2021-03-05 10:50:10 UTC (rev 273957)
+++ trunk/LayoutTests/ChangeLog 2021-03-05 10:54:42 UTC (rev 273958)
@@ -1,3 +1,12 @@
+2021-03-03 Sergio Villar Senin <[email protected]>
+
+ [css-flexbox] Fix mainAxisLengthIsDefinite for orthogonal items with percentage sizes
+ https://bugs.webkit.org/show_bug.cgi?id=222684
+
+ Reviewed by Javier Fernandez.
+
+ * TestExpectations: Unskipped flexbox-basic-canvas-vert-001v.xhtml which is now passing.
+
2021-03-05 Imanol Fernandez <[email protected]>
Implement WebXRBoundedReferenceSpace bounds geometry
Modified: trunk/LayoutTests/TestExpectations (273957 => 273958)
--- trunk/LayoutTests/TestExpectations 2021-03-05 10:50:10 UTC (rev 273957)
+++ trunk/LayoutTests/TestExpectations 2021-03-05 10:54:42 UTC (rev 273958)
@@ -4063,9 +4063,6 @@
# Painting order in flexbox
webkit.org/b/221482 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-paint-ordering-002.xhtml [ ImageOnlyFailure ]
-# Misc elements as flex items.
-webkit.org/b/136754 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-basic-canvas-vert-001v.xhtml [ ImageOnlyFailure ]
-
# Test ASSERTing in Debug.
webkit.org/b/222711 [ Debug ] imported/w3c/web-platform-tests/css/css-flexbox/frameset-crash.html [ Skip ]
Modified: trunk/Source/WebCore/ChangeLog (273957 => 273958)
--- trunk/Source/WebCore/ChangeLog 2021-03-05 10:50:10 UTC (rev 273957)
+++ trunk/Source/WebCore/ChangeLog 2021-03-05 10:54:42 UTC (rev 273958)
@@ -1,3 +1,18 @@
+2021-03-03 Sergio Villar Senin <[email protected]>
+
+ [css-flexbox] Fix mainAxisLengthIsDefinite for orthogonal items with percentage sizes
+ https://bugs.webkit.org/show_bug.cgi?id=222684
+
+ Reviewed by Javier Fernandez.
+
+ r260055 fixed a crash in flexbox code by not caching the definiteness of the logical height of the flexbox
+ container in case of having orthogonal items because in that case, the logical heights of the flex container
+ and the flex item are not in the same axis. That made a lot of sense, however we should still let the method
+ return whether or not the child main axis is definite instead of unconditionally return false.
+
+ * rendering/RenderFlexibleBox.cpp:
+ (WebCore::RenderFlexibleBox::childMainSizeIsDefinite const):
+
2021-03-05 Imanol Fernandez <[email protected]>
Implement WebXRBoundedReferenceSpace bounds geometry
Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (273957 => 273958)
--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2021-03-05 10:50:10 UTC (rev 273957)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp 2021-03-05 10:54:42 UTC (rev 273958)
@@ -849,16 +849,13 @@
return true;
if (m_hasDefiniteHeight == SizeDefiniteness::Indefinite)
return false;
- // Do not cache the definite height state when the child is perpendicular.
- // The height of a perpendicular child is resolved against the containing block's width which is not the main axis.
- if (child.isHorizontalWritingMode() != isHorizontalWritingMode())
- return false;
- bool definite = child.computePercentageLogicalHeight(flexBasis) != WTF::nullopt;
- if (m_inLayout) {
- // We can reach this code even while we're not laying ourselves out, such
- // as from mainSizeForPercentageResolution.
+ bool definite = child.computePercentageLogicalHeight(flexBasis).hasValue();
+ // Do not cache the definite height state with orthogonal children as in that case the logical height
+ // of the child is not in the same axis as the logical height of the flex container. Also do not cache it
+ // outside the layout process (we can reach this code as from mainSizeForPercentageResolution()).
+ if (m_inLayout && (isHorizontalWritingMode() == child.isHorizontalWritingMode()))
m_hasDefiniteHeight = definite ? SizeDefiniteness::Definite : SizeDefiniteness::Indefinite;
- }
+
return definite;
}
return true;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes