Bug 1740580 - Align shrink-wrap behavior of semi-replaced elements with the spec. r=dholbert,layout-reviewers

The removed reftsts test basically the opposite, and are sufficiently
covered by the WPTs that we start passing, so just remove them.

Differential Revision: https://phabricator.services.mozilla.com/D204797
This commit is contained in:
Emilio Cobos Álvarez
2024-03-23 15:14:20 +00:00
parent 2ba42c841a
commit f3b7608278
25 changed files with 324 additions and 711 deletions

View File

@@ -367,6 +367,16 @@ struct ReflowInput : public SizeComputationInput {
mozilla::LogicalSize AvailableSize() const { return mAvailableSize; }
mozilla::LogicalSize ComputedSize() const { return mComputedSize; }
template <typename F>
mozilla::LogicalSize ComputedSizeWithBSizeFallback(F&& aFallback) const {
auto size = mComputedSize;
if (size.BSize(mWritingMode) == NS_UNCONSTRAINEDSIZE) {
size.BSize(mWritingMode) = ApplyMinMaxBSize(aFallback());
}
return size;
}
mozilla::LogicalSize ComputedMinSize() const { return mComputedMinSize; }
mozilla::LogicalSize ComputedMaxSize() const { return mComputedMaxSize; }