dillo
3.0.5
About: dillo is a small, fast, extensible Web browser particularly suitable for older or smaller computers and embedded systems (but only limited or no support for frames, CSS, JavaScript, Java).
![]() ![]() |
A list of CssRules. More...
#include <css.hh>
Classes | |
class | RuleList |
class | RuleMap |
Public Member Functions | |
CssStyleSheet () | |
void | addRule (CssRule *rule) |
Insert a rule into CssStyleSheet. More... | |
void | apply (CssPropertyList *props, Doctree *docTree, const DoctreeNode *node, MatchCache *matchCache) const |
Apply a stylesheet to a property list. More... | |
int | getRequiredMatchCache () |
Private Attributes | |
RuleList | elementTable [ntags] |
RuleList | anyTable |
RuleMap | idTable |
RuleMap | classTable |
int | requiredMatchCache |
Static Private Attributes | |
static const int | ntags = 90 + 14 |
A list of CssRules.
In apply () all matching rules are applied.
|
inline |
Definition at line 494 of file css.hh.
References requiredMatchCache.
void CssStyleSheet::addRule | ( | CssRule * | rule | ) |
Insert a rule into CssStyleSheet.
To improve matching performance the rules are organized into rule lists based on the topmost simple selector of their selector.
Definition at line 372 of file css.cc.
References anyTable, classTable, CssSimpleSelector::ELEMENT_ANY, CssSimpleSelector::ELEMENT_NONE, elementTable, lout::misc::SimpleVector< T >::get(), lout::container::typed::HashTable< K, V >::get(), CssSimpleSelector::getClass(), CssSimpleSelector::getElement(), CssSimpleSelector::getId(), CssSelector::getRequiredMatchCache(), idTable, CssStyleSheet::RuleList::insert(), ntags, lout::container::typed::HashTable< K, V >::put(), requiredMatchCache, CssRule::selector, lout::misc::SimpleVector< T >::size(), and CssSelector::top().
void CssStyleSheet::apply | ( | CssPropertyList * | props, |
Doctree * | docTree, | ||
const DoctreeNode * | node, | ||
MatchCache * | matchCache | ||
) | const |
Apply a stylesheet to a property list.
The properties are set as defined by the rules in the stylesheet that match at the given node in the document tree.
Definition at line 417 of file css.cc.
References anyTable, CssRule::apply(), classTable, DoctreeNode::element, elementTable, lout::misc::SimpleVector< T >::get(), lout::container::typed::HashTable< K, V >::get(), DoctreeNode::id, idTable, DoctreeNode::klass, MSG_WARN, CssRule::position(), lout::misc::SimpleVector< T >::size(), and CssRule::specificity().
|
inline |
Definition at line 498 of file css.hh.
References requiredMatchCache.
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
Definition at line 491 of file css.hh.
Referenced by addRule(), CssStyleSheet(), and getRequiredMatchCache().