Skip to content

Commit 4b8fd36

Browse files
committed
Don't check max-width on the second pass of rendering
Fixes #53
1 parent 68f4e20 commit 4b8fd36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/html_tag.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3950,8 +3950,8 @@ int litehtml::html_tag::render_box(int x, int y, int max_width, bool second_pass
39503950
}
39513951
}
39523952

3953-
// check for max-width
3954-
if (!m_css_max_width.is_predefined())
3953+
// check for max-width (on the first pass only)
3954+
if (!m_css_max_width.is_predefined() && !second_pass)
39553955
{
39563956
int mw = get_document()->cvt_units(m_css_max_width, m_font_size, parent_width);
39573957
if (m_box_sizing == box_sizing_border_box)

0 commit comments

Comments
 (0)