RESOLVED FIXED 252245
[css-contain-intrinsic-size] auto-011.html is failing
https://bugs.webkit.org/show_bug.cgi?id=252245
Summary [css-contain-intrinsic-size] auto-011.html is failing
cathiechen
Reported 2023-02-14 08:54:33 PST
Per[1], contain:inline-size applies contain:size to the inline direction, so contain-intrinsic-size:auto should save last remembered size in the inline direction. [1] https://drafts.csswg.org/css-contain-3/#containment-inline-size
Attachments
WIP-patch (14.06 KB, patch)
2023-02-14 08:56 PST, cathiechen
no flags
WIP-patch (15.31 KB, patch)
2023-02-23 07:51 PST, cathiechen
no flags
cathiechen
Comment 1 2023-02-14 08:56:10 PST
Created attachment 464983 [details] WIP-patch
Radar WebKit Bug Importer
Comment 2 2023-02-21 08:55:20 PST
Oriol Brufau
Comment 3 2023-02-22 14:00:53 PST
Comment on attachment 464983 [details] WIP-patch View in context: https://bugs.webkit.org/attachment.cgi?id=464983&action=review > Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:798 > + if (m_direction == ForColumns && (m_strategy->isComputingSizeContainment() || m_strategy->isComputingInlineSizeContainment())) { May be good to add GridTrackSizingAlgorithmStrategy::isComputingSizeOrInlineSizeContainment() > Source/WebCore/rendering/RenderBox.cpp:5604 > + ASSERT(shouldApplySizeContainment() || (isHorizontalWritingMode() && shouldApplyInlineSizeContainment())); Nit: shouldApplySizeContainment() and shouldApplyInlineSizeContainment() have some common logic that might run twice, so this seems better: isHorizontalWritingMode() ? shouldApplySizeOrInlineSizeContainment() : shouldApplySizeContainment() > Source/WebCore/rendering/RenderBox.cpp:5620 > + ASSERT(shouldApplySizeContainment() || (!isHorizontalWritingMode() && shouldApplyInlineSizeContainment())); Nit: isHorizontalWritingMode() ? shouldApplySizeContainment() : shouldApplySizeOrInlineSizeContainment() > Source/WebCore/rendering/RenderGrid.cpp:678 > + if (direction == ForColumns && shouldApplyInlineSizeContainment()) > + return true; > + > + return shouldApplySizeContainment(); Nit: return direction == ForColumns ? shouldApplySizeOrInlineSizeContainment() : shouldApplySizeContainment();
cathiechen
Comment 4 2023-02-23 07:48:50 PST
Comment on attachment 464983 [details] WIP-patch View in context: https://bugs.webkit.org/attachment.cgi?id=464983&action=review Thanks for the review, Oriol! >> Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp:798 >> + if (m_direction == ForColumns && (m_strategy->isComputingSizeContainment() || m_strategy->isComputingInlineSizeContainment())) { > > May be good to add GridTrackSizingAlgorithmStrategy::isComputingSizeOrInlineSizeContainment() Done! >> Source/WebCore/rendering/RenderBox.cpp:5604 >> + ASSERT(shouldApplySizeContainment() || (isHorizontalWritingMode() && shouldApplyInlineSizeContainment())); > > Nit: shouldApplySizeContainment() and shouldApplyInlineSizeContainment() have some common logic that might run twice, so this seems better: > > isHorizontalWritingMode() ? shouldApplySizeOrInlineSizeContainment() : shouldApplySizeContainment() Done >> Source/WebCore/rendering/RenderBox.cpp:5620 >> + ASSERT(shouldApplySizeContainment() || (!isHorizontalWritingMode() && shouldApplyInlineSizeContainment())); > > Nit: isHorizontalWritingMode() ? shouldApplySizeContainment() : shouldApplySizeOrInlineSizeContainment() Done >> Source/WebCore/rendering/RenderGrid.cpp:678 >> + return shouldApplySizeContainment(); > > Nit: return direction == ForColumns ? shouldApplySizeOrInlineSizeContainment() : shouldApplySizeContainment(); Done:)
cathiechen
Comment 5 2023-02-23 07:51:12 PST
Created attachment 465135 [details] WIP-patch
Oriol Brufau
Comment 6 2023-02-23 09:00:21 PST
Comment on attachment 465135 [details] WIP-patch View in context: https://bugs.webkit.org/attachment.cgi?id=465135&action=review > Source/WebCore/rendering/GridTrackSizingAlgorithm.h:290 > + bool isComputingSizeOrInlineSizeContainment() { return isComputingSizeContainment() || isComputingInlineSizeContainment(); } Nit: probably not that important in practice, but making it virtual and then in IndefiniteSizeStrategy bool isComputingSizeOrInlineSizeContainment() const override { return renderGrid()->shouldApplySizeOrInlineSizeContainment(); } would ensure a single shouldApplySizeOrStyleContainment().
cathiechen
Comment 7 2023-02-28 06:55:25 PST
Comment on attachment 465135 [details] WIP-patch View in context: https://bugs.webkit.org/attachment.cgi?id=465135&action=review >> Source/WebCore/rendering/GridTrackSizingAlgorithm.h:290 >> + bool isComputingSizeOrInlineSizeContainment() { return isComputingSizeContainment() || isComputingInlineSizeContainment(); } > > Nit: probably not that important in practice, but making it virtual and then in IndefiniteSizeStrategy > > bool isComputingSizeOrInlineSizeContainment() const override { return renderGrid()->shouldApplySizeOrInlineSizeContainment(); } > > would ensure a single shouldApplySizeOrStyleContainment(). Done, thanks:)
cathiechen
Comment 8 2023-02-28 07:09:17 PST
EWS
Comment 9 2023-03-01 06:31:50 PST
Committed 261003@main (9b61d115bb39): <https://commits.webkit.org/261003@main> Reviewed commits have been landed. Closing PR #10797 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.