Add support for style="page-break-inside:avoid" to wxHTML

Allow using this style to prevent page breaks inside the given <div>.
This commit is contained in:
Vadim Zeitlin
2018-06-20 01:03:20 +02:00
parent 8dfd799fd5
commit 566e401a3f
3 changed files with 75 additions and 0 deletions

View File

@@ -187,6 +187,12 @@ TAG_HANDLER_BEGIN(DIV, "DIV")
m_WParser->OpenContainer();
return false;
}
else if(style.IsSameAs(wxT("PAGE-BREAK-INSIDE:AVOID"), false))
{
m_WParser->CloseContainer();
m_WParser->OpenContainer()->SetCanLiveOnPagebreak(false);
return false;
}
else
{
// Treat other STYLE parameters here when they're supported.