Source/WebCore/ChangeLog

 12021-03-03 Sergio Villar Senin <svillar@igalia.com>
 2
 3 [css-flexbox] Fix mainAxisLengthIsDefinite for orthogonal items with percentage sizes
 4 https://bugs.webkit.org/show_bug.cgi?id=222684
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 r260055 fixed a crash in flexbox code by not caching the definiteness of the logical height of the flexbox
 9 container in case of having orthogonal items because in that case, the logical heights of the flex container
 10 and the flex item are not in the same axis. That made a lot of sense, however we should still let the method
 11 return whether or not the child main axis is definite instead of unconditionally return false.
 12
 13 * rendering/RenderFlexibleBox.cpp:
 14 (WebCore::RenderFlexibleBox::childMainSizeIsDefinite const):
 15
1162021-03-03 Alex Christensen <achristensen@webkit.org>
217
318 Limit HashTable entry size to 500 bytes

Source/WebCore/rendering/RenderFlexibleBox.cpp

@@bool RenderFlexibleBox::childMainSizeIsDefinite(const RenderBox& child, const Le
846846 return true;
847847 if (m_hasDefiniteHeight == SizeDefiniteness::Indefinite)
848848 return false;
849  // Do not cache the definite height state when the child is perpendicular.
850  // The height of a perpendicular child is resolved against the containing block's width which is not the main axis.
851  if (child.isHorizontalWritingMode() != isHorizontalWritingMode())
852  return false;
853  bool definite = child.computePercentageLogicalHeight(flexBasis) != WTF::nullopt;
854  if (m_inLayout) {
855  // We can reach this code even while we're not laying ourselves out, such
856  // as from mainSizeForPercentageResolution.
 849 bool definite = child.computePercentageLogicalHeight(flexBasis).hasValue();
 850 // Do not cache the definite height state with orthogonal children as in that case the logical height
 851 // of the child is not in the same axis as the logical height of the flex container. Also do not cache it
 852 // outside the layout process (we can reach this code as from mainSizeForPercentageResolution()).
 853 if (m_inLayout && (isHorizontalWritingMode() == child.isHorizontalWritingMode()))
857854 m_hasDefiniteHeight = definite ? SizeDefiniteness::Definite : SizeDefiniteness::Indefinite;
858  }
 855
859856 return definite;
860857 }
861858 return true;

LayoutTests/ChangeLog

 12021-03-03 Sergio Villar Senin <svillar@igalia.com>
 2
 3 [css-flexbox] Fix mainAxisLengthIsDefinite for orthogonal items with percentage sizes
 4 https://bugs.webkit.org/show_bug.cgi?id=222684
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * TestExpectations: Unskipped flexbox-basic-canvas-vert-001v.xhtml which is now passing.
 9
1102021-03-03 Truitt Savell <tsavell@apple.com>
211
312 imported/w3c/web-platform-tests/webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/mediaElementAudioSourceToScriptProcessorTest.html fails for mac wk1 debug

LayoutTests/TestExpectations

@@webkit.org/b/221482 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-coll
40634063# Painting order in flexbox
40644064webkit.org/b/221482 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-paint-ordering-002.xhtml [ ImageOnlyFailure ]
40654065
4066 # Misc elements as flex items.
4067 webkit.org/b/136754 imported/w3c/web-platform-tests/css/css-flexbox/flexbox-basic-canvas-vert-001v.xhtml [ ImageOnlyFailure ]
4068 
40694066# Newly imported Canvas WPT tests that are failing.
40704067imported/w3c/web-platform-tests/html/canvas/element/building-paths/canvas_complexshapes_arcto_001.htm [ ImageOnlyFailure Pass ]
40714068imported/w3c/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html [ Failure Pass ]