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).
  Fossies Dox: dillo-3.0.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

CssStyleSheet Class Reference

A list of CssRules. More...

#include <css.hh>

Collaboration diagram for CssStyleSheet:
[legend]

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
 

Detailed Description

A list of CssRules.

In apply () all matching rules are applied.

Definition at line 457 of file css.hh.

Constructor & Destructor Documentation

◆ CssStyleSheet()

CssStyleSheet::CssStyleSheet ( )
inline

Definition at line 494 of file css.hh.

References requiredMatchCache.

Member Function Documentation

◆ addRule()

◆ apply()

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().

◆ getRequiredMatchCache()

int CssStyleSheet::getRequiredMatchCache ( )
inline

Definition at line 498 of file css.hh.

References requiredMatchCache.

Member Data Documentation

◆ anyTable

RuleList CssStyleSheet::anyTable
private

Definition at line 489 of file css.hh.

Referenced by addRule(), and apply().

◆ classTable

RuleMap CssStyleSheet::classTable
private

Definition at line 490 of file css.hh.

Referenced by addRule(), and apply().

◆ elementTable

RuleList CssStyleSheet::elementTable[ntags]
private

Definition at line 489 of file css.hh.

Referenced by addRule(), and apply().

◆ idTable

RuleMap CssStyleSheet::idTable
private

Definition at line 490 of file css.hh.

Referenced by addRule(), and apply().

◆ ntags

const int CssStyleSheet::ntags = 90 + 14
staticprivate

Definition at line 482 of file css.hh.

Referenced by addRule().

◆ requiredMatchCache

int CssStyleSheet::requiredMatchCache
private

Definition at line 491 of file css.hh.

Referenced by addRule(), CssStyleSheet(), and getRequiredMatchCache().


The documentation for this class was generated from the following files: