diff options
author | Yuri Kobets <yuri.kobets@gmail.com> | 2024-01-31 02:36:05 +0300 |
---|---|---|
committer | Yuri Kobets <yuri.kobets@gmail.com> | 2024-01-31 02:36:05 +0300 |
commit | cca054779b99d9e1a545d3039cf65cf47d63a03c (patch) | |
tree | 2abb4eba98283da5ae6c87e1ea99a3a9b0f3e9df /src/render_block.cpp | |
parent | ef70eefe4f6358952d0dbcfbf507b4c3bfd8f504 (diff) |
flexbox: some tests are resolved
Diffstat (limited to 'src/render_block.cpp')
-rw-r--r-- | src/render_block.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/render_block.cpp b/src/render_block.cpp index 13f815e5..c170c341 100644 --- a/src/render_block.cpp +++ b/src/render_block.cpp @@ -226,6 +226,16 @@ int litehtml::render_item_block::_render(int x, int y, const containing_block_co } } + // Fix width with max-width attribute + if(self_size.max_width.type != containing_block_context::cbc_value_type_none) + { + if(m_pos.width > self_size.max_width) + { + m_pos.width = self_size.max_width; + requires_rerender = true; + } + } + // Fix width with min-width attribute if(self_size.min_width.type != containing_block_context::cbc_value_type_none) { @@ -239,16 +249,6 @@ int litehtml::render_item_block::_render(int x, int y, const containing_block_co m_pos.width = 0; } - // Fix width with max-width attribute - if(self_size.max_width.type != containing_block_context::cbc_value_type_none) - { - if(m_pos.width > self_size.max_width) - { - m_pos.width = self_size.max_width; - requires_rerender = true; - } - } - // re-render content with new width if required if (requires_rerender && !second_pass && !is_root()) { |