aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020/replaced.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout_2020/replaced.rs')
-rw-r--r--components/layout_2020/replaced.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/components/layout_2020/replaced.rs b/components/layout_2020/replaced.rs
index 1d7557b0641..334ff44a665 100644
--- a/components/layout_2020/replaced.rs
+++ b/components/layout_2020/replaced.rs
@@ -8,7 +8,7 @@ use crate::fragments::{DebugId, Fragment, ImageFragment};
use crate::geom::flow_relative::{Rect, Vec2};
use crate::geom::PhysicalSize;
use crate::sizing::ContentSizes;
-use crate::style_ext::ComputedValuesExt;
+use crate::style_ext::{ComputedValuesExt, PaddingBorderMargin};
use crate::ContainingBlock;
use canvas_traits::canvas::{CanvasId, CanvasMsg, FromLayoutMsg};
use ipc_channel::ipc::{self, IpcSender};
@@ -240,19 +240,17 @@ impl ReplacedContent {
&self,
containing_block: &ContainingBlock,
style: &ComputedValues,
+ pbm: &PaddingBorderMargin,
) -> Vec2<Length> {
let mode = style.writing_mode;
let intrinsic_size = self.flow_relative_intrinsic_size(style);
let intrinsic_ratio = self.inline_size_over_block_size_intrinsic_ratio(style);
- let box_size = style.box_size().percentages_relative_to(containing_block);
+ let box_size = style.content_box_size(containing_block, &pbm);
+ let max_box_size = style.content_max_box_size(containing_block, &pbm);
let min_box_size = style
- .min_box_size()
- .percentages_relative_to(containing_block)
+ .content_min_box_size(containing_block, &pbm)
.auto_is(Length::zero);
- let max_box_size = style
- .max_box_size()
- .percentages_relative_to(containing_block);
let default_object_size = || {
// FIXME: