Dillo v3.1.1-98-g318d1f14
|
A set of CssStyleSheets. More...
#include <css.hh>
Public Member Functions | |
CssContext () | |
void | addRule (CssSelector *sel, CssPropertyList *props, CssPrimaryOrder order) |
void | apply (CssPropertyList *props, Doctree *docTree, DoctreeNode *node, CssPropertyList *tagStyle, CssPropertyList *tagStyleImportant, CssPropertyList *nonCssHints) |
Apply a CSS context to a property list. | |
Private Attributes | |
CssStyleSheet | sheet [CSS_PRIMARY_USER_IMPORTANT+1] |
MatchCache | matchCache |
int | pos |
Static Private Attributes | |
static CssStyleSheet | userAgentSheet |
void CssContext::addRule | ( | CssSelector * | sel, |
CssPropertyList * | props, | ||
CssPrimaryOrder | order | ||
) |
Definition at line 529 of file css.cc.
References _MSG_WARN, CSS_PRIMARY_AUTHOR, CSS_PRIMARY_AUTHOR_IMPORTANT, CSS_PRIMARY_USER_AGENT, CssSelector::getRequiredMatchCache(), CssRule::isSafe(), CssRule::selector, CssSelector::setMatchCacheOffset(), and lout::misc::SimpleVector< T >::size().
Referenced by CssParser::parseRuleset().
void CssContext::apply | ( | CssPropertyList * | props, |
Doctree * | docTree, | ||
DoctreeNode * | node, | ||
CssPropertyList * | tagStyle, | ||
CssPropertyList * | tagStyleImportant, | ||
CssPropertyList * | nonCssHints | ||
) |
Apply a CSS context to a property list.
The stylesheets in the context are applied one after the other in the ordering defined by CSS 2.1. Stylesheets that are applied later can overwrite properties set by previous stylesheets. This allows e.g. user styles to overwrite author styles.
Definition at line 503 of file css.cc.
References CssPropertyList::apply(), CssStyleSheet::apply(), CSS_PRIMARY_AUTHOR, CSS_PRIMARY_AUTHOR_IMPORTANT, CSS_PRIMARY_USER, and CSS_PRIMARY_USER_IMPORTANT.
Referenced by StyleEngine::style0().
|
private |
|
private |
|
staticprivate |