| Summary: | [css-contain-intrinsic-size] auto-011.html is failing | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | cathiechen <cathiechen> | ||||||
| Component: | CSS | Assignee: | cathiechen <cathiechen> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | obrufau, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=268874 | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 236707 | ||||||||
| Attachments: |
|
||||||||
|
Description
cathiechen
2023-02-14 08:54:33 PST
Created attachment 464983 [details]
WIP-patch
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(); 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:) Created attachment 465135 [details]
WIP-patch
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(). 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:) Pull request: https://github.com/WebKit/WebKit/pull/10797 Committed 261003@main (9b61d115bb39): <https://commits.webkit.org/261003@main> Reviewed commits have been landed. Closing PR #10797 and removing active labels. |