File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -569,16 +569,20 @@ std::shared_ptr<litehtml::render_item> litehtml::render_item_block::init()
569
569
}
570
570
571
571
bool has_block_level = false ;
572
- bool has_inlines = false ;
572
+ bool has_inlines = false ;
573
+ bool has_floats = false ;
573
574
for (const auto & el : m_children)
574
575
{
575
- if (el->src_el ()->is_block_box ())
576
- {
577
- has_block_level = true ;
578
- } else if (el->src_el ()->is_inline_box ())
579
- {
580
- has_inlines = true ;
581
- }
576
+ if (!el->src_el ()->is_float ())
577
+ {
578
+ if (el->src_el ()->is_block_box ())
579
+ {
580
+ has_block_level = true ;
581
+ } else if (el->src_el ()->is_inline_box ())
582
+ {
583
+ has_inlines = true ;
584
+ }
585
+ }
582
586
if (has_block_level && has_inlines)
583
587
break ;
584
588
}
Original file line number Diff line number Diff line change
1
+ < div style ="position: relative; width: 300px ">
2
+ < span style ="display: inline; background-color: green "> lorem</ span >
3
+ < div style ="background-color: red; float: right "> ipsum</ div >
4
+ </ div >
You can’t perform that action at this time.
0 commit comments