diff options
author | Yuri Kobets <[email protected]> | 2023-05-12 17:29:44 +0300 |
---|---|---|
committer | Yuri Kobets <[email protected]> | 2023-05-12 17:29:44 +0300 |
commit | 819c20e6825e1c6fb09dba6614b681dcf28ec70d (patch) | |
tree | 184d33d659b649a9f36d2af43d54c229f6fb9e70 /src/render_block.cpp | |
parent | ec2d94639fb71614ee3a747d2fda0185e68cd49f (diff) |
fixed rendering elements with position absoute and fixed
Also:
* refactoring: have_parent is replaced with is_root in render_item
* fixed: The tag <body> is not floats holder by default
* expanding <html> and <body> elements auto-expanding up to client
rectangle
Diffstat (limited to 'src/render_block.cpp')
-rw-r--r-- | src/render_block.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/render_block.cpp b/src/render_block.cpp index baf90696..25536c82 100644 --- a/src/render_block.cpp +++ b/src/render_block.cpp @@ -789,7 +789,7 @@ int litehtml::render_item_block::render(int x, int y, const containing_block_con } // re-render content with new width if required - if (requires_rerender && !second_pass && have_parent()) + if (requires_rerender && !second_pass && !is_root()) { m_floats_left.clear(); m_floats_right.clear(); @@ -799,18 +799,6 @@ int litehtml::render_item_block::render(int x, int y, const containing_block_con _render_content(x, y, true, ret_width, self_size.new_width(m_pos.width)); } - if(src_el()->is_root() || src_el()->is_body()) - { - if(self_size.width.type == containing_block_context::cbc_value_type_auto && m_pos.width < containing_block_size.width - content_offset_width()) - { - m_pos.width = containing_block_size.width - content_offset_width(); - } - if(self_size.height.type == containing_block_context::cbc_value_type_auto && m_pos.height < containing_block_size.height - content_offset_height()) - { - m_pos.height = containing_block_size.height - content_offset_height(); - } - } - if (src_el()->is_floats_holder() && !second_pass) { for (const auto& fb : m_floats_left) |