Dillo v3.1.1-46-g8a360e32
Loading...
Searching...
No Matches
CssRule Class Reference

A CssSelector CssPropertyList pair. More...

#include <css.hh>

Public Member Functions

 CssRule (CssSelector *selector, CssPropertyList *props, int pos)
 
 ~CssRule ()
 
void apply (CssPropertyList *props, Doctree *docTree, const DoctreeNode *node, MatchCache *matchCache) const
 
bool isSafe ()
 
int specificity ()
 
int position ()
 
void print ()
 

Public Attributes

CssSelectorselector
 

Private Attributes

CssPropertyListprops
 
int spec
 
int pos
 

Detailed Description

A CssSelector CssPropertyList pair.

The CssPropertyList is applied if the CssSelector matches.

Definition at line 447 of file css.hh.

Constructor & Destructor Documentation

◆ CssRule()

CssRule::CssRule ( CssSelector selector,
CssPropertyList props,
int  pos 
)

◆ ~CssRule()

CssRule::~CssRule ( )

Definition at line 331 of file css.cc.

References props, selector, CssPropertyList::unref(), and CssSelector::unref().

Member Function Documentation

◆ apply()

void CssRule::apply ( CssPropertyList props,
Doctree docTree,
const DoctreeNode node,
MatchCache matchCache 
) const

Definition at line 336 of file css.cc.

References CssPropertyList::apply(), CssSelector::match(), props, and selector.

Referenced by CssStyleSheet::apply().

◆ isSafe()

bool CssRule::isSafe ( )
inline

Definition at line 460 of file css.hh.

References CssSelector::checksPseudoClass(), CssPropertyList::isSafe(), props, and selector.

Referenced by CssContext::addRule().

◆ position()

int CssRule::position ( )
inline

Definition at line 464 of file css.hh.

References pos.

Referenced by CssStyleSheet::apply().

◆ print()

void CssRule::print ( )

Definition at line 342 of file css.cc.

References CssPropertyList::print(), CssSelector::print(), props, and selector.

◆ specificity()

int CssRule::specificity ( )
inline

Definition at line 463 of file css.hh.

References spec.

Referenced by CssStyleSheet::apply(), and CssStyleSheet::RuleList::insert().

Member Data Documentation

◆ pos

int CssRule::pos
private

Definition at line 450 of file css.hh.

Referenced by CssRule(), and position().

◆ props

CssPropertyList* CssRule::props
private

Definition at line 449 of file css.hh.

Referenced by apply(), CssRule(), isSafe(), print(), and ~CssRule().

◆ selector

CssSelector* CssRule::selector

◆ spec

int CssRule::spec
private

Definition at line 450 of file css.hh.

Referenced by CssRule(), and specificity().


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