summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-06-13 15:44:52 +0200
committerAndreas Kling <kling@serenityos.org>2020-06-13 15:44:52 +0200
commit1e15fa30e4e8959954c69f201a109bc040709da8 (patch)
tree7854426566e0570d7c5ef54ea784a5559532c8ab /Libraries
parentbc5a862cbe124d544728ba029f89f47e0320a16f (diff)
downloadserenity-1e15fa30e4e8959954c69f201a109bc040709da8.zip
LibWeb: Don't try to be clever about -libweb-center relative position
Let's just say that -libweb-center centers the block in its containing block for now. We can get fancy with relative offsets later.
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibWeb/Layout/LayoutBlock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Layout/LayoutBlock.cpp b/Libraries/LibWeb/Layout/LayoutBlock.cpp
index aef96552bc..7c5329d330 100644
--- a/Libraries/LibWeb/Layout/LayoutBlock.cpp
+++ b/Libraries/LibWeb/Layout/LayoutBlock.cpp
@@ -454,7 +454,7 @@ void LayoutBlock::compute_position()
+ box_model().offset().left.to_px(*this);
if (parent()->is_block() && parent()->style().text_align() == CSS::ValueID::VendorSpecificCenter) {
- position_x += (containing_block.width() / 2) - width() / 2;
+ position_x = (containing_block.width() / 2) - width() / 2;
}
float position_y = box_model().margin_box(*this).top