LayoutUnit logical_right_value =
MinimumValueForLength(logical_right, container_logical_width);
+#if BUILDFLAG(IS_TIZEN)
+ // Some apps expect margin top/bottom to be calculated based on container's
+ // height - not width. For compatibility reasons we allow for such behavior
+ // in compatibility mode.
+ const LayoutUnit container_relative_logical_width =
+ RuntimeEnabledFeatures::TizenCompatibilityModeEnabled()
+ ? ContainingBlockLogicalHeightForPositioned(container_block, false)
+ : ContainingBlockLogicalWidthForPositioned(container_block, false);
+#else
const LayoutUnit container_relative_logical_width =
ContainingBlockLogicalWidthForPositioned(container_block, false);
+#endif
// If we are using aspect-ratio, the width is effectively not auto.
bool logical_width_is_auto =
LayoutUnit logical_height_value;
LayoutUnit content_logical_height = logical_height - borders_plus_padding;
+#if BUILDFLAG(IS_TIZEN)
+ // Some apps expect margin top/bottom to be calculated based on container's
+ // height - not width. For compatibility reasons we allow for such behavior
+ // in compatibility mode.
+ const LayoutUnit container_relative_logical_width =
+ RuntimeEnabledFeatures::TizenCompatibilityModeEnabled()
+ ? ContainingBlockLogicalHeightForPositioned(container_block, false)
+ : ContainingBlockLogicalWidthForPositioned(container_block, false);
+#else
const LayoutUnit container_relative_logical_width =
ContainingBlockLogicalWidthForPositioned(container_block, false);
+#endif
LayoutUnit logical_top_value;