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

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
 

Detailed Description

A set of CssStyleSheets.

Definition at line 515 of file css.hh.

Constructor & Destructor Documentation

◆ CssContext()

CssContext::CssContext ( )

Definition at line 489 of file css.cc.

Member Function Documentation

◆ addRule()

◆ apply()

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

Member Data Documentation

◆ matchCache

MatchCache CssContext::matchCache
private

Definition at line 519 of file css.hh.

◆ pos

int CssContext::pos
private

Definition at line 520 of file css.hh.

◆ sheet

CssStyleSheet CssContext::sheet[CSS_PRIMARY_USER_IMPORTANT+1]
private

Definition at line 518 of file css.hh.

◆ userAgentSheet

CssStyleSheet CssContext::userAgentSheet
staticprivate

Definition at line 517 of file css.hh.


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