Skip to content

Commit 180529b

Browse files
committed
fixed rendering issue with fixed block size
1 parent 109a837 commit 180529b

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/render_block.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,10 @@ int litehtml::render_item_block::_render(int x, int y, int max_width, const cont
702702
} else
703703
{
704704
m_pos.width = cb_size.width;
705+
if(cb_size.width_type == containing_block_context::cbc_value_type_absolute)
706+
{
707+
ret_width = cb_size.width;
708+
}
705709
}
706710

707711
// Set block height

test/render/test20.htm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div style="display: inline-block; background-color: blue; padding: 3px">
2+
<span style="display: block; width: 20px; height: 20px; background-color: red"></span>
3+
</div>

test/render/test20.htm.png

118 Bytes
Loading

0 commit comments

Comments
 (0)