diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-10-11 23:35:49 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2010-10-11 23:35:49 +0200 |
commit | 97cd61e9ca455834cc2095241bf0f3517208b83d (patch) | |
tree | b04e463d0122c7eec27bbfbf2ddd6e7c2c0ae659 /src/css.cc | |
parent | f1cd41cc277cb7e509b60aabdf5308ec20c37637 (diff) |
allow to apply CssContext to an arbitrary node in the docTree
Diffstat (limited to 'src/css.cc')
-rw-r--r-- | src/css.cc | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -428,7 +428,7 @@ void CssStyleSheet::apply (CssPropertyList *props, } } - ruleList[numLists] = elementTable[docTree->top ()->element]; + ruleList[numLists] = elementTable[node->element]; if (ruleList[numLists]) numLists++; @@ -512,9 +512,8 @@ CssContext::~CssContext () { * This allows e.g. user styles to overwrite author styles. */ void CssContext::apply (CssPropertyList *props, Doctree *docTree, + DoctreeNode *node, CssPropertyList *tagStyle, CssPropertyList *nonCssHints) { - const DoctreeNode *node = docTree->top (); - if (sheet[CSS_PRIMARY_USER_AGENT]) sheet[CSS_PRIMARY_USER_AGENT]->apply (props, docTree, node); |