MCPcopy Create free account
hub / github.com/buggins/coolreader / updateStyleDataRecursive

Function updateStyleDataRecursive

crengine/src/lvtinydom.cpp:9782–9798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9780
9781#if BUILD_LITE!=1
9782static void updateStyleDataRecursive( ldomNode * node )
9783{
9784 if ( !node->isElement() )
9785 return;
9786 bool styleSheetChanged = false;
9787 if ( node->getNodeId()==el_DocFragment )
9788 styleSheetChanged = node->applyNodeStylesheet();
9789 node->initNodeStyle();
9790 int n = node->getChildCount();
9791 for ( int i=0; i<n; i++ ) {
9792 ldomNode * child = node->getChildNode(i);
9793 if ( child->isElement() )
9794 updateStyleDataRecursive( child );
9795 }
9796 if ( styleSheetChanged )
9797 node->getDocument()->getStyleSheet()->pop();
9798}
9799
9800/// init render method for the whole subtree
9801void ldomNode::initNodeStyleRecursive()

Callers 1

Calls 9

getNodeIdMethod · 0.80
applyNodeStylesheetMethod · 0.80
initNodeStyleMethod · 0.80
getChildNodeMethod · 0.80
getStyleSheetMethod · 0.80
isElementMethod · 0.45
getChildCountMethod · 0.45
popMethod · 0.45
getDocumentMethod · 0.45

Tested by

no test coverage detected