mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibWeb: Use final box model metrics for absolute 'right' and 'bottom'
We've already converted these to floats, so no need to do it again.
This commit is contained in:
parent
6809be436b
commit
b861de0a13
Notes:
sideshowbarker
2024-07-19 00:53:02 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/b861de0a13c
1 changed files with 2 additions and 2 deletions
|
@ -744,7 +744,7 @@ void BlockFormattingContext::layout_absolutely_positioned_child(Box& box)
|
|||
used_offset.set_x(x_offset + box_model.margin.left);
|
||||
} else if (!box.style().offset().right.is_auto()) {
|
||||
float x_offset = 0
|
||||
- box.style().offset().right.to_px(box)
|
||||
- box_model.offset.right
|
||||
- box_model.border_box().right;
|
||||
used_offset.set_x(containing_block.width() + x_offset - box.width() - box_model.margin.right);
|
||||
} else {
|
||||
|
@ -758,7 +758,7 @@ void BlockFormattingContext::layout_absolutely_positioned_child(Box& box)
|
|||
used_offset.set_y(y_offset + box_model.margin.top);
|
||||
} else if (!box.style().offset().bottom.is_auto()) {
|
||||
float y_offset = 0
|
||||
- box.style().offset().bottom.to_px(box)
|
||||
- box_model.offset.bottom
|
||||
- box_model.border_box().bottom;
|
||||
used_offset.set_y(containing_block.height() + y_offset - box.height() - box_model.margin.bottom);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue