diff --git a/client/ios/DivKit/Extensions/DivBase/DivBaseExtensions.swift b/client/ios/DivKit/Extensions/DivBase/DivBaseExtensions.swift index dccef19b5..b304873bd 100644 --- a/client/ios/DivKit/Extensions/DivBase/DivBaseExtensions.swift +++ b/client/ios/DivKit/Extensions/DivBase/DivBaseExtensions.swift @@ -287,8 +287,13 @@ extension LayoutTrait { switch self { case let .fixed(value): return .fixed(value - insets.sum) - case .intrinsic, - .weighted: + case let .intrinsic(constrained, minSize, maxSize): + return .intrinsic( + constrained: constrained, + minSize: minSize - insets.sum, + maxSize: maxSize - insets.sum + ) + case .weighted: return self } } diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-overlap_375@2x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-overlap_375@2x.png index 94839e94f..d7d01dc6e 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-overlap_375@2x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-overlap_375@2x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-overlap_414@3x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-overlap_414@3x.png index 62c0e1618..463e2616b 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-overlap_414@3x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-overlap_414@3x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-horizontal_375@2x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-horizontal_375@2x.png index 323df4b25..d7d01dc6e 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-horizontal_375@2x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-horizontal_375@2x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-horizontal_414@3x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-horizontal_414@3x.png index 66fba39ea..463e2616b 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-horizontal_414@3x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-horizontal_414@3x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-vertical_375@2x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-vertical_375@2x.png index f47319eef..a4c439408 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-vertical_375@2x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-vertical_375@2x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-vertical_414@3x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-vertical_414@3x.png index 41daadc64..088b4d54f 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-vertical_414@3x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/constrained-true-margins-and-paddings-wrap-vertical_414@3x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal-weigted_375@2x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal-weigted_375@2x.png index 9f20a7b54..e048e93af 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal-weigted_375@2x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal-weigted_375@2x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal-weigted_414@3x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal-weigted_414@3x.png index 790506366..1d464b363 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal-weigted_414@3x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal-weigted_414@3x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal_375@2x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal_375@2x.png index 9034ba9b4..9f7de0b32 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal_375@2x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal_375@2x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal_414@3x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal_414@3x.png index 0b6631402..600eba5bf 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal_414@3x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-horizontal_414@3x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-overlap_375@2x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-overlap_375@2x.png index 507c53f3d..d3a68d890 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-overlap_375@2x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-overlap_375@2x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-overlap_414@3x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-overlap_414@3x.png index 07ce888c7..c539d467d 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-overlap_414@3x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-overlap_414@3x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical-weighted_375@2x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical-weighted_375@2x.png index 07d42c211..d39b5062e 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical-weighted_375@2x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical-weighted_375@2x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical-weighted_414@3x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical-weighted_414@3x.png index d320370c8..8e97853ce 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical-weighted_414@3x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical-weighted_414@3x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical_375@2x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical_375@2x.png index 7b885fb4c..0f86a6827 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical_375@2x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical_375@2x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical_414@3x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical_414@3x.png index dc3371347..4a000287b 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical_414@3x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-vertical_414@3x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-horizontal_375@2x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-horizontal_375@2x.png index 8295b324b..61e01e8fe 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-horizontal_375@2x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-horizontal_375@2x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-horizontal_414@3x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-horizontal_414@3x.png index d6e7cb67f..f784b2d6c 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-horizontal_414@3x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-horizontal_414@3x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-vertical_375@2x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-vertical_375@2x.png index a3e994e79..e852f8d84 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-vertical_375@2x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-vertical_375@2x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-vertical_414@3x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-vertical_414@3x.png index 31fada41c..2023b1048 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-vertical_414@3x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/min-max-constrained-true-wrap-vertical_414@3x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/text-min-max-constrained-false-vertical_375@2x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/text-min-max-constrained-false-vertical_375@2x.png index e27561de3..7e36f712c 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/text-min-max-constrained-false-vertical_375@2x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/text-min-max-constrained-false-vertical_375@2x.png differ diff --git a/client/ios/Tests/reference_snapshots/div-size/wrap-content/text-min-max-constrained-false-vertical_414@3x.png b/client/ios/Tests/reference_snapshots/div-size/wrap-content/text-min-max-constrained-false-vertical_414@3x.png index e49895eeb..e951574aa 100644 Binary files a/client/ios/Tests/reference_snapshots/div-size/wrap-content/text-min-max-constrained-false-vertical_414@3x.png and b/client/ios/Tests/reference_snapshots/div-size/wrap-content/text-min-max-constrained-false-vertical_414@3x.png differ