summaryrefslogtreecommitdiff
path: root/libs/litehtml/src/render_table.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/litehtml/src/render_table.cpp')
-rw-r--r--libs/litehtml/src/render_table.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/litehtml/src/render_table.cpp b/libs/litehtml/src/render_table.cpp
index 543749ed12..16a143eb43 100644
--- a/libs/litehtml/src/render_table.cpp
+++ b/libs/litehtml/src/render_table.cpp
@@ -380,7 +380,7 @@ int litehtml::render_item_table::_render(int x, int y, const containing_block_co
std::shared_ptr<litehtml::render_item> litehtml::render_item_table::init()
{
// Initialize Grid
- m_grid = std::unique_ptr<table_grid>(new table_grid());
+ m_grid = std::make_unique<table_grid>();
go_inside_table table_selector;
table_rows_selector row_selector;
@@ -417,10 +417,10 @@ std::shared_ptr<litehtml::render_item> litehtml::render_item_table::init()
if(src_el()->css().get_border_collapse() == border_collapse_separate)
{
- int font_size = src_el()->css().get_font_size();
+ auto fm = css().get_font_metrics();
document::ptr doc = src_el()->get_document();
- m_border_spacing_x = doc->to_pixels(src_el()->css().get_border_spacing_x(), font_size);
- m_border_spacing_y = doc->to_pixels(src_el()->css().get_border_spacing_y(), font_size);
+ m_border_spacing_x = doc->to_pixels(src_el()->css().get_border_spacing_x(), fm, 0);
+ m_border_spacing_y = doc->to_pixels(src_el()->css().get_border_spacing_y(), fm, 0);
} else
{
m_border_spacing_x = 0;