Skip to content

Commit

Permalink
initNodeStyle(): skip some possibly costly validation
Browse files Browse the repository at this point in the history
  • Loading branch information
poire-z committed Jul 5, 2020
1 parent fd0523b commit 546b96d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crengine/src/lvtinydom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16124,11 +16124,16 @@ void ldomNode::initNodeStyle()
{
ldomNode * parent = getParentNode();

/* This has never triggered over the years, so trust we don't need it.
* This might also improve quite a bit TXT documents handling (where
* the main node may have tens of thousands of <PRE> children, one
* for each line of the text file.
*
// DEBUG TEST
if ( parent->getChildIndex( getDataIndex() )<0 ) {
CRLog::error("Invalid parent->child relation for nodes %d->%d", parent->getDataIndex(), getDataIndex() );
}

*/

//lvdomElementFormatRec * parent_fmt = node->getParentNode()->getRenderData();
css_style_ref_t style = parent->getStyle();
Expand Down

0 comments on commit 546b96d

Please sign in to comment.