|
@@ -55,10 +55,11 @@ CSSPixels FlexFormattingContext::get_pixel_height(Box const& box, CSS::Size cons
|
|
{
|
|
{
|
|
auto containing_block_height = CSS::Length::make_px(containing_block_height_for(box));
|
|
auto containing_block_height = CSS::Length::make_px(containing_block_height_for(box));
|
|
if (box.computed_values().box_sizing() == CSS::BoxSizing::BorderBox) {
|
|
if (box.computed_values().box_sizing() == CSS::BoxSizing::BorderBox) {
|
|
|
|
+ auto containing_block_width = CSS::Length::make_px(containing_block_width_for(box));
|
|
auto border_top = box.computed_values().border_top().width;
|
|
auto border_top = box.computed_values().border_top().width;
|
|
auto border_bottom = box.computed_values().border_bottom().width;
|
|
auto border_bottom = box.computed_values().border_bottom().width;
|
|
- auto padding_top = box.computed_values().padding().top().resolved(box, containing_block_height).to_px(box);
|
|
|
|
- auto padding_bottom = box.computed_values().padding().bottom().resolved(box, containing_block_height).to_px(box);
|
|
|
|
|
|
+ auto padding_top = box.computed_values().padding().top().resolved(box, containing_block_width).to_px(box);
|
|
|
|
+ auto padding_bottom = box.computed_values().padding().bottom().resolved(box, containing_block_width).to_px(box);
|
|
return size.resolved(box, containing_block_height).to_px(box) - border_top - border_bottom - padding_top - padding_bottom;
|
|
return size.resolved(box, containing_block_height).to_px(box) - border_top - border_bottom - padding_top - padding_bottom;
|
|
}
|
|
}
|
|
|
|
|